KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
netdb.h File Reference

Network address database functionality. More...

#include <sys/cdefs.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <inttypes.h>

Go to the source code of this file.

Data Structures

struct  hostent
 Network host entry. More...
 
struct  addrinfo
 Network address information structure. More...
 

Macros

#define h_addr   h_addr_list[0]
 Primary network address.
 
#define HOST_NOT_FOUND   1
 Hostname not found.
 
#define TRY_AGAIN   2
 Try the request again.
 
#define NO_RECOVERY   3
 A non-recoverable error.
 
#define NO_DATA   4
 Host found, but no data.
 
#define EAI_AGAIN   1
 Try the request again.
 
#define EAI_BADFLAGS   2
 Invalid hint flags.
 
#define EAI_FAIL   3
 A non-recoverable error.
 
#define EAI_FAMILY   4
 Invalid address family.
 
#define EAI_MEMORY   5
 Memory allocation error.
 
#define EAI_NONAME   6
 Hostname not found.
 
#define EAI_SERVICE   7
 Invalid service value.
 
#define EAI_SOCKTYPE   8
 Invalid socket type.
 
#define EAI_SYSTEM   9
 System error, check errno.
 
#define EAI_OVERFLOW   10
 Argument buffer overflow.
 
#define AI_PASSIVE   0x00000001
 Address intended for bind().
 
#define AI_CANONNAME   0x00000002
 Request canonical name.
 
#define AI_NUMERICHOST   0x00000004
 Inhibit host resolution.
 
#define AI_NUMERICSERV   0x00000008
 Inhibit service resolution.
 
#define AI_V4MAPPED   0x00000010
 Return v4-mapped IPv6 addrs.
 
#define AI_ALL   0x00000020
 Query for both IPv4 and IPv6.
 
#define AI_ADDRCONFIG   0x00000040
 Only query for IPv4/IPv6 addrs the system has a valid addr.
 

Functions

void freeaddrinfo (struct addrinfo *ai)
 Free an address information structure returned by getaddrinfo().
 
int getaddrinfo (const char *nodename, const char *servname, const struct addrinfo *hints, struct addrinfo **res)
 Get information about a specified address.
 
struct hostentgethostbyname (const char *name)
 Look up a host by its name.
 
struct hostentgethostbyname2 (const char *name, int af)
 Look up a host by its name and address family.
 

Variables

int h_errno
 Error value for gethostbyname().
 

Detailed Description

Network address database functionality.

This file contains functions related to network address lookups, usually performed through DNS.

Author
Lawrence Sebald

Macro Definition Documentation

◆ h_addr

#define h_addr   h_addr_list[0]

Primary network address.