Ruby 2.1.5p273(2014-11-13revision48405)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Macros
sockport.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | VALIDATE_SOCKLEN(addr, len) ((void)(addr), (void)(len), 1)
#define | SET_SA_LEN(sa, len) (void)(len)
#define | SET_SIN_LEN(sa, len) SET_SA_LEN((struct sockaddr *)(sa), (len))
#define | SET_SIN6_LEN(sa, len) SET_SA_LEN((struct sockaddr *)(sa), (len))
#define | INIT_SOCKADDR(addr, family, len)
#define | INIT_SOCKADDR_IN(addr, len)
#define | INIT_SOCKADDR_IN6(addr, len)
#define | IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000)
#define | IN_MULTICAST(i) IN_CLASSD(i)
#define | IN_EXPERIMENTAL(i) ((((long)(i)) & 0xe0000000) == 0xe0000000)
#define | IN_CLASSA_NSHIFT 24
#define | IN_LOOPBACKNET 127
#define | AF_UNSPEC 0
#define | PF_UNSPEC AF_UNSPEC
#define | PF_INET AF_INET

## Macro Definition Documentation

#define AF_UNSPEC 0

Definition at line 101 of file sockport.h.

Referenced by get_addr(), get_afamily(), getifaddrs(), init_constants(), open_ifs_socket(), rsock_addrinfo(), rsock_family_to_int(), rsock_getfamily(), rsock_inspect_sockaddr(), sockopt_inspect(), and sockopt_s_linger().

#define IN_CLASSA_NSHIFT 24

Definition at line 93 of file sockport.h.

Referenced by getaddrinfo(), and getnameinfo().

#define IN_CLASSD | ( |  | i | ) | (((long)(i) & 0xf0000000) == 0xe0000000)

Definition at line 84 of file sockport.h.

#define IN_EXPERIMENTAL | ( |  | i | ) | ((((long)(i)) & 0xe0000000) == 0xe0000000)

Definition at line 89 of file sockport.h.

Referenced by getaddrinfo(), and getnameinfo().

#define IN_LOOPBACKNET 127

Definition at line 97 of file sockport.h.

Referenced by getaddrinfo().

#define IN_MULTICAST | ( |  | i | ) | IN_CLASSD(i)

Definition at line 85 of file sockport.h.

Referenced by getaddrinfo(), and getnameinfo().

#define INIT_SOCKADDR | ( |  | addr,
|  |  | family,
|  |  | len
| ) |  |

Value:
do { \
struct sockaddr *init_sockaddr_ptr = (addr); \
socklen_t init_sockaddr_len = (len); \
memset(init_sockaddr_ptr, 0, init_sockaddr_len); \
init_sockaddr_ptr->sa_family = (family); \
SET_SA_LEN(init_sockaddr_ptr, init_sockaddr_len); \
} while (0)
SET_SA_LEN
#define SET_SA_LEN(sa, len)
Definition: sockport.h:22
socklen_t
int socklen_t
Definition: getaddrinfo.c:84

Definition at line 38 of file sockport.h.

#define INIT_SOCKADDR_IN | ( |  | addr,
|  |  | len
| ) |  |

Value:
do { \
struct sockaddr_in *init_sockaddr_ptr = (addr); \
socklen_t init_sockaddr_len = (len); \
memset(init_sockaddr_ptr, 0, init_sockaddr_len); \
init_sockaddr_ptr->sin_family = AF_INET; \
SET_SIN_LEN(init_sockaddr_ptr, init_sockaddr_len); \
} while (0)
socklen_t
int socklen_t
Definition: getaddrinfo.c:84
SET_SIN_LEN
#define SET_SIN_LEN(sa, len)
Definition: sockport.h:29

Definition at line 47 of file sockport.h.

Referenced by make_inetaddr(), and numeric_getaddrinfo().

#define INIT_SOCKADDR_IN6 | ( |  | addr,
|  |  | len
| ) |  |

Value:
do { \
struct sockaddr_in6 *init_sockaddr_ptr = (addr); \
socklen_t init_sockaddr_len = (len); \
memset(init_sockaddr_ptr, 0, init_sockaddr_len); \
init_sockaddr_ptr->sin6_family = AF_INET6; \
SET_SIN6_LEN(init_sockaddr_ptr, init_sockaddr_len); \
} while (0)
SET_SIN6_LEN
#define SET_SIN6_LEN(sa, len)
Definition: sockport.h:35
socklen_t
int socklen_t
Definition: getaddrinfo.c:84

Definition at line 56 of file sockport.h.

Referenced by numeric_getaddrinfo().

#define PF_INET AF_INET

Definition at line 109 of file sockport.h.

Referenced by addrinfo_inspect(), getaddrinfo(), init_constants(), numeric_getaddrinfo(), rsock_family_to_int(), and socketpair_internal().

#define PF_UNSPEC AF_UNSPEC

Definition at line 105 of file sockport.h.

Referenced by addrinfo_initialize(), addrinfo_s_ip(), addrinfo_s_tcp(), addrinfo_s_udp(), call_getaddrinfo(), getaddrinfo(), init_constants(), numeric_getaddrinfo(), rsock_family_to_int(), rsock_syserr_fail_sockaddr(), sock_s_getaddrinfo(), and sock_s_getnameinfo().

#define SET_SA_LEN | ( |  | sa,
|  |  | len
| ) |  | (void)(len)

Definition at line 22 of file sockport.h.

#define SET_SIN6_LEN | ( |  | sa,
|  |  | len
| ) |  | SET_SA_LEN((struct sockaddr *)(sa), (len))

Definition at line 35 of file sockport.h.

#define SET_SIN_LEN | ( |  | sa,
|  |  | len
| ) |  | SET_SA_LEN((struct sockaddr *)(sa), (len))

Definition at line 29 of file sockport.h.

#define VALIDATE_SOCKLEN | ( |  | addr,
|  |  | len
| ) |  | ((void)(addr), (void)(len), 1)

Definition at line 16 of file sockport.h.

Referenced by getnameinfo(), and sock_s_getnameinfo().