VLC  4.0.0-dev
Macros | Functions

Definitions for sockets and low-level networking. More...

Include dependency graph for vlc_network.h:

Go to the source code of this file.

Macros

#define net_errno   errno
 
#define net_Close(fd)   ((void)vlc_close(fd))
 
#define net_Connect(a, b, c, d, e)   net_Connect(VLC_OBJECT(a), b, c, d, e)
 
#define net_ListenTCP(a, b, c)
 
#define net_ConnectTCP(a, b, c)   net_ConnectTCP(VLC_OBJECT(a), b, c)
 
#define net_Accept(a, b)    net_Accept(VLC_OBJECT(a), b)
 
#define net_ConnectDgram(a, b, c, d, e)    net_ConnectDgram(VLC_OBJECT(a), b, c, d, e)
 
#define net_OpenDgram(a, b, c, d, e, g)    net_OpenDgram(VLC_OBJECT(a), b, c, d, e, g)
 
#define net_Read(a, b, c, d)   net_Read(VLC_OBJECT(a),b,c,d)
 
#define net_Write(a, b, c, d)   net_Write(VLC_OBJECT(a),b,c,d)
 
#define NI_MAXNUMERICHOST   64
 
#define AI_NUMERICSERV   0
 
#define AI_IDN   0 /* GNU/libc extension */
 

Functions

int vlc_socket (int pf, int type, int proto, bool nonblock)
 Creates a socket file descriptor. More...
 
int vlc_socketpair (int pf, int type, int proto, int fds[2], bool nonblock)
 Creates a pair of socket file descriptors. More...
 
int vlc_accept (int lfd, struct sockaddr *addr, socklen_t *alen, bool nonblock)
 Accepts an inbound connection request on a listening socket. More...
 
ssize_t vlc_send (int fd, const void *buf, size_t buflen, int flags)
 Sends data. More...
 
ssize_t vlc_sendto (int fd, const void *buf, size_t buflen, int flags, const struct sockaddr *dst, socklen_t dstlen)
 Sends data to a peer. More...
 
ssize_t vlc_sendmsg (int fd, const struct msghdr *msg, int flags)
 Sends a socket message. More...
 
int net_Socket (vlc_object_t *obj, int family, int socktype, int proto)
 
int net_Connect (vlc_object_t *p_this, const char *psz_host, int i_port, int socktype, int protocol)
 
int * net_Listen (vlc_object_t *p_this, const char *psz_host, unsigned i_port, int socktype, int protocol)
 
int net_ConnectTCP (vlc_object_t *obj, const char *host, int port)
 
int net_Accept (vlc_object_t *obj, int *fds)
 Accepts an new connection on a set of listening sockets. More...
 
int net_ConnectDgram (vlc_object_t *p_this, const char *psz_host, unsigned i_port, int hlim, int proto)
 
static int net_ConnectUDP (vlc_object_t *obj, const char *host, unsigned port, int hlim)
 
int net_OpenDgram (vlc_object_t *p_this, const char *psz_bind, unsigned i_bind, const char *psz_server, unsigned i_server, int proto)
 
static int net_ListenUDP1 (vlc_object_t *obj, const char *host, unsigned port)
 
void net_ListenClose (int *fd)
 
int net_SetCSCov (int fd, int sendcov, int recvcov)
 net_SetCSCov: Sets the send and receive checksum coverage of a socket: More...
 
ssize_t net_Read (vlc_object_t *p_this, int fd, void *p_data, size_t i_data)
 Reads data from a socket. More...
 
ssize_t net_Write (vlc_object_t *p_this, int fd, const void *p_data, size_t i_data)
 Writes data to a socket. More...
 
int vlc_close (int)
 Closes a file descriptor. More...
 
int vlc_getnameinfo (const struct sockaddr *, int, char *, int, int *, int)
 
int vlc_getaddrinfo (const char *, unsigned, const struct addrinfo *, struct addrinfo **)
 Resolves a host name to a list of socket addresses (like getaddrinfo()). More...
 
int vlc_getaddrinfo_i11e (const char *, unsigned, const struct addrinfo *, struct addrinfo **)
 
static bool net_SockAddrIsMulticast (const struct sockaddr *addr, socklen_t len)
 
static int net_GetSockAddress (int fd, char *address, int *port)
 
static int net_GetPeerAddress (int fd, char *address, int *port)
 
char * vlc_getProxyUrl (const char *)
 Determines the network proxy server to use (if any). More...
 

Detailed Description

Definitions for sockets and low-level networking.