#include "ruby/config.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include <string.h>
#include <stddef.h>
#include "addrinfo.h"
#include "sockport.h"
Include dependency graph for getnameinfo.c:
Go to the source code of this file.
Data Structures | |
struct | sockinet |
struct | afd |
Defines | |
#define | SUCCESS 0 |
#define | ANY 0 |
#define | YES 1 |
#define | NO 0 |
#define | N_INET 0 |
#define | ENI_NOSOCKET 0 |
#define | ENI_NOSERVNAME 1 |
#define | ENI_NOHOSTNAME 2 |
#define | ENI_MEMORY 3 |
#define | ENI_SYSTEM 4 |
#define | ENI_FAMILY 5 |
#define | ENI_SALEN 6 |
Functions | |
static const char * | inet_ntop (int af, const void *addr, char *numaddr, size_t numaddr_len) |
int | getnameinfo (const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags) |
Variables | |
static struct afd | afdl [] |
#define ANY 0 |
Definition at line 78 of file getnameinfo.c.
#define ENI_FAMILY 5 |
#define ENI_MEMORY 3 |
#define ENI_NOHOSTNAME 2 |
#define ENI_NOSERVNAME 1 |
#define ENI_NOSOCKET 0 |
#define ENI_SALEN 6 |
#define ENI_SYSTEM 4 |
#define N_INET 0 |
#define NO 0 |
Definition at line 80 of file getnameinfo.c.
#define SUCCESS 0 |
Definition at line 77 of file getnameinfo.c.
#define YES 1 |
Definition at line 79 of file getnameinfo.c.
int getnameinfo | ( | const struct sockaddr * | sa, | |
socklen_t | salen, | |||
char * | host, | |||
socklen_t | hostlen, | |||
char * | serv, | |||
socklen_t | servlen, | |||
int | flags | |||
) |
Definition at line 139 of file getnameinfo.c.
References afd::a_addrlen, afd::a_af, afd::a_off, afd::a_socklen, afdl, ENI_FAMILY, ENI_MEMORY, ENI_NOHOSTNAME, ENI_NOSERVNAME, ENI_NOSOCKET, ENI_SALEN, ENI_SYSTEM, freehostent, if(), IN_CLASSA_NSHIFT, IN_EXPERIMENTAL, IN_MULTICAST, inet_ntop(), len, NI_DGRAM, NI_NAMEREQD, NI_NOFQDN, NI_NUMERICHOST, NI_NUMERICSERV, NULL, SA_LEN, snprintf, strchr(), SUCCESS, u_long, and u_short.
static const char* inet_ntop | ( | int | af, | |
const void * | addr, | |||
char * | numaddr, | |||
size_t | numaddr_len | |||
) | [static] |