VLC  4.0.0-dev
getaddrinfo.c File Reference
Include dependency graph for getaddrinfo.c:

Macros

#define _NI_MASK
 
#define _AI_MASK   (AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST)
 

Functions

int getnameinfo (const struct sockaddr *sa, socklen_t salen, char *host, int hostlen, char *serv, int servlen, int flags)
 
static int gai_error_from_herrno (void)
 
static struct addrinfo * makeaddrinfo (int af, int type, int proto, const struct sockaddr *addr, size_t addrlen, const char *canonname)
 
static struct addrinfo * makeipv4info (int type, int proto, u_long ip, u_short port, const char *name)
 
int getaddrinfo (const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res)
 

Macro Definition Documentation

◆ _AI_MASK

#define _AI_MASK   (AI_PASSIVE|AI_CANONNAME|AI_NUMERICHOST)

◆ _NI_MASK

#define _NI_MASK
Value:
(NI_NUMERICHOST|NI_NUMERICSERV|NI_NOFQDN|NI_NAMEREQD|\
NI_DGRAM)

Function Documentation

◆ gai_error_from_herrno()

static int gai_error_from_herrno ( void  )
static

Referenced by getaddrinfo().

◆ getaddrinfo()

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

◆ getnameinfo()

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

References _NI_MASK.

Referenced by vlc_getnameinfo().

◆ makeaddrinfo()

static struct addrinfo* makeaddrinfo ( int  af,
int  type,
int  proto,
const struct sockaddr *  addr,
size_t  addrlen,
const char *  canonname 
)
static

References strdup().

Referenced by makeipv4info().

◆ makeipv4info()

static struct addrinfo* makeipv4info ( int  type,
int  proto,
u_long  ip,
u_short  port,
const char *  name 
)
static

References makeaddrinfo(), and name.

Referenced by getaddrinfo().