summaryrefslogtreecommitdiffstats
path: root/Modules/socketmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Add more constants. Contributed by itojun.Martin v. Löwis2001-08-041-1/+73
|
* Auto-detect hstrerror. Raise socket.herror in PyH_Error. Register the threeMartin v. Löwis2001-08-041-2/+4
| | | | exception classes in the module dictionary.
* Do not use the system getaddrinfo on Mac OS X. Fixes bug #445928.Martin v. Löwis2001-08-031-6/+16
| | | | Since getnameinfo is not implemented, remove __APPLE__ check here.
* Enable PyOS_snprintf() et al. during alpha phase of 2.2.0 andMarc-André Lemburg2001-07-311-10/+2
| | | | add another use case to the socketmodule.
* Temporarily work around bug #445928: Force usage of getaddrinfo emulationMartin v. Löwis2001-07-301-2/+6
| | | | code on Darwin, since the C library version of that seems to be broken.
* Use HAVE_SNPRINTF, not HAVE_SPRINTF, for checking the availability ofThomas Wouters2001-07-241-1/+1
| | | | snprintf.
* Autocheck for snprintf, and use sprintf if it is not available.Martin v. Löwis2001-07-241-3/+8
| | | | | Remove declaration of h_errno, since it is supposedly declared in netdb.h. Changes proposed by itojun.
* Before declaring h_errno, do not check for Win32 only. Instead, do checkMartin v. Löwis2001-07-231-1/+1
| | | | whether h_errno is a macro.
* Instead of accessing ss_family, cast sockaddr_storage to sockaddr and access ↵Martin v. Löwis2001-07-231-1/+5
| | | | sa_family.
* Patch #401196: IPv6 extensions to the socket module.Martin v. Löwis2001-07-211-103/+546
| | | | | | | | New functions getnameinfo, getaddrinfo. New exceptions socket.gaierror, socket.herror. Various new constants, in particular AF_INET6 and error codes and parameters for getaddrinfo. AF_INET6 support in setipaddr, makesockaddr, getsockaddr, getsockaddrlen, gethost_common, PySocket_gethostbyaddr.
* Silence warnings in MSVC++: hide unused variables, add constness back toMartin v. Löwis2001-07-211-5/+5
| | | | inet_pton/ntop, convert htons argument to u_short.
* Clean up some warnings from the SGI compiler.Fred Drake2001-07-191-3/+3
| | | | This is part of SF patch #434992.
* Port getaddrinfo to MSVC++.Martin v. Löwis2001-07-191-12/+0
|
* Remove const-ness in inet_pton declaration.Martin v. Löwis2001-06-251-1/+1
|
* Fix typos in inet_pton/inet_ntop.Martin v. Löwis2001-06-241-2/+3
|
* Provide a definition for offsetof.Martin v. Löwis2001-06-241-0/+8
|
* Emulate inet_{pton,ntop} on systems that don't provide it.Martin v. Löwis2001-06-241-0/+41
|
* Pure brute-force hackery to allow Python to build on Windows again,Tim Peters2001-06-241-0/+12
| | | | | because I need to make progress and don't have time now to think about whatever it is the new code is trying to accomplish.
* Patch #401196: Configuration machinery for IPv6.Martin v. Löwis2001-06-231-0/+10
| | | | | Contributed by Jun-ichiro "itojun" Hagino. get{addr,name}info emulation code taken from WIDE.
* Fix a minor style consistency issue.Fred Drake2001-05-111-3/+3
| | | | | | When getting a string buffer for a string we just created, use PyString_AS_STRING() instead of PyString_AsString() to avoid the call overhead and extra type check.
* Three uses of makesockaddr() used sockaddr buffers that had not be cleared;Fred Drake2001-05-091-1/+4
| | | | | | | | | | | | | this could cause invalid paths to be returned for AF_UNIX sockets on some platforms (including FreeBSD 4.2-RELEASE), appearantly because there is no assurance that the address will be nul-terminated when filled in by the kernel. PySocketSock_recvfrom(): Use PyString_AS_STRING() to get the data pointer of a string we create ourselves; there is no need for the extra type check from PyString_AsString(). This closes SF bug #416573.
* Reverting Moshe's EGD patch *and* Martin's patch to make it work withGuido van Rossum2001-04-161-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.
* I am TENTATIVELY checking in Martin von Loewis's patch for the SSLGuido van Rossum2001-04-131-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.)
* Committing patch 405101Moshe Zadka2001-03-181-0/+27
|
* RISCOS changes by dschwertberger.Guido van Rossum2001-03-021-106/+177
|
* Remove the optional integer argument to SSL_write; now it will always sendAndrew M. Kuchling2001-02-071-5/+2
| | | | the entire string passed to it
* Patch #103636: Allow writing strings containing null bytes to an SSL socketAndrew M. Kuchling2001-02-061-1/+1
|
* fix a couple last-minute bugs in the raw socket supportJeremy Hylton2001-02-021-24/+24
|
* SF patch 101137 from Grant EdwardsJeremy Hylton2001-02-021-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.
* An ssl-wrapped socket now returns '' on EOF, just like a regularJeremy Hylton2001-02-011-7/+4
| | | | | | socket -- as suggested by Clarence Gardner. Fix httplib to comply with the new ssl-socket interface.
* SF Patch #103185, by jlt63: Some more standard modules cleanup for CygwinGuido van Rossum2001-01-221-1/+4
|
* Use openssl/*.h to include the OpenSSL header filesAndrew M. Kuchling2001-01-181-6/+6
|
* Adapted from a patch by Barry Scott, SF patch #102875 and SF bugGuido van Rossum2000-12-181-3/+4
| | | | #125981: closing sockets was not thread-safe.
* Patch by Michael Hudson to clarify the error message fromGuido van Rossum2000-12-011-1/+7
| | | | getsockaddrarg when the address is not a tuple.
* Norman Vine <nhv@users.sourceforge.net>:Fred Drake2000-10-061-1/+1
| | | | | | tcp.h is not available on CygWin, so do not try to include it there. This closes SourceForge patch #101802.
* Remove a lot of the confusing conditional compilation from the beginningFred Drake2000-08-161-47/+4
| | | | of the init_socket() function. This module is now *always* _socket.
* Remobe beopen/cnri/cwi copyrights, according to CNRI instructions.Guido van Rossum2000-08-031-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.
* Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling2000-08-031-35/+50
|
* merge Include/my*.h into Include/pyport.hPeter Schneider-Kamp2000-07-311-1/+0
| | | | marked my*.h as obsolete
* Use 'void' directly instead of the ANY #define, now that all code is ANSI C.Thomas Wouters2000-07-251-4/+4
| | | | Leave the actual #define in for API compatibility.
* Remove unused variable and what looks like an ancient relic of an oldThomas Wouters2000-07-241-7/+0
| | | | version of SSLeay (now known as OpenSSL.)
* Create a new section of pyport.h to hold all external function declarationsThomas Wouters2000-07-241-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.
* Patch #100926 - Better error messages for socket exceptions on Windows. ↵Mark Hammond2000-07-241-2/+78
| | | | [Slight style differences from posted patch]
* Even more ANSIfication: fix as many function pointers and declarations asThomas Wouters2000-07-221-1/+1
| | | | possible.
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-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 ;)
* Errare humanum est.Peter Schneider-Kamp2000-07-111-1/+1
| | | | Changed parameter in getsockaddrlen from unsigned to socklen_t.
* fixed a warning in getsockaddrlenPeter Schneider-Kamp2000-07-111-1/+1
|
* - ANSI-ificationFredrik Lundh2000-07-091-94/+47
| | | | (patch #100770 by Peter Schneider-Kamp)
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-1/+1
|
* Removed a prototype which is not used in socketmodule.cMarc-André Lemburg2000-07-071-1/+0
| | | | Patch by T. Wouters.