Ruby 2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)

Macros | Functions
constdefs.h File Reference

Go to the source code of this file.

## Macros
#define | IPPROTO_IP 0
#define | IPPROTO_ICMP 1
#define | IPPROTO_TCP 6
#define | IPPROTO_UDP 17
#define | IPPROTO_RAW 255
#define | IPPORT_RESERVED 1024
#define | IPPORT_USERRESERVED 5000
#define | INADDR_ANY 0x00000000
#define | INADDR_BROADCAST 0xffffffff
#define | INADDR_LOOPBACK 0x7F000001
#define | INADDR_UNSPEC_GROUP 0xe0000000
#define | INADDR_ALLHOSTS_GROUP 0xe0000001
#define | INADDR_MAX_LOCAL_GROUP 0xe00000ff
#define | INADDR_NONE 0xffffffff
#define | SHUT_RD 0
#define | SHUT_WR 1
#define | SHUT_RDWR 2
#define | INET_ADDRSTRLEN 16
#define | INET6_ADDRSTRLEN 46
#define | SOMAXCONN 5

## Functions
int | rsock_family_to_int (const char *str, long len, int *valp)
int | rsock_socktype_to_int (const char *str, long len, int *valp)
int | rsock_ipproto_to_int (const char *str, long len, int *valp)
int | rsock_unknown_level_to_int (const char *str, long len, int *valp)
int | rsock_ip_level_to_int (const char *str, long len, int *valp)
int | rsock_so_optname_to_int (const char *str, long len, int *valp)
int | rsock_ip_optname_to_int (const char *str, long len, int *valp)
int | rsock_tcp_optname_to_int (const char *str, long len, int *valp)
int | rsock_udp_optname_to_int (const char *str, long len, int *valp)
int | rsock_shutdown_how_to_int (const char *str, long len, int *valp)
int | rsock_scm_optname_to_int (const char *str, long len, int *valp)
ID | rsock_intern_family (int val)
ID | rsock_intern_family_noprefix (int val)
ID | rsock_intern_protocol_family (int val)
ID | rsock_intern_socktype (int val)
ID | rsock_intern_ipproto (int val)
ID | rsock_intern_iplevel (int val)
ID | rsock_intern_so_optname (int val)
ID | rsock_intern_ip_optname (int val)
ID | rsock_intern_ipv6_optname (int val)
ID | rsock_intern_tcp_optname (int val)
ID | rsock_intern_udp_optname (int val)
ID | rsock_intern_scm_optname (int val)
ID | rsock_intern_local_optname (int val)

## Macro Definition Documentation

## ◆ INADDR_ALLHOSTS_GROUP

#define INADDR_ALLHOSTS_GROUP 0xe0000001

Definition at line 768 of file constdefs.h.

## ◆ INADDR_ANY

#define INADDR_ANY 0x00000000

Definition at line 740 of file constdefs.h.

## ◆ INADDR_BROADCAST

#define INADDR_BROADCAST 0xffffffff

Definition at line 747 of file constdefs.h.

## ◆ INADDR_LOOPBACK

#define INADDR_LOOPBACK 0x7F000001

Definition at line 754 of file constdefs.h.

## ◆ INADDR_MAX_LOCAL_GROUP

#define INADDR_MAX_LOCAL_GROUP 0xe00000ff

Definition at line 775 of file constdefs.h.

## ◆ INADDR_NONE

#define INADDR_NONE 0xffffffff

Definition at line 782 of file constdefs.h.

## ◆ INADDR_UNSPEC_GROUP

#define INADDR_UNSPEC_GROUP 0xe0000000

Definition at line 761 of file constdefs.h.

## ◆ INET6_ADDRSTRLEN

#define INET6_ADDRSTRLEN 46

Definition at line 1832 of file constdefs.h.

## ◆ INET_ADDRSTRLEN

#define INET_ADDRSTRLEN 16

Definition at line 1825 of file constdefs.h.

## ◆ IPPORT_RESERVED

#define IPPORT_RESERVED 1024

Definition at line 726 of file constdefs.h.

## ◆ IPPORT_USERRESERVED

#define IPPORT_USERRESERVED 5000

Definition at line 733 of file constdefs.h.

## ◆ IPPROTO_ICMP

#define IPPROTO_ICMP 1

Definition at line 593 of file constdefs.h.

## ◆ IPPROTO_IP

#define IPPROTO_IP 0

Definition at line 586 of file constdefs.h.

## ◆ IPPROTO_RAW

#define IPPROTO_RAW 255

Definition at line 714 of file constdefs.h.

## ◆ IPPROTO_TCP

#define IPPROTO_TCP 6

Definition at line 610 of file constdefs.h.

## ◆ IPPROTO_UDP

#define IPPROTO_UDP 17

Definition at line 627 of file constdefs.h.

## ◆ SHUT_RD

#define SHUT_RD 0

Definition at line 1669 of file constdefs.h.

## ◆ SHUT_RDWR

#define SHUT_RDWR 2

Definition at line 1683 of file constdefs.h.

## ◆ SHUT_WR

#define SHUT_WR 1

Definition at line 1676 of file constdefs.h.

## ◆ SOMAXCONN

#define SOMAXCONN 5

Definition at line 1849 of file constdefs.h.

## Function Documentation

## ◆ rsock_family_to_int()

int rsock_family_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 4468 of file constdefs.c.

References AF_UNSPEC, len, memcmp(), PF_INET, PF_UNSPEC, and str.

## ◆ rsock_intern_family()

ID rsock_intern_family | ( | int | val | ) |

Definition at line 6748 of file constdefs.c.

References name, and st_lookup().

Referenced by rsock_inspect_sockaddr(), and rsock_ipaddr().

## ◆ rsock_intern_family_noprefix()

ID rsock_intern_family_noprefix | ( | int | val | ) |

Definition at line 6757 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_ip_optname()

ID rsock_intern_ip_optname | ( | int | val | ) |

Definition at line 6811 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_iplevel()

ID rsock_intern_iplevel | ( | int | val | ) |

Definition at line 6793 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_ipproto()

ID rsock_intern_ipproto | ( | int | val | ) |

Definition at line 6784 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_ipv6_optname()

ID rsock_intern_ipv6_optname | ( | int | val | ) |

Definition at line 6820 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_local_optname()

ID rsock_intern_local_optname | ( | int | val | ) |

Definition at line 6856 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_protocol_family()

ID rsock_intern_protocol_family | ( | int | val | ) |

Definition at line 6766 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_scm_optname()

ID rsock_intern_scm_optname | ( | int | val | ) |

Definition at line 6847 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_so_optname()

ID rsock_intern_so_optname | ( | int | val | ) |

Definition at line 6802 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_socktype()

ID rsock_intern_socktype | ( | int | val | ) |

Definition at line 6775 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_tcp_optname()

ID rsock_intern_tcp_optname | ( | int | val | ) |

Definition at line 6829 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_intern_udp_optname()

ID rsock_intern_udp_optname | ( | int | val | ) |

Definition at line 6838 of file constdefs.c.

References name, and st_lookup().

## ◆ rsock_ip_level_to_int()

int rsock_ip_level_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 5166 of file constdefs.c.

References IPPROTO_ICMP, IPPROTO_IP, IPPROTO_RAW, IPPROTO_TCP, IPPROTO_UDP, len, memcmp(), and str.

## ◆ rsock_ip_optname_to_int()

int rsock_ip_optname_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 5821 of file constdefs.c.

References len, memcmp(), and str.

## ◆ rsock_ipproto_to_int()

int rsock_ipproto_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 4934 of file constdefs.c.

References IPPROTO_ICMP, IPPROTO_IP, IPPROTO_RAW, IPPROTO_TCP, IPPROTO_UDP, len, memcmp(), and str.

## ◆ rsock_scm_optname_to_int()

int rsock_scm_optname_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 6652 of file constdefs.c.

References len, memcmp(), and str.

## ◆ rsock_shutdown_how_to_int()

int rsock_shutdown_how_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 6611 of file constdefs.c.

References len, memcmp(), SHUT_RD, SHUT_RDWR, SHUT_WR, and str.

## ◆ rsock_so_optname_to_int()

int rsock_so_optname_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 5381 of file constdefs.c.

References len, memcmp(), and str.

## ◆ rsock_socktype_to_int()

int rsock_socktype_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 4863 of file constdefs.c.

References len, memcmp(), and str.

## ◆ rsock_tcp_optname_to_int()

int rsock_tcp_optname_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 6367 of file constdefs.c.

References len, memcmp(), and str.

## ◆ rsock_udp_optname_to_int()

int rsock_udp_optname_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 6588 of file constdefs.c.

References len, memcmp(), and str.

## ◆ rsock_unknown_level_to_int()

int rsock_unknown_level_to_int | ( | const char * | str,
|  | long | len,
|  | int * | valp
| ) |  |

Definition at line 5143 of file constdefs.c.

References len, memcmp(), and str.