|
Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
#include "ruby/config.h"#include <sys/types.h>#include <sys/param.h>#include <sys/socket.h>#include <netinet/in.h>#include <netdb.h>#include <unistd.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <stddef.h>#include <ctype.h>#include "addrinfo.h"#include "sockport.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 | PTON_MAX 4 |
| #define | GET_CANONNAME(ai, str) |
| #define | GET_AI(ai, afd, addr, port) |
| #define | ERR(err) { error = (err); goto bad; } |
Typedefs | |
| typedef int | socklen_t |
Functions | |
| char * | gai_strerror (int ecode) |
| void | freeaddrinfo (struct addrinfo *ai) |
| int | getaddrinfo (const char *hostname, const char *servname, const struct addrinfo *hints, struct addrinfo **res) |
| #define ANY 0 |
Definition at line 90 of file getaddrinfo.c.
Definition at line 200 of file getaddrinfo.c.
| #define GET_AI | ( | ai, | |
| afd, | |||
| addr, | |||
| port | |||
| ) |
Definition at line 182 of file getaddrinfo.c.
| #define GET_CANONNAME | ( | ai, | |
| str | |||
| ) |
Definition at line 172 of file getaddrinfo.c.
| #define N_INET 0 |
| #define NO 0 |
Definition at line 92 of file getaddrinfo.c.
| #define PTON_MAX 4 |
Definition at line 142 of file getaddrinfo.c.
| #define SUCCESS 0 |
Definition at line 89 of file getaddrinfo.c.
| #define YES 1 |
Definition at line 91 of file getaddrinfo.c.
Definition at line 83 of file getaddrinfo.c.
| void freeaddrinfo | ( | struct addrinfo * | ai | ) |
Definition at line 216 of file getaddrinfo.c.
References addrinfo::ai_canonname, addrinfo::ai_next, free, and NULL.
| char * gai_strerror | ( | int | ecode | ) |
Definition at line 207 of file getaddrinfo.c.
References EAI_MAX.
Referenced by rsock_raise_socket_error().
| int getaddrinfo | ( | const char * | hostname, |
| const char * | servname, | ||
| const struct addrinfo * | hints, | ||
| struct addrinfo ** | res | ||
| ) |
Definition at line 272 of file getaddrinfo.c.
References addrinfo::ai_addr, addrinfo::ai_addrlen, AI_CANONNAME, addrinfo::ai_canonname, addrinfo::ai_family, addrinfo::ai_flags, AI_MASK, addrinfo::ai_next, AI_NUMERICHOST, AI_NUMERICSERV, AI_PASSIVE, addrinfo::ai_protocol, addrinfo::ai_socktype, ANY, EAI_BADFLAGS, EAI_BADHINTS, EAI_FAIL, EAI_FAMILY, EAI_NONAME, EAI_PROTOCOL, EAI_SERVICE, EAI_SOCKTYPE, ERR, error(), free, freeaddrinfo, GET_AI, getenv, if(), IN_CLASSA_NSHIFT, IN_EXPERIMENTAL, IN_LOOPBACKNET, IN_MULTICAST, IPPROTO_TCP, IPPROTO_UDP, memcpy, NULL, PF_INET, PF_UNSPEC, PTON_MAX, SUCCESS, top, u_long, u_short, and YES.