21 #ifndef AVFORMAT_NETWORK_H
22 #define AVFORMAT_NETWORK_H
34 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
35 #define ETIMEDOUT WSAETIMEDOUT
36 #define ECONNREFUSED WSAECONNREFUSED
37 #define EINPROGRESS WSAEINPROGRESS
41 #include <sys/types.h>
42 #include <sys/socket.h>
43 #include <netinet/in.h>
46 #define ff_neterrno() AVERROR(errno)
50 #include <arpa/inet.h>
68 int ff_inet_aton (
const char * str,
struct in_addr * add);
70 #if !HAVE_STRUCT_SOCKADDR_STORAGE
72 #if HAVE_STRUCT_SOCKADDR_SA_LEN
84 #if !HAVE_STRUCT_ADDRINFO
115 #define AI_CANONNAME 2
118 #ifndef AI_NUMERICHOST
119 #define AI_NUMERICHOST 4
126 #ifndef NI_NUMERICHOST
127 #define NI_NUMERICHOST 2
134 #ifndef NI_NUMERICSERV
135 #define NI_NUMERICSERV 8
142 #if !HAVE_GETADDRINFO
147 char *host,
int hostlen,
148 char *serv,
int servlen,
int flags);
150 #define getaddrinfo ff_getaddrinfo
151 #define freeaddrinfo ff_freeaddrinfo
152 #define getnameinfo ff_getnameinfo
153 #define gai_strerror ff_gai_strerror
156 #ifndef INET6_ADDRSTRLEN
157 #define INET6_ADDRSTRLEN INET_ADDRSTRLEN
161 #define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000)
163 #ifndef IN6_IS_ADDR_MULTICAST
164 #define IN6_IS_ADDR_MULTICAST(a) (((uint8_t *) (a))[0] == 0xff)
int ff_network_wait_fd(int fd, int write)
int ff_getnameinfo(const struct sockaddr *sa, int salen, char *host, int hostlen, char *serv, int servlen, int flags)
int ff_is_multicast_address(struct sockaddr *addr)
miscellaneous OS support macros and functions.
void ff_network_close(void)
const char * ff_gai_strerror(int ecode)
void ff_freeaddrinfo(struct addrinfo *res)
int ff_inet_aton(const char *str, struct in_addr *add)
int ff_socket_nonblock(int socket, int enable)
int ff_network_inited_globally
struct addrinfo * ai_next
int ff_network_init(void)
int ff_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
struct sockaddr * ai_addr