summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* #1494314: Fix a regression with high-numbered sockets in 2.4.3. ThisAnthony Baxter2006-07-111-16/+44
| | | | | means that select() on sockets > FD_SETSIZE (typically 1024) work again. The patch makes sockets use poll() internally where available.
* Patch #1516912: improve Modules support for OpenVMS.Neal Norwitz2006-07-101-49/+43
|
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-2/+6
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* Fix a refleak in recvfrom_intoNeal Norwitz2006-06-081-1/+1
|
* Remove unused variable (and stop compiler warning)Neal Norwitz2006-06-061-1/+0
|
* Fixes in struct and socket from merge reviews.Martin Blais2006-06-041-35/+38
| | | | | | | | | | | | | - Following Guido's comments, renamed * pack_to -> pack_into * recv_buf -> recv_into * recvfrom_buf -> recvfrom_into - Made fixes to _struct.c according to Neal Norwitz comments on the checkins list. - Converted some ints into the appropriate -- I hope -- ssize_t and size_t.
* Simplify further by using AddStringConstantNeal Norwitz2006-05-301-4/+2
|
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-5/+3
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Fix refleak in socketmodule. Replace bogus Py_BuildValue calls.Georg Brandl2006-05-291-3/+5
| | | | Fix refleak in exceptions.
* Support for buffer protocol for socket and struct.Martin Blais2006-05-261-136/+316
| | | | | | | | | | * Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer protocol (send and sendto already did). * Added struct.pack_to(), that is the corresponding buffer compatible method to unpack_from(). * Fixed minor typos in arraymodule.
* Fix SF bug #1476111: SystemError in socket sendto. The AF_INET6 andThomas Wouters2006-04-251-0/+16
| | | | | | AF_PACKET cases in getsockaddrarg were missing their own checks for tuple-ness of the address argument, which means a confusing SystemError was raised by PyArg_ParseTuple instead.
* Patch 1471925 - Weak linking support for OSXRonald Oussoren2006-04-231-2/+34
| | | | | | This patch causes several symbols in the socket and posix module to be weakly linked on OSX and disables usage of ftime on OSX. These changes make it possible to use a binary build on OSX 10.4 on a 10.3 system.
* SF Patch #1062014: AF_UNIX sockets under Linux have a specialArmin Rigo2006-04-191-6/+31
| | | | abstract namespace that is now fully supported.
* Patch #1191065: Fix preprocessor problems on systems where recvfromMartin v. Löwis2006-04-151-6/+8
| | | | is a macro.
* Off-by-one buffer overflow error.Armin Rigo2006-04-121-1/+1
|
* Patch #1462080: Conditionalize some NETLINK defines.Martin v. Löwis2006-04-061-0/+11
|
* Bug #1460564: document that socket.fromfd() duplicates the givenGeorg Brandl2006-04-011-2/+3
| | | | file descriptor.
* RFE #567972: Socket objects' family, type and proto properties areGeorg Brandl2006-03-171-1/+10
| | | | now exposed via new get...() methods.
* More unconsting.Martin v. Löwis2006-02-271-1/+1
|
* NETLINK_TCPDIAG and NETLINK_NFLOG aren't defined on older LinuxGuido van Rossum2006-02-211-0/+4
| | | | systems; define these conditionally.
* Bug #854823: socketmodule now builds on Sun platforms even whenGeorg Brandl2006-02-201-2/+2
| | | | INET_ADDRSTRLEN is not defined.
* Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.Martin v. Löwis2006-02-111-0/+7
| | | | Proposed by Tim Peters.
* Bug #876637, prevent stack corruption when socket descriptorNeal Norwitz2006-02-071-2/+31
| | | | | | | | | | | | | | | | | | is larger than FD_SETSIZE. This can only be acheived with ulimit -n SOME_NUMBER_BIGGER_THAN_FD_SETSIZE which is typically only available to root. Since this wouldn't normally be run in a test (ie, run as root), it doesn't seem too worthwhile to add a normal test. The bug report has one version of a test. I've written another. Not sure what the best thing to do is. Do the check before calling internal_select() because we can't set an error in between Py_BEGIN_ALLOW_THREADS and Py_END_ALLOW_THREADS. This seemed the clearest solution, ie handle before calling internal_select() rather than inside. Plus there is at least one place outside of internal_select() that needed to be handled. Will backport.
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* Get socketmodule to build after adding netlink support.Neal Norwitz2006-01-161-0/+2
|
* Change build format of netlink addresses.Martin v. Löwis2006-01-151-1/+1
|
* Patch #1103116: AF_NETLINK sockets basic support.Martin v. Löwis2006-01-141-1/+53
|
* Fix SF bug #1072182, problems with signed characters.Neal Norwitz2005-12-191-1/+2
| | | | Most of these can be backported.
* Add const to several API functions that take char *.Jeremy Hylton2005-12-101-1/+1
| | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *.
* Patch #1288833: Removed thread lock from socket.getaddrinfo onHye-Shik Chang2005-09-241-1/+6
| | | | | FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3). (Reported by Maxim Sobolev)
* - Changes donated by Elemental Security to make it work on AIX 5.3Guido van Rossum2005-09-141-23/+19
| | | | | with IBM's 64-bit compiler (SF patch #1284289). This also closes SF bug #105470: test_pwd fails on 64bit system (Opteron).
* patch [ 756021 ] Allow socket.inet_aton("255.255.255.255") on WindowsGeorg Brandl2005-08-261-7/+12
|
* Fix apparently trivial buffer overflow (SF bug 1060396).Jeremy Hylton2004-11-071-1/+1
| | | | memset() wrote one past the end of the buffer, which was likely to be unused padding or a yet-to-be-initialized local variable. This routine is already tested by test_socket.
* Just remove the #include of signal.h. That it was C++-commented outMichael W. Hudson2004-10-141-1/+0
| | | | was a mistake of mine in updating patch #975056 (I think).
* Use C89 style comment for old compilersNeal Norwitz2004-10-141-1/+1
|
* Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter2004-10-131-1/+1
| | | | a few remaining calls to signal() were converted to PyOS_setsig().
* Silence a compiler warning by supplying the correct argument type toRaymond Hettinger2004-09-281-2/+2
| | | | the htons() function.
* Patch for compilation on IRIX from rwgk on http://python.org/sf/728330Trent Mick2004-09-131-0/+10
|
* Apply patch from http://python.org/sf/728330 to fix socket module ↵Trent Mick2004-09-071-1/+13
| | | | compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions.
* Patch #1015012. Improve markup and punctuation in libsocket.texDave Cole2004-08-261-2/+2
|
* Back out 1.289, which breaks platforms needing addrinfo.h, andMartin v. Löwis2004-08-251-31/+0
| | | | | 1.293, 1.298, and 1.300, which have tried to fix this for specific platforms.
* Updated the socketpair() docstring and documentation to explain that theDave Cole2004-08-231-2/+4
| | | | | default famility is AF_UNIX if defined for the platform, otherwise the default is AF_INET.
* Removed unnecessary calls to signal() to ignore SIGPIPE. SIGPIPE is ignoredDave Cole2004-08-231-13/+0
| | | | in initsigs() inside pythonrun.c.
* Bug #1001857: socketmodule does not build under cygwinJason Tishler2004-08-091-0/+4
| | | | Restore clean building under Cygwin.
* Patch #1003700: Add socketpair function to socket module.Dave Cole2004-08-091-0/+62
|
* Restore compilation on MSVC++ 6.0Raymond Hettinger2004-08-031-0/+4
|
* Fix [ 1001018 ]: Windows: setdefaulttimeout causes unnecessary timeouts onMark Hammond2004-08-031-3/+24
| | | | connect error
* Patch #984654: Add more address family constants.Martin v. Löwis2004-07-191-0/+60
|
* [Patch #947352 from Jason Andryuk] Add support for AF_PACKET hardware addressesAndrew M. Kuchling2004-07-101-6/+15
|
* [Patch #982665 ] add SO_EXCLUSIVEADDRUSE constantAndrew M. Kuchling2004-07-101-0/+4
|