(rsock_addrinfo): renamed from sock_addrinfo.
(rsock_getaddrinfo): renamed from sock_getaddrinfo.
(rsock_socket): renamed from ruby_socket.
(rsock_sock_s_socketpair): renamed from sock_s_socketpair.
(rsock_connect): renamed from ruby_connect.
* ext/socket/socket.c (sock_listen): make it static.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22686 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
sent on LP64 platform.
* ext/socket/rubysocket.h (rsock_discard_cmsg_resource): declared.
* ext/socket/ancdata.c (rsock_discard_cmsg_resource): renamed from
discard_cmsg_resource. export it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
using getpeerucred.
* ext/socket/extconf.rb: check ucred.h and getpeerucred.
* ext/socket/rubysocket.h: include ucred.h if available.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
non internet protocol.
(optname_arg): use only so_optname_to_int for non internet protocol.
(cmsg_type_arg): use only scm_optname_to_int for non internet
protocol.
* ext/socket/mkconstants.rb: generate unknown_level_to_int.
rename iplevel_to_int to ip_level_to_int.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/rubysocket.h: include sys/param.h and sys/ucred.h.
* ext/socket/option.c (inspect_local_peercred): new function to show
LOCAL_PEERCRED socket option on FreeBSD.
(sockopt_inspect): show as LOCAL_* socket option if AF_UNIX and level
is 0.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/option.c (sockopt_initialize): add vfamily argument.
(sockopt_new): add family argument and record it in the object.
(sockopt_family): new method.
(sockopt_s_int): add vfamily argument.
(sockopt_inspect): show family.
* ext/socket/basicsocket.c (bsock_getsockopt): check address family
using getsockname.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/mkconstants.rb: prepend header if -H is not given.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/socket/rubysocket.h: common header.
* ext/socket/basicsocket.c: new file for BasicSocket.
* ext/socket/ipsocket.c: new file for IPSocket.
* ext/socket/tcpsocket.c: new file for TCPSocket.
* ext/socket/tcpserver.c: new file for TCPServer.
* ext/socket/sockssocket.c: new file for SOCKSSocket.
* ext/socket/udpsocket.c: new file for UDPSocket.
* ext/socket/unixsocket.c: new file for UNIXSocket.
* ext/socket/unixserver.c: new file for UNIXServer.
* ext/socket/socket.c: now for Socket.
* ext/socket/raddrinfo.c: new file for AddrInfo and name resolution.
* ext/socket/constants.c: new file for constants.
* ext/socket/init.c: new file for utilities.
* ext/socket/mkconstants.rb: export *_to_int.
* ext/socket/extconf.rb: add new object files.
* ext/socket/depend: add dependencies for new files.
* ext/.document: add new files.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e