Go to the documentation of this file.
21 #ifndef AVFORMAT_NETWORK_H
22 #define AVFORMAT_NETWORK_H
41 #ifndef EPROTONOSUPPORT
42 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
45 #define ETIMEDOUT WSAETIMEDOUT
48 #define ECONNREFUSED WSAECONNREFUSED
51 #define EINPROGRESS WSAEINPROGRESS
54 #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
55 #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)
59 #include <sys/types.h>
60 #include <sys/socket.h>
61 #include <netinet/in.h>
64 #define ff_neterrno() AVERROR(errno)
68 #include <arpa/inet.h>
98 int ff_inet_aton (
const char * str,
struct in_addr * add);
100 #if !HAVE_STRUCT_SOCKADDR_STORAGE
102 #if HAVE_STRUCT_SOCKADDR_SA_LEN
115 #define MSG_NOSIGNAL 0
118 #if !HAVE_STRUCT_ADDRINFO
136 #define EAI_BADFLAGS 3
154 #define EAI_SERVICE 9
157 #define EAI_SOCKTYPE 10
165 #define AI_CANONNAME 2
168 #ifndef AI_NUMERICHOST
169 #define AI_NUMERICHOST 4
176 #ifndef NI_NUMERICHOST
177 #define NI_NUMERICHOST 2
184 #ifndef NI_NUMERICSERV
185 #define NI_NUMERICSERV 8
192 #if !HAVE_GETADDRINFO
197 char *host,
int hostlen,
198 char *serv,
int servlen,
int flags);
199 #define getaddrinfo ff_getaddrinfo
200 #define freeaddrinfo ff_freeaddrinfo
201 #define getnameinfo ff_getnameinfo
204 #if !HAVE_GETADDRINFO || HAVE_WINSOCK2_H
207 #define gai_strerror ff_gai_strerror
210 #ifndef INADDR_LOOPBACK
211 #define INADDR_LOOPBACK 0x7f000001
214 #ifndef INET_ADDRSTRLEN
215 #define INET_ADDRSTRLEN 16
218 #ifndef INET6_ADDRSTRLEN
219 #define INET6_ADDRSTRLEN INET_ADDRSTRLEN
223 #define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000)
225 #ifndef IN6_IS_ADDR_MULTICAST
226 #define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
231 #define POLLING_TIME 100
246 socklen_t addrlen,
int timeout,
265 socklen_t addrlen,
int timeout,