VLC  3.0.15
Modules | Files | Macros | Functions
Collaboration diagram for Networking:

Modules

 Internet sockets
 
 Transport layer sockets
 Network stream abstraction.
 

Files

file  vlc_network.h
 

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)
 
static uint16_t net_GetPort (const struct sockaddr *addr)
 
static void net_SetPort (struct sockaddr *addr, uint16_t 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

< Unspecified error

References NI_MAXNUMERICHOST, VLC_EGENERIC, and vlc_getnameinfo().

Referenced by httpd_ServerIP().

◆ net_GetPort()

static uint16_t net_GetPort ( const struct sockaddr *  addr)
inlinestatic

◆ net_GetSockAddress()

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

< Unspecified error

References NI_MAXNUMERICHOST, VLC_EGENERIC, and vlc_getnameinfo().

Referenced by httpd_ClientDestroy().

◆ net_SetPort()

static void net_SetPort ( struct sockaddr *  addr,
uint16_t  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 *  ,
unsigned  ,
const struct addrinfo *  ,
struct addrinfo **   
)

◆ vlc_getnameinfo()

int vlc_getnameinfo ( const struct sockaddr *  ,
int  ,
char *  ,
int  ,
int *  ,
int   
)

◆ 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 (not used)
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, environ, fields, get_env(), getenv(), vlc_url_t::psz_password, release_env(), strdup(), vlc_close(), vlc_pipe(), VLC_UNUSED, vlc_uri_compose(), vlc_UrlClean(), and vlc_UrlParse().

Referenced by vlc_http_proxy_find().