libavformat/network.h File Reference

#include <errno.h>
#include "config.h"
#include "libavutil/error.h"
#include "os_support.h"
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>

Go to the source code of this file.

Data Structures

struct  sockaddr_storage
struct  addrinfo

Defines

#define ff_neterrno()   AVERROR(errno)
#define EAI_AGAIN   2
#define EAI_BADFLAGS   3
#define EAI_FAIL   4
#define EAI_FAMILY   5
#define EAI_MEMORY   6
#define EAI_NODATA   7
#define EAI_NONAME   8
#define EAI_SERVICE   9
#define EAI_SOCKTYPE   10
#define AI_PASSIVE   1
#define AI_CANONNAME   2
#define AI_NUMERICHOST   4
#define NI_NOFQDN   1
#define NI_NUMERICHOST   2
#define NI_NAMERQD   4
#define NI_NUMERICSERV   8
#define NI_DGRAM   16
#define getaddrinfo   ff_getaddrinfo
#define freeaddrinfo   ff_freeaddrinfo
#define getnameinfo   ff_getnameinfo
#define gai_strerror   ff_gai_strerror
#define INET6_ADDRSTRLEN   INET_ADDRSTRLEN
#define IN_MULTICAST(a)   ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000)
#define IN6_IS_ADDR_MULTICAST(a)   (((uint8_t *) (a))[0] == 0xff)

Functions

int ff_socket_nonblock (int socket, int enable)
int ff_network_init (void)
void ff_network_close (void)
void ff_tls_init (void)
void ff_tls_deinit (void)
int ff_network_wait_fd (int fd, int write)
int ff_inet_aton (const char *str, struct in_addr *add)
int ff_getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
void ff_freeaddrinfo (struct addrinfo *res)
int ff_getnameinfo (const struct sockaddr *sa, int salen, char *host, int hostlen, char *serv, int servlen, int flags)
const char * ff_gai_strerror (int ecode)
int ff_is_multicast_address (struct sockaddr *addr)

Variables

int ff_network_inited_globally


Define Documentation

#define AI_CANONNAME   2

Definition at line 146 of file network.h.

#define AI_NUMERICHOST   4

Definition at line 150 of file network.h.

Referenced by ff_url_join(), get_sockaddr(), tls_open(), and udp_set_multicast_sources().

#define AI_PASSIVE   1

Definition at line 142 of file network.h.

Referenced by tcp_open(), and udp_socket_create().

#define EAI_AGAIN   2

Definition at line 114 of file network.h.

#define EAI_BADFLAGS   3

Definition at line 117 of file network.h.

#define EAI_FAIL   4

Definition at line 120 of file network.h.

#define EAI_FAMILY   5

Definition at line 123 of file network.h.

#define EAI_MEMORY   6

Definition at line 126 of file network.h.

#define EAI_NODATA   7

Definition at line 129 of file network.h.

#define EAI_NONAME   8

Definition at line 132 of file network.h.

#define EAI_SERVICE   9

Definition at line 135 of file network.h.

#define EAI_SOCKTYPE   10

Definition at line 138 of file network.h.

 
#define ff_neterrno (  )     AVERROR(errno)

#define freeaddrinfo   ff_freeaddrinfo

#define gai_strerror   ff_gai_strerror

Definition at line 187 of file network.h.

Referenced by sctp_open(), tcp_open(), udp_port(), and udp_resolve_host().

#define getaddrinfo   ff_getaddrinfo

#define getnameinfo   ff_getnameinfo

Definition at line 182 of file network.h.

Referenced by udp_port().

#define IN6_IS_ADDR_MULTICAST (  )     (((uint8_t *) (a))[0] == 0xff)

Definition at line 198 of file network.h.

Referenced by ff_is_multicast_address().

#define IN_MULTICAST (  )     ((((uint32_t)(a)) & 0xf0000000) == 0xe0000000)

Definition at line 195 of file network.h.

Referenced by ff_is_multicast_address().

#define INET6_ADDRSTRLEN   INET_ADDRSTRLEN

Definition at line 191 of file network.h.

#define NI_DGRAM   16

Definition at line 170 of file network.h.

#define NI_NAMERQD   4

Definition at line 162 of file network.h.

#define NI_NOFQDN   1

Definition at line 154 of file network.h.

#define NI_NUMERICHOST   2

Definition at line 158 of file network.h.

#define NI_NUMERICSERV   8

Definition at line 166 of file network.h.

Referenced by udp_port().


Function Documentation

void ff_freeaddrinfo ( struct addrinfo res  ) 

const char* ff_gai_strerror ( int  ecode  ) 

int ff_getaddrinfo ( const char *  node,
const char *  service,
const struct addrinfo hints,
struct addrinfo **  res 
)

int ff_getnameinfo ( const struct sockaddr *  sa,
int  salen,
char *  host,
int  hostlen,
char *  serv,
int  servlen,
int  flags 
)

int ff_inet_aton ( const char *  str,
struct in_addr *  add 
)

Referenced by resolve_host().

int ff_is_multicast_address ( struct sockaddr *  addr  ) 

Definition at line 182 of file network.c.

Referenced by ff_udp_set_remote_url().

void ff_network_close ( void   ) 

int ff_network_init ( void   ) 

int ff_network_wait_fd ( int  fd,
int  write 
)

Definition at line 144 of file network.c.

Referenced by tcp_read(), tcp_write(), udp_read(), and udp_write().

int ff_socket_nonblock ( int  socket,
int  enable 
)

void ff_tls_deinit ( void   ) 

Definition at line 101 of file network.c.

Referenced by avformat_network_deinit(), tls_close(), and tls_open().

void ff_tls_init ( void   ) 

Definition at line 69 of file network.c.

Referenced by avformat_network_init(), and tls_open().


Variable Documentation

Definition at line 124 of file network.c.

Referenced by avformat_network_init().


Generated on Fri Oct 26 02:50:11 2012 for FFmpeg by  doxygen 1.5.8