Ruby  2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
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) : \

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.

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

LONG2NUM
#define LONG2NUM(x)
Definition: ruby.h:1644
ULONG2NUM
#define ULONG2NUM(x)
Definition: ruby.h:1645
long
#define long
Definition: rb_mjit_min_header-2.7.0.h:2880
n
const char size_t n
Definition: rb_mjit_min_header-2.7.0.h:5456
FIXNUM_MIN
#define FIXNUM_MIN
Definition: ruby.h:260
FIXNUM_MAX
#define FIXNUM_MAX
Definition: ruby.h:259
LONG2FIX
#define LONG2FIX(i)
Definition: ruby.h:265