Ruby
2.5.0dev(2017-10-22revision60238)
|
#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 "rubysocket.h"
Go to the source code of this file.
Data Structures | |
struct | sockinet |
struct | afd |
Macros | |
#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 |
Typedefs | |
typedef int | socklen_t |
Functions | |
int | getnameinfo (const struct sockaddr *sa, socklen_t salen, char *host, socklen_t hostlen, char *serv, socklen_t servlen, int flags) |
#define ANY 0 |
Definition at line 82 of file getnameinfo.c.
#define ENI_FAMILY 5 |
Definition at line 118 of file getnameinfo.c.
#define ENI_MEMORY 3 |
Definition at line 116 of file getnameinfo.c.
#define ENI_NOHOSTNAME 2 |
Definition at line 115 of file getnameinfo.c.
#define ENI_NOSERVNAME 1 |
Definition at line 114 of file getnameinfo.c.
#define ENI_NOSOCKET 0 |
Definition at line 113 of file getnameinfo.c.
Referenced by getnameinfo().
#define ENI_SALEN 6 |
Definition at line 119 of file getnameinfo.c.
Referenced by getnameinfo().
#define ENI_SYSTEM 4 |
Definition at line 117 of file getnameinfo.c.
#define N_INET 0 |
#define NO 0 |
Definition at line 84 of file getnameinfo.c.
#define SUCCESS 0 |
Definition at line 81 of file getnameinfo.c.
#define YES 1 |
Definition at line 83 of file getnameinfo.c.
typedef int socklen_t |
Definition at line 74 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 122 of file getnameinfo.c.
References ENI_NOSOCKET, ENI_SALEN, len, NULL, u_long, u_short, and VALIDATE_SOCKLEN.
Referenced by rb_getnameinfo(), and rsock_inspect_sockaddr().