Message5287

Author amak
Recipients amak, fwierzbicki, pjenvey, tercero12
Date 2009-10-28.18:29:15
SpamBayes Score 1.7564283e-12
Marked as misclassified No
Message-id <1256754556.87.0.913708908482.issue1309@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Tim,

Thanks for taking the time to contribute to the discussion.

The problem I'm trying to address is this: If we are to emulate the
behaviour of cpython, then we should emulate the behaviour of cpython
running on which platform? AFAICT, the behaviour of cpython, in relation
to socket option inheritance, differs on each platform.

For example, BSD opts for inheriting socket level options (SOL_SOCKET),
but not TCP level (IPPROTO_TCP) options.

http://www.openldap.org/lists/openldap-bugs/200009/msg00191.html

AIX, inherits TCP level options.

"Beginning at AIX 4.3.2, TCP protocol level socket options are inherited
from listening sockets to new sockets. Prior to 4.3.2, only the
TCP_RFC1323 option was inherited."
http://publib.boulder.ibm.com/infocenter/pseries/v5r3/index.jsp?topic=/com.ibm.aix.commtechref/doc/commtrf2/setsockopt.htm

An accept'ed Window socket "has the same properties" as the parent
socket: no definition of option level.
http://msdn.microsoft.com/en-us/library/ms737526%28VS.85%29.aspx

Looking at the source code for the cpython socket module gives no help:
it has no code (that I can see) for transferring options from accept'ing
to accept'ed socket.

See lines 1608-1672
http://svn.python.org/view/python/trunk/Modules/socketmodule.c?view=annotate

So it appears to me that the cpython socket module is completely
deferring socket option inheritance to the underlying platform socket
library.

I work hard to make sure that the jython socket module is as compatible
as possible with cpython, and to make sure that cpython socket code runs
*without change* on jython.

But in this case, the behaviour of cpython is not specified. If there is
no clear statement of what is to be emulated, then how can I emulate it?

If there any specific standard which determines how socket option
inheritance should be treated, then I'll be happy to follow it.
History
Date User Action Args
2009-10-28 18:29:16amaksetmessageid: <1256754556.87.0.913708908482.issue1309@psf.upfronthosting.co.za>
2009-10-28 18:29:16amaksetrecipients: + amak, fwierzbicki, pjenvey, tercero12
2009-10-28 18:29:16amaklinkissue1309 messages
2009-10-28 18:29:15amakcreate