Ruby: ext/socket/constdefs.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
constdefs.c File Reference

Go to the source code of this file.

## Macros
#define | INTEGER2NUM(n)

## 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

## ◆ INTEGER2NUM

#define INTEGER2NUM | ( |  | n | ) |

Value:
(FIXNUM_MAX < (n) ? ULONG2NUM(n) : \
FIXNUM_MIN > (long)(n) ? LONG2NUM(n) : \
LONG2FIX(n))
FIXNUM_MIN
#define FIXNUM_MIN
Definition: fixnum.h:27
FIXNUM_MAX
#define FIXNUM_MAX
Definition: fixnum.h:26
long
typedef long(ZCALLBACK *tell_file_func) OF((voidpf opaque
ULONG2NUM
#define ULONG2NUM
Definition: long.h:60
LONG2FIX
#define LONG2FIX
Definition: long.h:49
LONG2NUM
#define LONG2NUM
Definition: long.h:50

Definition at line 23 of file constdefs.c.

## 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.

Referenced by rsock_family_arg().

## ◆ 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.

Referenced by rsock_level_arg().

## ◆ 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.

Referenced by rsock_cmsg_type_arg(), and rsock_optname_arg().

## ◆ 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.

Referenced by rsock_cmsg_type_arg().

## ◆ 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.

Referenced by rsock_shutdown_how_arg().

## ◆ 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.

Referenced by rsock_optname_arg().

## ◆ 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.

Referenced by rsock_socktype_arg().

## ◆ 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.

Referenced by rsock_cmsg_type_arg(), and rsock_optname_arg().

## ◆ 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.

Referenced by rsock_cmsg_type_arg(), and rsock_optname_arg().

## ◆ 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.

Referenced by rsock_level_arg().