Go to the documentation of this file.
21 #ifndef AVFORMAT_NETWORK_H
22 #define AVFORMAT_NETWORK_H
39 #ifndef EPROTONOSUPPORT
40 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
43 #define ETIMEDOUT WSAETIMEDOUT
46 #define ECONNREFUSED WSAECONNREFUSED
49 #define EINPROGRESS WSAEINPROGRESS
52 #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e)
53 #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e)
57 #include <sys/types.h>
58 #include <sys/socket.h>
59 #include <netinet/in.h>
62 #define ff_neterrno() AVERROR(errno)
66 #include <arpa/inet.h>
84 int ff_inet_aton (
const char * str,
struct in_addr * add);
86 #if !HAVE_STRUCT_SOCKADDR_STORAGE
88 #if HAVE_STRUCT_SOCKADDR_SA_LEN
100 #if !HAVE_STRUCT_ADDRINFO
118 #define EAI_BADFLAGS 3
136 #define EAI_SERVICE 9
139 #define EAI_SOCKTYPE 10
147 #define AI_CANONNAME 2
150 #ifndef AI_NUMERICHOST
151 #define AI_NUMERICHOST 4
158 #ifndef NI_NUMERICHOST
159 #define NI_NUMERICHOST 2
166 #ifndef NI_NUMERICSERV
167 #define NI_NUMERICSERV 8
174 #if !HAVE_GETADDRINFO
179 char *host,
int hostlen,
180 char *serv,
int servlen,
int flags);
181 #define getaddrinfo ff_getaddrinfo
182 #define freeaddrinfo ff_freeaddrinfo
183 #define getnameinfo ff_getnameinfo
185 #if !HAVE_GETADDRINFO || HAVE_WINSOCK2_H
188 #define gai_strerror ff_gai_strerror
191 #ifndef INADDR_LOOPBACK
192 #define INADDR_LOOPBACK 0x7f000001
195 #ifndef INET_ADDRSTRLEN
196 #define INET_ADDRSTRLEN 16
199 #ifndef INET6_ADDRSTRLEN
200 #define INET6_ADDRSTRLEN INET_ADDRSTRLEN
204 #define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000)
206 #ifndef IN6_IS_ADDR_MULTICAST
207 #define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)