summaryrefslogtreecommitdiff
path: root/ext/socket/constants.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:30:41 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-01 06:30:41 +0000
commitc49f05dd792049e45608c1132be912695f4909e4 (patch)
tree26a732bca166c49d2fd5ce50d4aac36389375ca5 /ext/socket/constants.c
parentfaabbf230a026405feebf75a7cd9f4c0d9379d60 (diff)
* ext/socket: add rsock_prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/constants.c')
-rw-r--r--ext/socket/constants.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/ext/socket/constants.c b/ext/socket/constants.c
index a8b0a37..4350a12 100644
--- a/ext/socket/constants.c
+++ b/ext/socket/constants.c
@@ -40,48 +40,48 @@ constant_arg(VALUE arg, int (*str_to_int)(const char*, int, int*), const char *e
}
int
-family_arg(VALUE domain)
+rsock_family_arg(VALUE domain)
{
/* convert AF_INET, etc. */
- return constant_arg(domain, family_to_int, "unknown socket domain");
+ return constant_arg(domain, rsock_family_to_int, "unknown socket domain");
}
int
-socktype_arg(VALUE type)
+rsock_socktype_arg(VALUE type)
{
/* convert SOCK_STREAM, etc. */
- return constant_arg(type, socktype_to_int, "unknown socket type");
+ return constant_arg(type, rsock_socktype_to_int, "unknown socket type");
}
int
-level_arg(int family, VALUE level)
+rsock_level_arg(int family, VALUE level)
{
/* convert SOL_SOCKET, IPPROTO_TCP, etc. */
if (IS_IP_FAMILY(family)) {
- return constant_arg(level, ip_level_to_int, "unknown protocol level");
+ return constant_arg(level, rsock_ip_level_to_int, "unknown protocol level");
}
else {
- return constant_arg(level, unknown_level_to_int, "unknown protocol level");
+ return constant_arg(level, rsock_unknown_level_to_int, "unknown protocol level");
}
}
int
-optname_arg(int family, int level, VALUE optname)
+rsock_optname_arg(int family, int level, VALUE optname)
{
if (IS_IP_FAMILY(family)) {
switch (level) {
case SOL_SOCKET:
- return constant_arg(optname, so_optname_to_int, "unknown socket level option name");
+ return constant_arg(optname, rsock_so_optname_to_int, "unknown socket level option name");
case IPPROTO_IP:
- return constant_arg(optname, ip_optname_to_int, "unknown IP level option name");
+ return constant_arg(optname, rsock_ip_optname_to_int, "unknown IP level option name");
#ifdef IPPROTO_IPV6
case IPPROTO_IPV6:
- return constant_arg(optname, ipv6_optname_to_int, "unknown IPv6 level option name");
+ return constant_arg(optname, rsock_ipv6_optname_to_int, "unknown IPv6 level option name");
#endif
case IPPROTO_TCP:
- return constant_arg(optname, tcp_optname_to_int, "unknown TCP level option name");
+ return constant_arg(optname, rsock_tcp_optname_to_int, "unknown TCP level option name");
case IPPROTO_UDP:
- return constant_arg(optname, udp_optname_to_int, "unknown UDP level option name");
+ return constant_arg(optname, rsock_udp_optname_to_int, "unknown UDP level option name");
default:
return NUM2INT(optname);
}
@@ -89,7 +89,7 @@ optname_arg(int family, int level, VALUE optname)
else {
switch (level) {
case SOL_SOCKET:
- return constant_arg(optname, so_optname_to_int, "unknown socket level option name");
+ return constant_arg(optname, rsock_so_optname_to_int, "unknown socket level option name");
default:
return NUM2INT(optname);
}
@@ -97,22 +97,22 @@ optname_arg(int family, int level, VALUE optname)
}
int
-cmsg_type_arg(int family, int level, VALUE type)
+rsock_cmsg_type_arg(int family, int level, VALUE type)
{
if (IS_IP_FAMILY(family)) {
switch (level) {
case SOL_SOCKET:
- return constant_arg(type, scm_optname_to_int, "unknown UNIX control message");
+ return constant_arg(type, rsock_scm_optname_to_int, "unknown UNIX control message");
case IPPROTO_IP:
- return constant_arg(type, ip_optname_to_int, "unknown IP control message");
+ return constant_arg(type, rsock_ip_optname_to_int, "unknown IP control message");
#ifdef INET6
case IPPROTO_IPV6:
- return constant_arg(type, ipv6_optname_to_int, "unknown IPv6 control message");
+ return constant_arg(type, rsock_ipv6_optname_to_int, "unknown IPv6 control message");
#endif
case IPPROTO_TCP:
- return constant_arg(type, tcp_optname_to_int, "unknown TCP control message");
+ return constant_arg(type, rsock_tcp_optname_to_int, "unknown TCP control message");
case IPPROTO_UDP:
- return constant_arg(type, udp_optname_to_int, "unknown UDP control message");
+ return constant_arg(type, rsock_udp_optname_to_int, "unknown UDP control message");
default:
return NUM2INT(type);
}
@@ -120,7 +120,7 @@ cmsg_type_arg(int family, int level, VALUE type)
else {
switch (level) {
case SOL_SOCKET:
- return constant_arg(type, scm_optname_to_int, "unknown UNIX control message");
+ return constant_arg(type, rsock_scm_optname_to_int, "unknown UNIX control message");
default:
return NUM2INT(type);
}
@@ -128,10 +128,10 @@ cmsg_type_arg(int family, int level, VALUE type)
}
int
-shutdown_how_arg(VALUE how)
+rsock_shutdown_how_arg(VALUE how)
{
/* convert SHUT_RD, SHUT_WR, SHUT_RDWR. */
- return constant_arg(how, shutdown_how_to_int, "unknown shutdown argument");
+ return constant_arg(how, rsock_shutdown_how_to_int, "unknown shutdown argument");
}
/*