21 #ifndef AVFORMAT_NETWORK_H 22 #define AVFORMAT_NETWORK_H 40 #ifndef EPROTONOSUPPORT 41 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT 44 #define ETIMEDOUT WSAETIMEDOUT 47 #define ECONNREFUSED WSAECONNREFUSED 50 #define EINPROGRESS WSAEINPROGRESS 53 #define getsockopt(a, b, c, d, e) getsockopt(a, b, c, (char*) d, e) 54 #define setsockopt(a, b, c, d, e) setsockopt(a, b, c, (const char*) d, e) 58 #include <sys/types.h> 59 #include <sys/socket.h> 60 #include <netinet/in.h> 63 #define ff_neterrno() AVERROR(errno) 67 #include <arpa/inet.h> 97 int ff_inet_aton (
const char * str,
struct in_addr * add);
99 #if !HAVE_STRUCT_SOCKADDR_STORAGE 101 #if HAVE_STRUCT_SOCKADDR_SA_LEN 113 #if !HAVE_STRUCT_ADDRINFO 131 #define EAI_BADFLAGS 3 149 #define EAI_SERVICE 9 152 #define EAI_SOCKTYPE 10 160 #define AI_CANONNAME 2 163 #ifndef AI_NUMERICHOST 164 #define AI_NUMERICHOST 4 171 #ifndef NI_NUMERICHOST 172 #define NI_NUMERICHOST 2 179 #ifndef NI_NUMERICSERV 180 #define NI_NUMERICSERV 8 187 #if !HAVE_GETADDRINFO 192 char *host,
int hostlen,
193 char *serv,
int servlen,
int flags);
194 #define getaddrinfo ff_getaddrinfo 195 #define freeaddrinfo ff_freeaddrinfo 196 #define getnameinfo ff_getnameinfo 198 #if !HAVE_GETADDRINFO || HAVE_WINSOCK2_H 201 #define gai_strerror ff_gai_strerror 204 #ifndef INADDR_LOOPBACK 205 #define INADDR_LOOPBACK 0x7f000001 208 #ifndef INET_ADDRSTRLEN 209 #define INET_ADDRSTRLEN 16 212 #ifndef INET6_ADDRSTRLEN 213 #define INET6_ADDRSTRLEN INET_ADDRSTRLEN 217 #define IN_MULTICAST(a) ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000) 219 #ifndef IN6_IS_ADDR_MULTICAST 220 #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)
int ff_network_wait_fd_timeout(int fd, int write, int64_t timeout, AVIOInterruptCB *int_cb)
This works similarly to ff_network_wait_fd, but waits up to 'timeout' microseconds Uses ff_network_wa...
miscellaneous OS support macros and functions.
void ff_network_close(void)
Callback for checking whether to abort blocking functions.
const AVIOInterruptCB int_cb
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