summaryrefslogtreecommitdiffstats
path: root/ext
Commit message (Collapse)AuthorAgeFilesLines
* * ext/socket/basicsocket.c (bsock_getpeereid): implemented for Solarisakr2009-02-123-0/+16
| | | | | | | | | | | | using getpeerucred. * ext/socket/extconf.rb: check ucred.h and getpeerucred. * ext/socket/rubysocket.h: include ucred.h if available. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/stringio/stringio.c (strio_ungetc): calculates new positionnobu2009-02-121-1/+2
| | | | | | | before reallocation. [Bug#1099] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2009-02-111-7/+13
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.udp_server_sockets): call the blockakr2009-02-111-5/+12
| | | | | | | | | if given. close the sockets when the block exits. (Socket.udp_server_loop): use udp_server_sockets in block form. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.tcp_server_sockets): call the blockakr2009-02-111-30/+42
| | | | | | | | | if given. close the sockets when the block exits. (Socket.tcp_server_loop): use tcp_server_sockets in block form. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-02-111-2/+10
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.unix_server_loop): useakr2009-02-111-4/+3
| | | | | | | | unix_server_socket with a block. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22235 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.unix_server_socket): close theakr2009-02-111-0/+1
| | | | | | | | socket when the block exits. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.unix_server_socket): call the blockakr2009-02-111-1/+10
| | | | | | | | if given. remove the socket file when the block exits. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (ancillary_s_ip_pktinfo): make 3rd argumentakr2009-02-111-3/+12
| | | | | | | | optional. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (anc_inspect_socket_rights): return 1 onakr2009-02-111-63/+92
| | | | | | | | | | | | | | | | success. 0 on failure. (anc_inspect_passcred_credentials): ditto. (anc_inspect_socket_creds): ditto. (anc_inspect_socket_creds): ditto. (anc_inspect_socket_creds): ditto. (anc_inspect_ip_recvdstaddr): ditto. (anc_inspect_ip_pktinfo): ditto. (anc_inspect_ipv6_pktinfo): ditto. (ancillary_inspect): check family. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update rdoc.akr2009-02-111-0/+31
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (anc_inspect_ip_pktinfo): make result bitakr2009-02-111-4/+96
| | | | | | | | | succinct. (Init_ancdata): fix number of arguments. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ipsocket.c (Init_ipsocket): undef getpeereid at IPSocket.akr2009-02-111-0/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: check getpeereid.akr2009-02-112-0/+39
| | | | | | | | * ext/socket/basicsocket.c (bsock_getpeereid): new method. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22219 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket::UDPSource#inspect): fix variableakr2009-02-111-1/+1
| | | | | | | name. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22218 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (sock_gethostname): use HOST_NAME_MAX.akr2009-02-102-4/+7
| | | | | | | | * ext/socket/raddrinfo.c (make_ipaddr): local variable renamed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/init.c (struct recvfrom_arg): use structakr2009-02-103-21/+21
| | | | | | | | | | | | | | | | | | sockaddr_storage. (recvfrom_blocking): follow struct recvfrom_arg change. (s_recvfrom): ditto. (s_recvfrom_nonblock): use struct sockaddr_storage. * ext/socket/socket.c (sock_accept): use struct sockaddr_storage. (sock_accept_nonblock): ditto. (sock_sysaccept): ditto. * ext/socket/ancdata.c (bsock_recvmsg_internal): use struct sockaddr_storage. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/basicsocket.c (bsock_getpeername): use structakr2009-02-101-9/+9
| | | | | | | | | | sockaddr_storage. (bsock_local_address): ditto. (bsock_remote_address): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22213 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/lib/socket.rb (Socket.udp_server_sockets): new method.akr2009-02-101-10/+177
| | | | | | | | | | (Socket.udp_server_loop_on): new method. (Socket.udp_server_loop): new method (Socket.ip_sockets_port0): extracted from tcp_server_sockets_port0. (Socket::UDPSource): new class. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/socket.c (sockaddr_obj): fill pfamily.akr2009-02-101-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (sockopt_s_bool): new method.akr2009-02-101-0/+49
| | | | | | | (sockopt_bool): new method. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (sockopt_family_m): renamed from sockopt_family.akr2009-02-101-9/+9
| | | | | | | | | | (sockopt_level_m): renamed from sockopt_level. (sockopt_optname_m): renamed from sockopt_optname. (inspect_local_peercred): follow the renaming. (Init_sockopt): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (anc_inspect_socket_creds): refactored to avoidakr2009-02-101-4/+2
| | | | | | | a rb_str_cat2 call. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix grammos regarding the verb "refer".knu2009-02-102-2/+2
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22196 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (inspect_local_peercred): constfied.nobu2009-02-102-4/+5
| | | | | | | * ext/socket/ancdata.c (anc_inspect_socket_creds): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rdoc update.akr2009-02-102-6/+6
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22193 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (ip_cmsg_type_to_sym): renamed fromakr2009-02-091-2/+2
| | | | | | | | cmsg_type_to_sym. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (sockopt_inspect): refactored.akr2009-02-091-5/+24
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/mkconstants.rb: generate intern_family_noprefix.akr2009-02-093-2/+3
| | | | | | | | | | | * ext/socket/option.c (sockopt_inspect): use intern_family_noprefix not to show AF_ prefix. * ext/socket/ancdata.c (ancillary_inspect): ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/constants.c (level_arg): use unknown_level_to_int forakr2009-02-093-36/+62
| | | | | | | | | | | | | | 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: http://svn.ruby-lang.org/repos/ruby/trunk@22186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/mkconstants.rb: rename level_to_int to iplevel_to_int.akr2009-02-094-5/+5
| | | | | | | | | | | | | | rename intern_level to intern_iplevel. * ext/socket/constants.c: follow the renaming. * ext/socket/option.c: ditto. * ext/socket/ancdata.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h (level_arg): add family argument.akr2009-02-096-44/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* rdoc update.akr2009-02-091-1/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (ancillary_inspect): show address family.akr2009-02-091-9/+20
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/basicsocket.c (bsock_getsockname): use sockaddr_storage.akr2009-02-091-3/+3
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32ole/win32ole.c (load_conv_function51932): fixed for thenobu2009-02-091-32/+43
| | | | | | | case IMultiLanguage is not available. [ruby-dev:37950] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (inspect_int): return 1/0 on success/failure.akr2009-02-091-120/+125
| | | | | | | | | | | | | (inspect_uint): ditto. (inspect_linger): ditto. (inspect_socktype): ditto. (inspect_timeval): ditto. (inspect_peercred): ditto. (inspect_local_peercred): ditto. (sockopt_inspect): refactored. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/mkconstants.rb: more constants for Solaris.akr2009-02-091-0/+5
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/basicsocket.c (bsock_getsockopt): refine address familyakr2009-02-091-2/+1
| | | | | | | | examination. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22177 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (sockopt_initialize): argument conversionakr2009-02-091-5/+4
| | | | | | | | reordered. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/ancdata.c (ancillary_initialize): add family argument.akr2009-02-091-27/+62
| | | | | | | | | | | | | (ancdata_new): ditto. (ancillary_s_int): ditto. (ancillary_family): new function. (ancillary_family_m): new method. (ancillary_s_ip_pktinfo): follow ancdata_new change. (ancillary_s_ipv6_pktinfo): ditto. (bsock_recvmsg_internal): examine the socket address family. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (inspect_local_peercred): check version.akr2009-02-091-0/+6
| | | | | | | (sockopt_inspect): suppress warning. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22145 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (inspect_peercred): struct ucred containsakr2009-02-081-1/+1
| | | | | | | effective uid/gid. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* LOCAL_PEERCRED is also available on MacOS X.akr2009-02-081-1/+1
| | | | git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (sockopt_inspect): add ifdef guard forakr2009-02-081-0/+2
| | | | | | | LOCAL_PEERCRED. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (inspect_local_peercred): cr_uid is a effectiveakr2009-02-081-1/+1
| | | | | | | uid, not a real uid. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/extconf.rb: check sys/param.h and sys/ucred.h.akr2009-02-084-11/+67
| | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@22137 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/rubysocket.h (sockopt_new): add family argument.akr2009-02-083-16/+50
| | | | | | | | | | | | | | * 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: http://svn.ruby-lang.org/repos/ruby/trunk@22135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/socket/option.c (inspect_peercred): new function to showakr2009-02-081-0/+20
| | | | | | | SO_PEERCRED socket option. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e