summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
AgeCommit message (Collapse)AuthorLines
2006-04-25Fix SF bug #1476111: SystemError in socket sendto. The AF_INET6 andThomas Wouters-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.
2006-04-23Patch 1471925 - Weak linking support for OSXRonald Oussoren-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.
2006-04-19SF Patch #1062014: AF_UNIX sockets under Linux have a specialArmin Rigo-6/+31
abstract namespace that is now fully supported.
2006-04-15Patch #1191065: Fix preprocessor problems on systems where recvfromMartin v. Löwis-6/+8
is a macro.
2006-04-12Off-by-one buffer overflow error.Armin Rigo-1/+1
2006-04-06Patch #1462080: Conditionalize some NETLINK defines.Martin v. Löwis-0/+11
2006-04-01Bug #1460564: document that socket.fromfd() duplicates the givenGeorg Brandl-2/+3
file descriptor.
2006-03-17RFE #567972: Socket objects' family, type and proto properties areGeorg Brandl-1/+10
now exposed via new get...() methods.
2006-02-27More unconsting.Martin v. Löwis-1/+1
2006-02-21NETLINK_TCPDIAG and NETLINK_NFLOG aren't defined on older LinuxGuido van Rossum-0/+4
systems; define these conditionally.
2006-02-20Bug #854823: socketmodule now builds on Sun platforms even whenGeorg Brandl-2/+2
INET_ADDRSTRLEN is not defined.
2006-02-11Introduce Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE.Martin v. Löwis-0/+7
Proposed by Tim Peters.
2006-02-07Bug #876637, prevent stack corruption when socket descriptorNeal Norwitz-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.
2006-01-19Check return result from Py_InitModule*(). This API can fail.Neal Norwitz-0/+2
Probably should be backported.
2006-01-16Get socketmodule to build after adding netlink support.Neal Norwitz-0/+2
2006-01-15Change build format of netlink addresses.Martin v. Löwis-1/+1
2006-01-14Patch #1103116: AF_NETLINK sockets basic support.Martin v. Löwis-1/+53
2005-12-19Fix SF bug #1072182, problems with signed characters.Neal Norwitz-1/+2
Most of these can be backported.
2005-12-10Add const to several API functions that take char *.Jeremy Hylton-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 *.
2005-09-24Patch #1288833: Removed thread lock from socket.getaddrinfo onHye-Shik Chang-1/+6
FreeBSD 5.3 and later versions which got thread-safe getaddrinfo(3). (Reported by Maxim Sobolev)
2005-09-14- Changes donated by Elemental Security to make it work on AIX 5.3Guido van Rossum-23/+19
with IBM's 64-bit compiler (SF patch #1284289). This also closes SF bug #105470: test_pwd fails on 64bit system (Opteron).
2005-08-26patch [ 756021 ] Allow socket.inet_aton("255.255.255.255") on WindowsGeorg Brandl-7/+12
2004-11-07Fix apparently trivial buffer overflow (SF bug 1060396).Jeremy Hylton-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.
2004-10-14Just remove the #include of signal.h. That it was C++-commented outMichael W. Hudson-1/+0
was a mistake of mine in updating patch #975056 (I think).
2004-10-14Use C89 style comment for old compilersNeal Norwitz-1/+1
2004-10-13Patch #975056 - fixes for restartable signals on *BSD. In addition,Anthony Baxter-1/+1
a few remaining calls to signal() were converted to PyOS_setsig().
2004-09-28Silence a compiler warning by supplying the correct argument type toRaymond Hettinger-2/+2
the htons() function.
2004-09-13Patch for compilation on IRIX from rwgk on http://python.org/sf/728330Trent Mick-0/+10
2004-09-07Apply patch from http://python.org/sf/728330 to fix socket module ↵Trent Mick-1/+13
compilation on Solaris 2.6, HP-UX 11, AIX 5.1 and (possibly) some IRIX versions.
2004-08-26Patch #1015012. Improve markup and punctuation in libsocket.texDave Cole-2/+2
2004-08-25Back out 1.289, which breaks platforms needing addrinfo.h, andMartin v. Löwis-31/+0
1.293, 1.298, and 1.300, which have tried to fix this for specific platforms.
2004-08-23Updated the socketpair() docstring and documentation to explain that theDave Cole-2/+4
default famility is AF_UNIX if defined for the platform, otherwise the default is AF_INET.
2004-08-23Removed unnecessary calls to signal() to ignore SIGPIPE. SIGPIPE is ignoredDave Cole-13/+0
in initsigs() inside pythonrun.c.
2004-08-09Bug #1001857: socketmodule does not build under cygwinJason Tishler-0/+4
Restore clean building under Cygwin.
2004-08-09Patch #1003700: Add socketpair function to socket module.Dave Cole-0/+62
2004-08-03Restore compilation on MSVC++ 6.0Raymond Hettinger-0/+4
2004-08-03Fix [ 1001018 ]: Windows: setdefaulttimeout causes unnecessary timeouts onMark Hammond-3/+24
connect error
2004-07-19Patch #984654: Add more address family constants.Martin v. Löwis-0/+60
2004-07-10[Patch #947352 from Jason Andryuk] Add support for AF_PACKET hardware addressesAndrew M. Kuchling-6/+15
2004-07-10[Patch #982665 ] add SO_EXCLUSIVEADDRUSE constantAndrew M. Kuchling-0/+4
2004-07-07OS/2 EMX needs addrinfo.h for code included from getaddrinfo.cAndrew MacIntyre-0/+4
2004-06-28Added socket.getservbyport(), and make its second argument and that ofBarry Warsaw-5/+39
getservbyname() optional. Update the tests and the docs.
2004-06-03Patch #929192: Improvements to bluetooth support.Martin v. Löwis-75/+166
Added setbdaddr and makebdaddr. Extended makesockaddr to understand Bluetooth addresses. Changed getsockaddr to expect the Bluetooth addresses as a string, not a six element tuple. Reformatted some of the Bluetooth code to be more consistent with PEP 7.
2004-06-02Patch #924294: Do not check for AF_INET6 if it is not defined.Martin v. Löwis-1/+1
Will backport to 2.3.
2004-05-26Band-aid type fix forMichael W. Hudson-0/+19
[ 728330 ] Don't define _SGAPI on IRIX The Right Thing would be nice, for now this'll do. At least it isn't going to break anything *other* than IRIX...
2004-04-11Fixes for AF_UNIX support on OS/2:Andrew MacIntyre-0/+4
- return the full size of the sockaddr_un structure, without which bind() fails with EINVAL; - set test_socketserver to use a socket name that meets the form required by the underlying implementation; - don't bother exercising the forking AF_UNIX tests on EMX - its fork() can't handle the stress.
2004-04-04OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation thatAndrew MacIntyre-4/+4
the socket name must start with /socket32/. Unlike Unix systems, this file never exists in the file system.
2004-03-23Make socket.sslerror a subclass of socket.error .Brett Cannon-0/+2
Added socket.error to the socket module's C API.
2004-02-16Make socketmodule compile again on a modern Linux (that supports Bluetooth).Anthony Baxter-1/+1
The Bluetooth code was obviously never tested on Linux.
2004-02-10remove support for missing ANSI C header files (limits.h, stddef.h, etc).Skip Montanaro-3/+1