ext/socket/constants.c File Reference

#include "rubysocket.h"
#include "constdefs.c"

Go to the source code of this file.

Functions

static int constant_arg (VALUE arg, int(*str_to_int)(const char *, long, int *), const char *errmsg)
int rsock_family_arg (VALUE domain)
int rsock_socktype_arg (VALUE type)
int rsock_level_arg (int family, VALUE level)
int rsock_optname_arg (int family, int level, VALUE optname)
int rsock_cmsg_type_arg (int family, int level, VALUE type)
int rsock_shutdown_how_arg (VALUE how)
void rsock_init_socket_constants (void)

Variables

static VALUE rb_mSockConst


Function Documentation

static int constant_arg ( VALUE  arg,
int(*)(const char *, long, int *)  str_to_int,
const char *  errmsg 
) [static]

Definition at line 18 of file constants.c.

References NIL_P, NUM2INT, rb_check_safe_obj(), rb_check_string_type(), rb_eSocket, rb_raise(), rb_sym_to_s(), RSTRING_LEN, RSTRING_PTR, SYMBOL_P, and VALUE.

Referenced by rsock_cmsg_type_arg(), rsock_family_arg(), rsock_level_arg(), rsock_optname_arg(), rsock_shutdown_how_arg(), and rsock_socktype_arg().

int rsock_cmsg_type_arg ( int  family,
int  level,
VALUE  type 
)

Definition at line 100 of file constants.c.

References constant_arg(), IPPROTO_IP, IPPROTO_TCP, IPPROTO_UDP, IS_IP_FAMILY, NUM2INT, rsock_ip_optname_to_int(), rsock_scm_optname_to_int(), rsock_tcp_optname_to_int(), and rsock_udp_optname_to_int().

int rsock_family_arg ( VALUE  domain  ) 

Definition at line 43 of file constants.c.

References constant_arg(), and rsock_family_to_int().

Referenced by addrinfo_initialize(), call_getaddrinfo(), setup_domain_and_type(), sock_s_getaddrinfo(), sock_s_gethostbyaddr(), sock_s_getnameinfo(), sockopt_initialize(), sockopt_s_bool(), sockopt_s_byte(), sockopt_s_int(), and udp_init().

void rsock_init_socket_constants ( void   ) 

Definition at line 141 of file constants.c.

References init_constants().

Referenced by rsock_init_socket_init().

int rsock_level_arg ( int  family,
VALUE  level 
)

Definition at line 57 of file constants.c.

References constant_arg(), IS_IP_FAMILY, rsock_ip_level_to_int(), and rsock_unknown_level_to_int().

Referenced by bsock_getsockopt(), bsock_setsockopt(), sockopt_initialize(), sockopt_s_bool(), sockopt_s_byte(), and sockopt_s_int().

int rsock_optname_arg ( int  family,
int  level,
VALUE  optname 
)

Definition at line 69 of file constants.c.

References constant_arg(), IPPROTO_IP, IPPROTO_TCP, IPPROTO_UDP, IS_IP_FAMILY, NUM2INT, rsock_ip_optname_to_int(), rsock_so_optname_to_int(), rsock_tcp_optname_to_int(), and rsock_udp_optname_to_int().

Referenced by bsock_getsockopt(), bsock_setsockopt(), sockopt_initialize(), sockopt_s_bool(), sockopt_s_byte(), and sockopt_s_int().

int rsock_shutdown_how_arg ( VALUE  how  ) 

Definition at line 131 of file constants.c.

References constant_arg(), and rsock_shutdown_how_to_int().

Referenced by bsock_shutdown().

int rsock_socktype_arg ( VALUE  type  ) 

Definition at line 50 of file constants.c.

References constant_arg(), and rsock_socktype_to_int().

Referenced by addrinfo_initialize(), call_getaddrinfo(), setup_domain_and_type(), and sock_s_getaddrinfo().


Variable Documentation

VALUE rb_mSockConst [static]

Definition at line 13 of file constants.c.

Referenced by init_constants().


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7