VLC  4.0.0-dev
Modules | Files | Macros | Functions
Collaboration diagram for Networking:

Modules

 Internet sockets
 
 Transport layer sockets
 Network stream abstraction.
 
 HTTP
 Hyper-Text Transfer Protocol.
 
 Session Description Protocol
 

Files

file  vlc_network.h
 Definitions for sockets and low-level networking.
 

Macros

#define NI_MAXNUMERICHOST   64
 
#define AI_NUMERICSERV   0
 
#define AI_IDN   0 /* GNU/libc extension */
 

Functions

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

Macro Definition Documentation

◆ AI_IDN

#define AI_IDN   0 /* GNU/libc extension */

◆ AI_NUMERICSERV

#define AI_NUMERICSERV   0

◆ NI_MAXNUMERICHOST

#define NI_MAXNUMERICHOST   64

Function Documentation

◆ net_GetPeerAddress()

static int net_GetPeerAddress ( int  fd,
char *  address,
int *  port 
)
inlinestatic

◆ net_GetSockAddress()

static int net_GetSockAddress ( int  fd,
char *  address,
int *  port 
)
inlinestatic

◆ net_SockAddrIsMulticast()

static bool net_SockAddrIsMulticast ( const struct sockaddr *  addr,
socklen_t  len 
)
inlinestatic

◆ vlc_getaddrinfo()

int vlc_getaddrinfo ( const char *  node,
unsigned  port,
const struct addrinfo *  hints,
struct addrinfo **  res 
)

Resolves a host name to a list of socket addresses (like getaddrinfo()).

Parameters
nodehost name to resolve (encoded as UTF-8), or NULL
i_portport number for the socket addresses
p_hintsparameters (see getaddrinfo() manual page)
respointer set to the resulting chained list.
Returns
0 on success, a getaddrinfo() error otherwise. On failure, *res is undefined. On success, it must be freed with freeaddrinfo().

References getaddrinfo().

Referenced by net_ConnectDgram(), net_Listen(), net_ListenSingle(), net_OpenDgram(), and sout_AnnounceRegisterSDP().

◆ vlc_getaddrinfo_i11e()

int vlc_getaddrinfo_i11e ( const char *  name,
unsigned  port,
const struct addrinfo *  hints,
struct addrinfo **  res 
)

◆ vlc_getnameinfo()

int vlc_getnameinfo ( const struct sockaddr *  sa,
int  salen,
char *  host,
int  hostlen,
int *  portnum,
int  flags 
)

◆ vlc_getProxyUrl()

char* vlc_getProxyUrl ( const char *  url)

Determines the network proxy server to use (if any).

This function fetch the Android proxy using the System.getProperty() method with "http.proxyHost" and "http.proxyPort" keys. This is working only for Android 4.0 and after.

Parameters
urlabsolute URL for which to get the proxy server (unused)
Returns
proxy URL, NULL if no proxy or error
Parameters
urlabsolute URL for which to get the proxy server
Returns
proxy URL, NULL if no proxy or error

References asprintf(), config_GetPsz(), fields, get_env(), getenv(), vlc_url_t::psz_password, release_env(), strdup(), var, vlc_close(), vlc_pipe(), vlc_spawnp(), VLC_UNUSED, vlc_uri_compose(), vlc_UrlClean(), vlc_UrlParse(), and vlc_waitpid().

Referenced by vlc_http_proxy_find().