summaryrefslogtreecommitdiff
path: root/libavformat/network.h
Commit message (Collapse)AuthorAge
* libavformat: use MSG_NOSIGNAL when applicableRémi Denis-Courmont2014-08-25
| | | | | | | If the remote end of a connection oriented socket hangs up, generating an EPIPE error is preferable over an unhandled SIGPIPE signal. Signed-off-by: Martin Storsjö <martin@martin.st>
* network.h: Add #endif comments to improve readabilityDiego Biurrun2014-01-06
|
* ff_socket: put out-of-line and fallback to fcntl() for close-on-execRémi Denis-Courmont2013-08-09
| | | | | | | This supports non-Linux systems (SOCK_CLOEXEC is non-standard) and older Linux kernels to the extent possible. Signed-off-by: Martin Storsjö <martin@martin.st>
* tcp: Use a different log message and level if there's more addresses to tryMartin Storsjö2013-08-06
| | | | | | | | | This lowers the level of warnings printed if trying to connect to a host name that provides both v6 and v4 addresses but the service only is available on the v4 address (often occurring for 'localhost', with servers that aren't v6-aware). Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Use SOCK_CLOEXEC when availableLuca Barbato2013-08-05
|
* avf: move ff_http_match_no_proxy to networkLuca Barbato2013-06-16
| | | | It is only used by network protocols.
* network: uniform ff_listen_bind and ff_listen_connectLuca Barbato2013-06-04
| | | | | Document the functions and have both use a millisecond timeout and check for interrupt.
* network: factor out connect-listening codeLuca Barbato2013-06-01
| | | | | Introduce ff_listen_connect, to be shared with the other non-tcp network protocols.
* network: factor out bind-listening codeLuca Barbato2013-06-01
| | | | | Introduce ff_listen_bind, to be shared with the other non-tcp network protocols.
* network: add fallbacks for INADDR_LOOPBACK and INET_ADDRSTRLENMans Rullgard2012-10-23
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* network: #include stdint.h in network.hMans Rullgard2012-10-16
| | | | | | | This header uses various types provided by stdint.h without explicitly including it. Signed-off-by: Mans Rullgard <mans@mansr.com>
* network: Always use our version of gai_strerror on windowsMartin Storsjö2012-07-15
| | | | | | | | Even if linking directly to getaddrinfo, use our version of gai_strerror instead of the system's version. Microsoft explicitly documents that their version of gai_strerror is thread-unsafe. Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Undefine existing gai_strerror definitionsMartin Storsjö2012-07-15
| | | | | | | | | | | This avoids warnings if there already exists a definition. This is the case on windows, where the getaddrinfo isn't available and linked to (and we use our fallbacks instead, which actually try to use the proper getaddrinfo version if found at runtime), but gai_strerror still exists as a define. Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Extend the fallback gai_strerror implementation to handle more ↵Martin Storsjö2012-07-15
| | | | | | | | | error codes This is useful if a proper getaddrinfo is loaded dynamically on windows, while using the fallback implementation of gai_strerror. Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Don't redefine error codes if they already exist in errno.hRonald S. Bultje2012-06-26
| | | | | | | | Since the errno.h values don't match the error codes that winsock returns, map the winsock error codes to the errno ones, to make sure explicit checks against AVERROR(x) match. Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Include unistd.h from network.hMartin Storsjö2012-06-26
| | | | | | | | | | | This heaader is required for close() for sockets in network code. For winsock, the equivalent function is defined in the winsock2.h header. This avoids having the HAVE_UNISTD_H in all files dealing with raw sockets. Signed-off-by: Martin Storsjö <martin@martin.st>
* network: Pass pointers of the right type to get/setsockopt/ioctlsocket on ↵Martin Storsjö2012-06-19
| | | | | | | | windows This avoids warnings. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Warn about using network functions without calling ↵Martin Storsjö2011-11-07
| | | | | | | | | avformat_network_init This is to make developers aware of the fact that they will start using the new init function at some point. Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Add ff_tls_init()/deinit() that initialize OpenSSLMartin Storsjö2011-11-05
| | | | | | | If the application hasn't set up mutex callbacks, we set up our own using pthreads (or w32pthreads). Signed-off-by: Martin Storsjö <martin@martin.st>
* avformat: Split out functions from network.h to a new file, network.cMartin Storsjö2011-11-05
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* Add missing #includes to make headers self-contained.Diego Biurrun2011-06-04
| | | | This fixes 'make checkheaders'.
* Mark parameterless function declarations as 'void'.Diego Biurrun2011-05-26
|
* network: Check POLLERR and POLLHUP in ff_network_wait_fdGil Pedersen2011-04-28
| | | | | | | | Previously, the function would lead to an infinite wait (by returning AVERROR(EAGAIN)) on sockets indicating an error via either of these poll flags. Signed-off-by: Martin Storsjö <martin@martin.st>
* proto: include os_support.h in network.hLuca Barbato2011-04-07
| | | | Fix compilation on systems without poll()
* proto: factor ff_network_wait_fd and use it on udpLuca Barbato2011-04-07
| | | | | | | | Support the URL_FLAG_NONBLOCK semantic and uniform the protocol. The quick retry loop is already part of retry_transfer_wrapper. The polling routine is common to the network protocols: udp, tcp and, once merged, sctp.
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* libavformat: Remove FF_NETERRNO()Martin Storsjö2011-02-23
| | | | | | | | | | | | | | Map EAGAIN and EINTR from ff_neterrno to the normal AVERROR() error codes. Provide fallback definitions of other errno.h network errors, mapping them to the corresponding winsock errors. This eases catching these error codes in common code, without having to distinguish between FF_NETERRNO(EAGAIN) and AVERROR(EAGAIN). This fixes roundup issue 2614, unbreaking blocking network IO on windows. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Convert ff_is_multicast_address to take a struct sockaddr parameterMartin Storsjö2010-10-07
| | | | | | | | Not all users of this function will have a full struct sockaddr_storage available, and casting other sockaddrs to sockaddr_storage is wrong, while any sockaddr can be cast to a base sockaddr. Originally committed as revision 25388 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Share the is_multicast_address functionMartin Storsjö2010-10-07
| | | | | | | | The header probably isn't the right permanent place for this function, but it is quite small, and consensus seems to be that it can stay in the header for now, instead of creating a new file network.c just for this one. Originally committed as revision 25387 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move multicast address identification fallback macros to network.h from udp.cMartin Storsjö2010-10-07
| | | | Originally committed as revision 25386 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Move INET6_ADDRSTRLEN to network.h, similar to other network-related fixupsRonald S. Bultje2010-09-03
| | | | | | | for broken OSes. This is included in rtsp.h, as opposed to os_support.h. Should fix OS/2 broken build on fate. Originally committed as revision 25035 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix compile error on mingw where ETIMEDOUT is missing (because it's a WSA ↵Ronald S. Bultje2010-04-15
| | | | | | | | | error). This patch also changes FF_NETERROR() to be an AVERROR(), i.e. it is always negative, whereas it was previously positive. Originally committed as revision 22887 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Localize the #define _SVID_SOURCE needed for inet_aton() to os_support.cDavid Conrad2010-03-07
| | | | Originally committed as revision 22284 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Implement gai_strerror() for systems lacking such functionality. PatchRonald S. Bultje2010-02-08
| | | | | | by KO Myung-Hun <komh challion net>. Originally committed as revision 21692 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Use the configure check from r21351 and use it to properly define structMartin Storsjö2010-01-20
| | | | | | | | | sockaddr (in case it's not missing) so it always works on the system that we are defining it for, in a RFC-2553/3493-compliant way (i.e. containing a ss_family field). which is used in udp.c. Patch by Martin Storsjö <$firstname $firstname st>. Originally committed as revision 21352 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Provide a fallback for getnameinfo() also. Patch by Martin StorsjöMartin Storsjö2010-01-11
| | | | | | <$firstname()$firstname,st>. Originally committed as revision 21150 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Implement a fallback for struct sockaddr_storage if not available.Martin Storsjö2010-01-11
| | | | | | Patch by Martin Storsjö <$firstname()$firstname,st>. Originally committed as revision 21149 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Provide fallback implementations of getaddrinfo() and freeaddrinfo().Martin Storsjö2010-01-11
| | | | | | Patch by Martin Storsjö <$firstname()$firstname,st>. Originally committed as revision 21145 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Fix undefined preprocessor directives warnings during 'make checkheaders'.Diego Biurrun2009-01-24
| | | | Originally committed as revision 16747 to svn://svn.ffmpeg.org/ffmpeg/trunk
* cosmetics: Remove pointless period after copyright statement non-sentences.Diego Biurrun2009-01-19
| | | | Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Change semantic of CONFIG_*, HAVE_* and ARCH_*.Aurelien Jacobs2009-01-13
| | | | | | They are now always defined to either 0 or 1. Originally committed as revision 16590 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Globally rename the header inclusion guard names.Stefano Sabatini2008-08-31
| | | | | | | | | Consistently apply this rule: the guard name is obtained from the filename by stripping the leading "lib", converting '/' and '.' to '_' and uppercasing the resulting name. Guard names in the root directory have to be prefixed by "FFMPEG_". Originally committed as revision 15120 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add FFMPEG_ prefix to all multiple inclusion guards.Diego Biurrun2007-10-17
| | | | Originally committed as revision 10765 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Add initialization and cleanup functions for WinsockRamiro Polla2007-08-09
| | | | Originally committed as revision 10040 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Check for winsock2.h instead of __MINGW32__Ramiro Polla2007-08-08
| | | | Originally committed as revision 9988 to svn://svn.ffmpeg.org/ffmpeg/trunk
* initial mingw networking supportAlex Beregszaszi2007-05-15
| | | | Originally committed as revision 9029 to svn://svn.ffmpeg.org/ffmpeg/trunk
* implement ff_socket_nonblock and use it in networking codeAlex Beregszaszi2007-04-27
| | | | Originally committed as revision 8846 to svn://svn.ffmpeg.org/ffmpeg/trunk
* use ff_neterrno() and FF_NETERROR() for networking error handlingAlex Beregszaszi2007-04-27
| | | | Originally committed as revision 8845 to svn://svn.ffmpeg.org/ffmpeg/trunk
* Some more BeOS cleanup: check for arpa/inet.h; declare the prototype for ↵François Revol2007-03-23
| | | | | | inet_aton if not found; remove barpainet.h as it's not longer needed. Originally committed as revision 8488 to svn://svn.ffmpeg.org/ffmpeg/trunk
* move networking #includes into separate fileRamiro Polla2007-02-04
patch by Ramiro Polla angustia =a= arrozcru =d= no-ip =d= org Originally committed as revision 7817 to svn://svn.ffmpeg.org/ffmpeg/trunk