diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-09 13:56:43 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-09 13:56:43 +0000 |
commit | 002177069b979eb9dca0338fd62736d3ee2a90fb (patch) | |
tree | 4d360cb11fc6daa19f831c1a30baecad4351515a /ext/socket/rubysocket.h | |
parent | 9d93fe621f3dd1c0b45b6872978fbffeb8c7ff97 (diff) | |
download | ruby-002177069b979eb9dca0338fd62736d3ee2a90fb.tar.gz ruby-002177069b979eb9dca0338fd62736d3ee2a90fb.tar.xz ruby-002177069b979eb9dca0338fd62736d3ee2a90fb.zip |
* ext/socket/rubysocket.h (level_arg): add family argument.
(optname_arg): ditto.
(cmsg_type_arg): ditto.
(rb_sock_getfamily): declared.
* ext/socket/constants.c (level_arg): add family argument.
(optname_arg): ditto.
(cmsg_type_arg): ditto.
* ext/socket/init.c (rb_sock_getfamily): defined.
* ext/socket/option.c (sockopt_initialize): give family for level_arg
and optname_arg.
(sockopt_s_int): ditto.
* ext/socket/basicsocket.c (bsock_setsockopt): ditto.
(bsock_getsockopt): ditto.
* ext/socket/ancdata.c (ancillary_initialize): ditto.
(ancillary_s_int): ditto.
(ancillary_cmsg_is_p): ditto.
(bsock_sendmsg_internal): ditto.
(bsock_recvmsg_internal): use rb_sock_getfamily.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22184 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r-- | ext/socket/rubysocket.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h index 9e3692f7f..efd91f662 100644 --- a/ext/socket/rubysocket.h +++ b/ext/socket/rubysocket.h @@ -194,10 +194,12 @@ NORETURN(void raise_socket_error(const char *, int)); int family_arg(VALUE domain); int socktype_arg(VALUE type); -int level_arg(VALUE level); -int optname_arg(int level, VALUE optname); +int level_arg(int family, VALUE level); +int optname_arg(int family, int level, VALUE optname); int shutdown_how_arg(VALUE how); -int cmsg_type_arg(int level, VALUE optname); +int cmsg_type_arg(int family, int level, VALUE type); + +int rb_sock_getfamily(int sockfd); int rb_getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res); int rb_getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host, size_t hostlen, char *serv, size_t servlen, int flags); |