summaryrefslogtreecommitdiff
path: root/Modules/socketmodule.c
AgeCommit message (Collapse)AuthorLines
2001-04-16Reverting Moshe's EGD patch *and* Martin's patch to make it work withGuido van Rossum-34/+0
OpenSSL versions beore 0.9.5. This just is too experimental to be worth it, especially since the user would have to do some severe hacking of the Modules/Setup file to even enable the EGD code, and without the EGD code it would always spit out a warning on some systems -- even when socket.ssl() is not used. Fixing that properly is not my job; the EGD patch is clearly not so important that it should hold up the 2.1 release.
2001-04-13I am TENTATIVELY checking in Martin von Loewis's patch for the SSLGuido van Rossum-0/+7
problem reported by Neil Schemenauer on python-dev on 4/12/01, wth subject "Problem with SSL and socketmodule on Debian Potato?". It's tentative because Moshe objected, but Martin rebutted, and Moshe seems unavailable for comments. (Note that with OpenSSL 0.9.6a, I get a lot of compilation warnings for socketmodule.c -- I'm assuming I can safely ignore these until 2.1 is released.)
2001-03-18Committing patch 405101Moshe Zadka-0/+27
2001-03-02RISCOS changes by dschwertberger.Guido van Rossum-104/+175
2001-02-07Remove the optional integer argument to SSL_write; now it will always sendAndrew M. Kuchling-5/+2
the entire string passed to it
2001-02-06Patch #103636: Allow writing strings containing null bytes to an SSL socketAndrew M. Kuchling-1/+1
2001-02-02fix a couple last-minute bugs in the raw socket supportJeremy Hylton-24/+24
2001-02-02SF patch 101137 from Grant EdwardsJeremy Hylton-3/+93
Adds support for raw packets (AF_PACKET) under Linux. I haven't tested this code thoroughly; it compiles and the basic calls all work without crashing. Not sure what to actually do with raw sockets though. Not sure what other platforms this might be useful for.
2001-02-01An ssl-wrapped socket now returns '' on EOF, just like a regularJeremy Hylton-7/+4
socket -- as suggested by Clarence Gardner. Fix httplib to comply with the new ssl-socket interface.
2001-01-22SF Patch #103185, by jlt63: Some more standard modules cleanup for CygwinGuido van Rossum-1/+4
2001-01-18Use openssl/*.h to include the OpenSSL header filesAndrew M. Kuchling-6/+6
2000-12-18Adapted from a patch by Barry Scott, SF patch #102875 and SF bugGuido van Rossum-3/+4
#125981: closing sockets was not thread-safe.
2000-12-01Patch by Michael Hudson to clarify the error message fromGuido van Rossum-1/+7
getsockaddrarg when the address is not a tuple.
2000-10-06Norman Vine <nhv@users.sourceforge.net>:Fred Drake-1/+1
tcp.h is not available on CygWin, so do not try to include it there. This closes SourceForge patch #101802.
2000-08-16Remove a lot of the confusing conditional compilation from the beginningFred Drake-47/+4
of the init_socket() function. This module is now *always* _socket.
2000-08-03Remobe beopen/cnri/cwi copyrights, according to CNRI instructions.Guido van Rossum-10/+0
This doesn't change the copyright status for these files -- just the markings! Doing it on the main branch for these three files for which the HEAD revision was pushed back into 1.6.
2000-08-03Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling-34/+49
2000-07-31merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp-1/+0
marked my*.h as obsolete
2000-07-25Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters-4/+4
Leave the actual #define in for API compatibility.
2000-07-24Remove unused variable and what looks like an ancient relic of an oldThomas Wouters-7/+0
version of SSLeay (now known as OpenSSL.)
2000-07-24Create a new section of pyport.h to hold all external function declarationsThomas Wouters-11/+2
for systems that are missing those declarations from system include files. Start by moving a pointy-haired ones from their previous locations to the new section. (The gethostname() one, for instance, breaks on several systems, because some define it as (char *, size_t) and some as (char *, int).) I purposely decided not to include the summary of used #defines like Tim did in the first section of pyport.h. In my opinion, the number of #defines likedly to be used by this section would make such an overview unwieldy. I would suggest documenting the non-obvious ones, though.
2000-07-24Patch #100926 - Better error messages for socket exceptions on Windows. ↵Mark Hammond-2/+78
[Slight style differences from posted patch]
2000-07-22Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters-1/+1
possible.
2000-07-21Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters-8/+6
and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
2000-07-11Errare humanum est.Peter Schneider-Kamp-1/+1
Changed parameter in getsockaddrlen from unsigned to socklen_t.
2000-07-11fixed a warning in getsockaddrlenPeter Schneider-Kamp-1/+1
2000-07-09- ANSI-ificationFredrik Lundh-94/+47
(patch #100770 by Peter Schneider-Kamp)
2000-07-09Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters-1/+1
2000-07-07Removed a prototype which is not used in socketmodule.cMarc-André Lemburg-1/+0
Patch by T. Wouters.
2000-07-01Restore strict checking of socket address values; addresses passed toFred Drake-15/+21
the bind(), connect(), and connect_ex() methods must be a single parameter. Originally part of 1.98, reverted in 1.100.
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-30Trent Mick <trentm@activestate.com>:Fred Drake-13/+46
This patch fixes possible overflows in the socket module for 64-bit platforms (mainly Win64). The changes are: - abstract the socket type to SOCKET_T (this is SOCKET on Windows, int on Un*x), this is necessary because sizeof(SOCKET) > sizeof(int) on Win64 - use INVALID_SOCKET on Win32/64 for an error return value for accept() - ensure no overflow of the socket variable for: (1) a PyObject return value (use PyLong_FromLongLong if necessary); and (2) printf formatting in repr(). Closes SourceForge patch #100516.
2000-05-16Donn Cave <donn@oz.net>:Fred Drake-0/+2
BeOS (up to 5.0) lacks <netinet/tcp.h>.
2000-05-03Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum-9/+9
For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
2000-04-25Fix typo in last patch -- the symbol's name is MSG_DONWAIT, notGuido van Rossum-1/+1
MSG_DONTWAIT. Reported by Fredrik Lundh.
2000-04-25Patch by Charles G Waldman:Guido van Rossum-1/+4
1) Adds MSG_DONTWAIT if defined (I needed this) 2) Spells "coreectly" correctly ;-)
2000-04-24Jack Jansen: The GUSI 2.0 I/O library used on the Mac uses theGuido van Rossum-9/+15
socklen_t (unsigned int) for most size parameters. Apparently this is part of the UNIX 98 standard. [GvR: the changes to configure.in etc. that I just checked in make sure that socklen_t is defined everywhere, so I deleted the little part of Jack's mod to define socklen_t if not in GUSI2. I suppose I will have to add it to the Windows config.h in a minute.]
2000-04-21Use an explicit macro SOCKETCLOSE which expands to closesocket (onGuido van Rossum-10/+14
Windows), soclose (on OS2), or to close (everywhere else). Hopefully this fixes a new compilation error that I suddenly get on Windows because the macro definition for close -> closesocket apparently was done before including io.h, which contains a prototype for close. (No idea why this wasn't an error before.)
2000-04-10In dealloc(), only close the socket if fd != -1.Guido van Rossum-1/+2
2000-04-04Add warning that multi-arg connect() etc. are deprecated.Guido van Rossum-1/+1
2000-04-04Put back multi-arg capability on connect/connect_ex/bind, forGuido van Rossum-21/+15
backwards compatibility, and to avoid a revolution.
2000-03-31Add '#include <netinet/tcp.h>'Andrew M. Kuchling-0/+1
"man tcp" on Solaris says that TCP_NODELAY is defined in netinet/tcp.h, and the Open Groups Unix98 spec agrees (http://www.opengroup.org/onlinepubs/009619199/ninettcp.htm).
2000-03-24Fix all routines to use PyArg_ParseTuple(), and add ":name" to theGuido van Rossum-58/+71
argument format strings. THIS WILL PROBABLY BREAK LOTS OF CODE!!! Also fixed a bogus string in an error message in getsockaddrlen().
2000-03-07Fixed inet_ntoa() docstring.Fred Drake-1/+1
2000-02-29Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum-9/+9
PyArg_ParseTuple() format string arguments as possible.
1999-12-07OpenSSL support. This is based on patches for a version of SSLeay byGuido van Rossum-1/+290
Brian E Gallew, which were improved and adapted to OpenSSL 0.9.4 by Laszlo Kovacs of HP. Both have kindly given permission to include the patches in the Python distribution. Final formatting by GvR.
1999-11-04Bugfix by Jack Jansen for Macintosh (for the inet_ntoa/aton changes):Guido van Rossum-1/+6
<arpa/inet.h> doesn't exist and isn't needed; and inet_addr() returns a structure containing a long rather than a long.
1999-09-15(1) On Linux, we really need to trust the configure script to selectGuido van Rossum-2/+13
the right variant of gethostbyname_r for us, since not all Linuxes are equal in this respect. Reported by Laurent Pointal. (2) On BeOS, Chris Herborth reports that instead of arpa/inet.h you must include net/netdb.h to get the inet_ntoa() and inet_addr() prototypes.
1999-09-09It appears that inet_aton() doesn't really exist except in libresolv;Guido van Rossum-20/+3
the proper function to call is inet_addr(). Since we already had code to do that (for MS-Windows), this simplifies things a lot!