summaryrefslogtreecommitdiff
path: root/include/apr_network_io.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove the APR_SENDFILE_DISCONNECT_SOCKET flag.ivan2019-09-201-6/+1
| | | | | | | | | | | | | | | | | | There are several problems with this flag: 1. The TCP socket may be subject to the TCP TIME_WAIT state. That means apr_sock_sendfile() could occupy worker thread for significant time (30 seconds) 2. With this flag specified, the socket descriptor is removed from the apr_socket_t and the caller caller is expected to maintain the descriptor and release it manually, which is particularly error-prone. See also: https://lists.apache.org/thread.html/a3c4a03961a4b5842e7f657a15fe777edf5949b768a2807619a104b1@%3Cdev.apr.apache.org%3E git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1867226 13f79535-47bb-0310-9956-ffa450edef68
* Fix some missing doxygen documentation (even if ready to use!)jailletc362019-05-041-2/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1858596 13f79535-47bb-0310-9956-ffa450edef68
* * network_io/unix/sockaddr.c (apr_sockaddr_zone_set): Failjorton2017-11-291-0/+2
| | | | | | | | | | | for an address which is not link-local. * include/apr_network_io.h: Document the above. * test/testsock.c (test_zone): Test for that. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1816628 13f79535-47bb-0310-9956-ffa450edef68
* Support IPv6 link-local address scope/zone mapping.jorton2017-11-281-0/+23
| | | | | | | | | | | | | | | | | | | | * network_io/unix/sockaddr.c (apr_sockaddr_zone_set, apr_sockaddr_zone_get): New functions. (apr_sockaddr_ip_getbuf): Append %scope for link-local address. (apr_sockaddr_equal): Compare link-local address with different scopes as not equal. * include/apr_network_io.h: Add function declarations. * configure.in: Test for if_indextoname and if_nametoindex. * test/testsock.c (test_zone): New test case. * include/arch/win32/apr_private.h: Assume Windows supports if_nametoindex and if_indextoname. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1816527 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_sendfile:ylavic2017-03-281-0/+1
| | | | | | | | | | | | | | Be accurate (and consistent accross unixes) with the returned number of bytes written (note that it is possible for both bytes to be sent and an error to be returned, due to headers and trailers handling). Fix some returned errno vs apr_status_t in some error paths. Fix BSDs nonblocking/busy retry on EAGAIN when nothing is written. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1789257 13f79535-47bb-0310-9956-ffa450edef68
* Committed to 1.6.x branch first in error in r1733456:jorton2016-03-031-0/+1
| | | | | | | * include/apr_network_io.h: Document APR_SO_FREEBIND here. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1733457 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h (APR_SO_FREEBIND): Add option.jorton2016-03-031-0/+3
| | | | | | | | | | | | * network_io/unix/sockopt.c (apr_socket_opt_set): Implement APR_SO_FREEBIND on Linux with IP_FREEBIND * test/testsock.c (test_freebind): Add test case. Submitted by: Ashley GC, jkaluza, jorton git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1733451 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_sockaddr_info_copy(), for making a deep copy of antrawick2014-04-131-0/+9
| | | | | | | | | | apr_sockaddr_t into a specified pool. Submitted by: Yann Ylavic <ylavic.dev gmail.com> Reviewed by: trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1587045 13f79535-47bb-0310-9956-ffa450edef68
* mention non-portability of an odd apr_getnameinfo() usetrawick2013-12-061-0/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1548575 13f79535-47bb-0310-9956-ffa450edef68
* add apr_sockaddr_is_wildcard() APItrawick2013-11-121-0/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1541061 13f79535-47bb-0310-9956-ffa450edef68
* minor corrections to apr_socket_sendv() documentationtrawick2013-08-041-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1510354 13f79535-47bb-0310-9956-ffa450edef68
* add a warning about thread safetysf2013-03-231-0/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1460241 13f79535-47bb-0310-9956-ffa450edef68
* apr_socket_accept_filter(): The 2nd and 3rd arguments are now trawick2012-11-031-2/+2
| | | | | | | const char * instead of char *. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1405402 13f79535-47bb-0310-9956-ffa450edef68
* Add support for APR_SO_BROADCASTsf2011-10-151-0/+2
| | | | | | | | PR: 46389 Submitted by: Armin Müller <mueller itestra com> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1183693 13f79535-47bb-0310-9956-ffa450edef68
* fix extra "the" in comments and license texttrawick2011-03-231-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@1084662 13f79535-47bb-0310-9956-ffa450edef68
* Hide apr_wait_for_io_or_timeout() from public view and add insteadbjh2010-04-121-0/+10
| | | | | | | apr_socket_wait() and apr_file_pipe_wait(). git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@933338 13f79535-47bb-0310-9956-ffa450edef68
* Fixes various doxygen usage warnings and minor doxygen errors.minfrin2010-01-061-4/+5
| | | | | | | Submitted by: Neil Conway <nrc@cs.berkeley.edu> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@896382 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h,jorton2009-10-121-9/+11
| | | | | | | | | | | | | | * network_io/unix/socket_util.c (apr_socket_atreadeof): Renamed from apr_socket_is_connected; adjusted to return an apr_status_t error code, and pass an "at EOF" flag via an output parameter. * test/testsock.c (test_atreadeof): Renamed from test_is_connected, adjusted for new API. Submitted by: jorton, rpluem git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@824500 13f79535-47bb-0310-9956-ffa450edef68
* * Improve the documentation even furtherrpluem2009-10-071-3/+3
| | | | | | | Reviewed by: jim git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@822892 13f79535-47bb-0310-9956-ffa450edef68
* * Improve the documentationrpluem2009-10-061-1/+8
| | | | | | | Suggested by: jorton git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@822431 13f79535-47bb-0310-9956-ffa450edef68
* * Add apr_socket_is_connected to detect whether the remote side of a socketrpluem2009-10-041-0/+6
| | | | | | | | | is still open. The origin of apr_socket_is_connected is r473278 from http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/proxy_util.c in httpd. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@821524 13f79535-47bb-0310-9956-ffa450edef68
* Fix copy/paste typomturk2009-02-191-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@745764 13f79535-47bb-0310-9956-ffa450edef68
* Enable unix domain (AF_UNIX) sockets if supported by the OSmturk2009-02-191-0/+34
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@745763 13f79535-47bb-0310-9956-ffa450edef68
* Revert sockaddr.c all the way back to r428317, and discardwrowe2007-12-151-4/+0
| | | | | | | | | the IPv4 address resolution for APR_INET6 sockaddr resolution, per Joe's objection and no other interest. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@604389 13f79535-47bb-0310-9956-ffa450edef68
* Propose an API and it's explicit meaning.wrowe2007-12-121-0/+4
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@603434 13f79535-47bb-0310-9956-ffa450edef68
* Add some documentationdreid2007-02-171-2/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@508781 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h: Avoid inappropriate use of the wordjorton2006-11-291-3/+6
| | | | | | | "interface". git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@480497 13f79535-47bb-0310-9956-ffa450edef68
* Fixes for the implementation, documentation and test case forjorton2006-10-251-1/+5
| | | | | | | | | | | | | | | | | apr_socket_recvfrom(); * network_io/unix/sendrecv.c (apr_socket_recvfrom): Reset the socklen argument correctly before calling recvfrom. On success, update all the sockaddr variables for the address returned, not just the port. * include/apr_network_io.h (apr_socket_recvfrom): Document a little better. * test/testsockets.c (sendto_receivefrom): Check that the address is set correctly. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@467600 13f79535-47bb-0310-9956-ffa450edef68
* Fix the typo.jorton2006-08-031-1/+1
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.jorton2006-08-031-6/+6
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* - remove what appears to be a copy/paste error from docs indreid2006-06-221-1/+0
| | | | | | | | | network_io - add details about ranges of status numbers used by apr git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@416407 13f79535-47bb-0310-9956-ffa450edef68
* Documentation Clarificationianh2006-04-191-1/+1
| | | | | | | Submitted by: Andreas Fester afester _at_ apache.org git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@395439 13f79535-47bb-0310-9956-ffa450edef68
* Fix handling of %pI with psprintf; the psprintf implementation assumesjorton2005-09-081-0/+9
| | | | | | | | | | | | | | | | | | | that the vformatter code will not palloc. * include/apr_network_io.h (apr_sockaddr_ip_getbuf): Declare new function. * network_io/unix/sockaddr.c (apr_sockaddr_ip_getbuf): Rewrite of apr_sockaddr_ip_get, taking a buffer argument. (apr_sockaddr_ip_get): Reimplement using apr_sockaddr_ip_getbuf. * strings/apr_snprintf.c (conv_apr_sockaddr): Use apr_sockaddr_ip_getbuf to avoid use of pool. * test/testsock.c (test_print_addr): New test case. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@279566 13f79535-47bb-0310-9956-ffa450edef68
* Implement pool accessor for socketsmturk2005-06-121-0/+5
| | | | | | | | There is no functional change except changing stuct mamber from cntxt to pool to be able to use the ACCESSOR macros. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@190305 13f79535-47bb-0310-9956-ffa450edef68
* * network_io/unix/multicast.c (apr_mcast_leave): Rename 'leave'jorton2005-02-151-2/+2
| | | | | | | | argument to 'addr' to fix Tru64 5.0 build, where "leave" is #defined to some weird builtin. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@153917 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.jerenkrantz2005-02-041-1/+2
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Add Support for Single Source Multicast.pquerna2005-01-101-8/+6
| | | | | | | Submitted By: Colm MacCarthaigh git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@124752 13f79535-47bb-0310-9956-ffa450edef68
* Add arguments for Single Source Multicast Support as suggested by Colm pquerna2005-01-031-2/+10
| | | | | | | | | | MacCarthaigh on dev@apr. SSM Support is not implemented, but I added it in the interest of making a single API that can be used in the future. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@123950 13f79535-47bb-0310-9956-ffa450edef68
* Adding an initial Multicast API.pquerna2005-01-021-0/+57
| | | | | | | | | | Tested On: OS X, FreeBSD, NetBSD and Linux. Needs more Platform Specific Code: Netware, Windows git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@123883 13f79535-47bb-0310-9956-ffa450edef68
* Add support for Linux's TCP_DEFER_ACCEPT. Sort of like FreeBSD's accept ↵pquerna2004-12-111-0/+4
| | | | | | filters, except defer accept isn't documented, anywhere. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@111595 13f79535-47bb-0310-9956-ffa450edef68
* * include/apr_network_io.h (apr_socket_sendfile): Documentjorton2004-12-011-1/+3
| | | | | | | | | | that the offset parameter is pass-by-reference for no reason. * include/apr_lib.h (apr_password_get): Likewise for the bufsize parameter. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@109329 13f79535-47bb-0310-9956-ffa450edef68
* add some hints about non-blocking socketstrawick2004-09-301-5/+14
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@65358 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0jerenkrantz2004-02-131-49/+10
| | | | git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* silence 2 doxygen warningsianh2003-12-291-0/+4
| | | | | | | submitted by: sander temme <sander at temmet dot net> git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64849 13f79535-47bb-0310-9956-ffa450edef68
* axe apr_sockaddr_port_set() and apr_sockaddr_port_get() from APRtrawick2003-12-051-16/+0
| | | | | | | 1.0 API git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64811 13f79535-47bb-0310-9956-ffa450edef68
* remove apr_sockaddr_ip_set() APItrawick2003-12-031-12/+1
| | | | | | | | remove comment in apr_socket_connect() documentation mentioning that the sockaddr parameter can be NULL git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64806 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_socket_type_get() for retrieving the type (e.g., stream)trawick2003-11-301-1/+8
| | | | | | | | | | of the socket. Submitted by: Philippe M. Chiasson <gozer cpan.org> Reviewed by: trawick git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64801 13f79535-47bb-0310-9956-ffa450edef68
* Getting closer to 1.0 - eliminate APR_SO_TIMEOUT and replacewrowe2003-11-201-18/+0
| | | | | | | | | | various tests with (sock->timeout > 0). Also mop up some very hard to read statements by liberally applying parens. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64778 13f79535-47bb-0310-9956-ffa450edef68
* Implement apr_socket_atmark, similar to socket_atmark except 1) it'swrowe2003-10-141-0/+9
| | | | | | | | | | | | | | portable, and 2) the return value is passed by a boolean (int) ref, with errors returned as an apr_status_t. The question is, how portable? sys/sockio.h seems sufficent for me on hp/ux, solaris, linux, osx, and this works on Win32. The Netware and OS2 implementations are best guesses. Submitted by: Jim Jagielski and William Rowe git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64684 13f79535-47bb-0310-9956-ffa450edef68
* * configure.in, build/apr_network.m4: Remove APR_INADDR_NONEjorton2003-10-011-0/+10
| | | | | | | | | | | | macro. * include/apr.hw, include/apr.hnw, include/apr.h.in: Don't define APR_INADDR_NONE here. * include/apr_network_io.h: Define APR_INADDR_NONE here. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64671 13f79535-47bb-0310-9956-ffa450edef68