summaryrefslogtreecommitdiff
path: root/network_io
Commit message (Collapse)AuthorAgeFilesLines
* slight apr_sockaddr_info_get() simplification/speed-up:trawick2002-03-141-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | in the getaddrinfo() flavor we were needlessly building a string form of the port number to pass to getaddrinfo() so it would put it in the sockaddrs it built... but then we stuffed the port number in the sockaddrs anyway given that we no longer need getaddrinfo() to be able to handle port numbers properly, there is no sense checking for that ability at configure time suddenly we think that AIX 4.3.3.no-fixes has a working getaddrinfo() (it previously failed the pass-the-port-number- to-getaddrinfo check) but that level of AIX doesn't fill in the family field in the sockaddrs built by getaddrinfo()... rather than kludge around it in apr_sockaddr_info_get(), it is better to change the configure test to refuse to use getaddrinfo() on such a system git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63125 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.fielding2002-03-1319-19/+19
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* There is no apparent need to expose the guts of apr_ipsubnet_t,trawick2002-03-121-0/+11
| | | | | | | | so move the definition to sa_common.c, the only file that needs to have that information. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63111 13f79535-47bb-0310-9956-ffa450edef68
* add a little reminder that in this new code, as in existingtrawick2002-02-223-1/+7
| | | | | | | | code, we assume that sin_port and sin6_port are at the same offset git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63058 13f79535-47bb-0310-9956-ffa450edef68
* Set the port values in apr_os_sock_makeake2002-02-223-0/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63055 13f79535-47bb-0310-9956-ffa450edef68
* Two very safe have-header tests for the WinCE port,wrowe2002-02-122-0/+4
| | | | | | | submitted by Mladen Turk <mturk@mappingsoft.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62967 13f79535-47bb-0310-9956-ffa450edef68
* In the Linux apr_sendfile(), fix the types of some parameterstrawick2002-02-041-2/+2
| | | | | | | | | | | | to apr_send() and apr_recv(). Breakage was seen in 64-bit mode on s/390. PR: 9712 Submitted by: Neale.Ferguson@SoftwareAG-usa.coom Reviewed by: Jeff Trawick, who added the fix to the apr_send() parameter git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62910 13f79535-47bb-0310-9956-ffa450edef68
* Be a bit more conservative regarding all those broken implementations outmartin2002-01-311-17/+15
| | | | | | | | | | | | | | | | | there. Not everyone has FreeBSD or Linux. getnameinfo() should return a rc containing 0 (success) or some EAI_ value. This rc can be used as a mapped APR_ error (+APR_OS_START_EAIERR). Only if the rc == EAI_SYSTEM, errno should be inspected (I see no reason whatsoever to look at h_errno, as (like for apr_sockaddr_info_get()'s call of getaddrinfo()) the error is supposed to be in errno. However, and because h_errno has been zeroed out before the call, I added another test for nonzero h_errno. Everone happy? git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62876 13f79535-47bb-0310-9956-ffa450edef68
* De facto implementations of getnameinfo() return the error code in theirmartin2002-01-291-0/+11
| | | | | | | | return value. See isc.org's bind9, or FreeBSD's lib/libc/net/getnameinfo.c Implementations that set h_errno a simply broken. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62858 13f79535-47bb-0310-9956-ffa450edef68
* This patch basically allows BeOS R5's apr_poll to work like it should do!dreid2002-01-141-4/+91
| | | | | | | | | | | | | Essentially R5 is very fast to return if you have a socket available, but if you have more than one you'll only get the first one! hence, we now track how many socket/checks we're trying for and if we don't have all of them (which let's face it seems unlikely) we quickly see if any more sockets are available for us. Messy, but it works :) I've added checking for the lowsocket to reduce the range of sockets we check. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62781 13f79535-47bb-0310-9956-ffa450edef68
* Again, no need to use apr_pcalloc as we then do FD_ZERO, so change to use thedreid2002-01-131-6/+6
| | | | | | | cheaper call to apr_palloc. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62779 13f79535-47bb-0310-9956-ffa450edef68
* No point in using apr_pcalloc when we then go on to use FD_ZERO is there?dreid2002-01-131-6/+9
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62778 13f79535-47bb-0310-9956-ffa450edef68
* Sorry, too many years of C++bnicholes2002-01-041-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62703 13f79535-47bb-0310-9956-ffa450edef68
* fix an IPv6 hole in apr_accept(); the bug prevented the propertrawick2002-01-041-2/+4
| | | | | | | sockaddr from being returned in some cases git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62701 13f79535-47bb-0310-9956-ffa450edef68
* Deferred the memory allocation for the new apr_socket_t until after the accept()bnicholes2002-01-041-7/+13
| | | | | | | | call so that we don't chew up huge chunks of memory when using non-blocking sockets and also avoiding unnecessary memory allocations on error conditions. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62700 13f79535-47bb-0310-9956-ffa450edef68
* Substantial optimization of the os_level semantic. Since this is entirelywrowe2001-12-281-2/+1
| | | | | | | | | | for internal consumption, and apr_initialize must be called, resolve the situation once and use the static, shared value for the remainder of the program execution. Next step is to allow conditional builds [excluding older 9x paths] if the user has no interest in 9x support. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62675 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_sockaddr_equal() for comparing APR sockaddrs.trawick2001-12-261-0/+26
| | | | | | | This handles v4-mapped IPv6 addresses. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62669 13f79535-47bb-0310-9956-ffa450edef68
* AIX 5L getaddrinfo() returns an error when "0" is passed for thetrawick2001-12-251-2/+9
| | | | | | | service name parameter, so pass NULL when port is 0 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62667 13f79535-47bb-0310-9956-ffa450edef68
* Win32: apr_sendfile() should return APR_ENOTIMPL if oslevel < WINNTstoddard2001-12-201-0/+5
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62662 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in OS2 related to AF_UNSPEC, and drop a NETWARE section thatwrowe2001-12-072-12/+7
| | | | | | | | duplicates the correct code. If we need to do something with proto, then _that_ can be hidden in an ifdef WIN32 git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62610 13f79535-47bb-0310-9956-ffa450edef68
* APR DOES NOT simply support TCP STREAM sockets.wrowe2001-12-071-4/+5
| | | | | | | | | | We need to look at if IPPROTO_TCP is absolutely required, and if the correct proto will be inferred for things such as SOCK_DGRAM for udp. In any case, the existing code was certainly very ugly and not nice. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62609 13f79535-47bb-0310-9956-ffa450edef68
* Fix minor typo in last patch: the pool has a different name.aaron2001-11-261-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62548 13f79535-47bb-0310-9956-ffa450edef68
* Fixed a memory leak in apr_accept. Prevents memory from continuallybnicholes2001-11-262-0/+14
| | | | | | | being allocated and never freed until the process goes down. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62546 13f79535-47bb-0310-9956-ffa450edef68
* Tweak apr_gethostname() so that it detects truncation of thetrawick2001-11-203-9/+27
| | | | | | | | | | | name and returns an error. Such behavior varied between platforms before, since some systems returned an error if the buffer wasn't large enough while others just truncated the returned name and left it up to the app to detect truncation and/or '\0'-terminate it. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62526 13f79535-47bb-0310-9956-ffa450edef68
* Fix the Unix HAVE_POLL flavor of apr_poll_socket_mask() so thattrawick2001-11-131-2/+2
| | | | | | | | | | | it doesn't segfault. Avoid some wasted storage in a poll-related APR structure. Submitted by: INOUE Seiichiro <inoue@ariel-networks.com> Reviewed by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62511 13f79535-47bb-0310-9956-ffa450edef68
* Pre-BONE BeOS doesn't have SO_ERROR so only call the code if we have SO_ERROR.dreid2001-11-081-9/+14
| | | | | | | | Submitted by: Brad Froehle <epEnochRoot@yahoo.com> Reviewed by: David Reid <dreid@apache.org> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62491 13f79535-47bb-0310-9956-ffa450edef68
* Fix a segfault in apr_poll_clear on Unix. Also fix the logicrbb2001-10-021-2/+2
| | | | | | | | | | for the case where there are multiple events ORed together in the events list. Submitted by: Jamshid Mahdavi <mahdavi@volera.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62392 13f79535-47bb-0310-9956-ffa450edef68
* Don't search for IPv6 names in apr_sockaddr_info_get() if thetrawick2001-09-121-1/+9
| | | | | | | | application doesn't specify the family (i.e., the application passes in AF_UNSPEC) and APR isn't built with IPv6 support. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62316 13f79535-47bb-0310-9956-ffa450edef68
* Error codes from getaddrinfo() need their own range within thetrawick2001-08-291-7/+8
| | | | | | | | apr_status_t layout. This is used to fix the bungling of these error codes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62243 13f79535-47bb-0310-9956-ffa450edef68
* fix some indentationtrawick2001-08-221-3/+3
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62206 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Partial workaround for a bug/oddity of select(). When interrupted bybjh2001-08-201-1/+1
| | | | | | | | a signal, it returns 0, as if a timeout occurred. If timeout was indefinite we can safely assume that it was in fact interrupted. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62200 13f79535-47bb-0310-9956-ffa450edef68
* Put the WSABUFs on the stack in apr_sendv to save a malloc/free call.stoddard2001-08-191-16/+16
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62197 13f79535-47bb-0310-9956-ffa450edef68
* OS/2: Simplify & standardize apr_poll(), we usually want it to return ifbjh2001-08-181-18/+16
| | | | | | | interrupted. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62194 13f79535-47bb-0310-9956-ffa450edef68
* Wrap all APR functions in APR_DECLARE macro.rbb2001-08-107-68/+63
| | | | | | | Submitted by: Sterling Hughes <sterling@designmultimedia.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62139 13f79535-47bb-0310-9956-ffa450edef68
* Added a call to socket() in apr_socket_create() that is not hard coded to TCPbnicholes2001-08-091-0/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62137 13f79535-47bb-0310-9956-ffa450edef68
* Implemented apr_getsocketopt() for NetWarebnicholes2001-08-091-0/+36
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62136 13f79535-47bb-0310-9956-ffa450edef68
* Fix a segfault on Win32 when hostname resolution fails. We were lookingjwoolley2001-08-081-1/+1
| | | | | | | | | up the error but forgot to actually return with that error number. Submitted by: Ian Holsman <ianh@cnet.com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62132 13f79535-47bb-0310-9956-ffa450edef68
* Clean up two warnings:jwoolley2001-08-081-2/+2
| | | | | | | | | | | | | | | | | | | Warning #1 may or may not have ever existed (my mind is a blur), but this change seems to be the most sensible way to go anyhow. The len parameter to getsockopt() seems to most want to be an apr_socklen_t in order to get along with all platforms. Warning #2 I definitely saw on Solaris 2.6, which was that parm 4 to getsockopt() was an incompatible pointer type. That's funky, because we were passing in an int* to a function that generally expects a void*. Right? Wrong, not in this case. Solaris 2.6 ifndef _XPG4_2 (and possibly Win32 as well according to msdn.microsoft.com) expect a char*! That's wacky. Anyway, casting the int* to a char* makes these platforms happy (ugly though it is), and the sane platforms that just take a void* could care less either way. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62131 13f79535-47bb-0310-9956-ffa450edef68
* get sockets.c to compile and fix a bug in the error pathtrawick2001-08-081-2/+3
| | | | | | | | | from getsockopt() (not tested... 2 yr old is begging for a walk :) ) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62130 13f79535-47bb-0310-9956-ffa450edef68
* Finish the fix for the non-blocking connect. Basically, we need torbb2001-08-071-0/+8
| | | | | | | | | | query the socket to find the actual error if the connect failed. This is done using getsockopt with the SO_ERROR option. If error == 0, then the connect succeeded, else error is the connect errno value. Submitted by: Jeff Trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62129 13f79535-47bb-0310-9956-ffa450edef68
* Non-blocking connects shouldn't be calling connect a secondrbb2001-08-071-10/+3
| | | | | | | | | | | | | time. According to Single Unix, a non-blocking connect has succeeded when the select pops successfully. It has failed if the select failed. The second connect was causing 502's in the httpd-proxy. Submitted by: John Barbee barbee@veribox.net Reviewed by: Ryan Bloom git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62124 13f79535-47bb-0310-9956-ffa450edef68
* Changed the type of a local variable used in the call to getsockopt() frombnicholes2001-08-061-1/+1
| | | | | | | | unsigned int to int as per the prototype. This avoids a type mismatch during compilation. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62107 13f79535-47bb-0310-9956-ffa450edef68
* Added an ifdef for NetWare to call the delay() function and also fixed thebnicholes2001-08-061-2/+6
| | | | | | | | | data types of the local variables used in the call to WSARecv() to conform to the prototypes in order to clean up a type mismatch problem during compilation. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62106 13f79535-47bb-0310-9956-ffa450edef68
* Fixed the data types of the local variables used in the calls to ↵bnicholes2001-08-061-2/+2
| | | | | | | | | | ioctlsocket() to conform to the prototypes in order to clean up a type mismatch problem during compilation. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62105 13f79535-47bb-0310-9956-ffa450edef68
* free the whole list of addrinfo structures returned bytrawick2001-08-011-3/+4
| | | | | | | getaddrinfo() git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62071 13f79535-47bb-0310-9956-ffa450edef68
* Remove the dependency on IPv6 for getnameinfo(). A system can havejerenkrantz2001-07-311-1/+1
| | | | | | | | | | getnameinfo(), but not IPv6. (Solaris 7.) I made a similar change for getaddrinfo a week or two ago. No complaints so far for that commit, so see how this fares. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62064 13f79535-47bb-0310-9956-ffa450edef68
* Support the AIX, glibc2, and Solaris variants of gethostby{name|addr}_r.jerenkrantz2001-07-311-5/+55
| | | | | | | | | | | | | | Use gethostbyaddr_r function when available. The AIX gurus will have to test this to make sure I got their prototype right. This compiles on Solaris. Submitted by: Sterling Hughes <sterling@designmultimedia.com> (Modified by Justin) Reviewed by: Justin Erenkrantz git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62063 13f79535-47bb-0310-9956-ffa450edef68
* Performance: Add new socket option, APR_INCOMPLETE_READ, that should bestoddard2001-07-302-2/+21
| | | | | | | | | | | | set when you expect the first non-blocking read to fail with EAGAIN. Setting APR_INCOMPLETE_READ prior to calling apr_read will cause select() to be called first to wait for bytes to read. [Brian Pane, Dean Gaudet] Reviewed by: Bill Stoddard git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62061 13f79535-47bb-0310-9956-ffa450edef68
* Couple of fixes for pre-BONE beos...dreid2001-07-271-4/+4
| | | | | | | | | | | | | - correctly set the file_as_socket - add the apr_wait_for_timeout so it's visible These come from Brad Froehle. Submitted by: Brad Froehle <bradley_f@hotmail.com> Reviewed by: David Reid <dreid@apache.org> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62038 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup Solaris 8 sendfilev() logic to actually behave similarly tojerenkrantz2001-07-261-28/+35
| | | | | | | | the others (i.e. repeat the sendfile if we got EAGAIN and didn't send any bytes). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62033 13f79535-47bb-0310-9956-ffa450edef68