Граф коммитов

20 Коммитов

Автор SHA1 Сообщение Дата
akr 03149710e8 * ext/socket/raddrinfo.c (init_unix_addrinfo): add socktype argument.
(addrinfo_initialize): follow init_unix_addrinfo change.
  (addrinfo_s_unix): add optional argument: socktype



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22120 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-08 04:53:17 +00:00
akr b83188dc1e add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 12:33:25 +00:00
akr 2b8ab6c54f * test/socket/test_addrinfo.rb (test_family_addrinfo): don't use
www.ruby-lang.org.
  http://d.hatena.ne.jp/nagachika/20090204/working_for_0f0e


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-07 12:28:15 +00:00
akr 88f04bdd32 * ext/socket: AddrInfo is renamed to Addrinfo. [ruby-dev:37876]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 11:01:43 +00:00
akr 0d0fe1a5ad don't connect to unspecified address (0.0.0.0). OpenBSD reject it.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22064 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-05 00:09:39 +00:00
akr 1934c7a80b test relaxed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:42:13 +00:00
akr 3eab19122b add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 15:34:32 +00:00
akr 9845b50c11 relax tests for IPv4 compat/mapped IPv6 addresss.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-04 13:38:24 +00:00
akr 1643d1c28a add tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22004 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-03 06:12:23 +00:00
akr 2df1053c1d add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21991 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 23:30:46 +00:00
akr 352dcd9ee7 * test/socket/test_addrinfo.rb: use AddrInfo.getaddrinfo to generate
IPv6 address.  AddrInfo.ip generates IPv4 address for IPv4 mapped
  IPv6 address if --with-lookup-order-hack=INET.
  [ruby-dev:37868]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21968 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-02 10:59:17 +00:00
akr f1137963e3 * ext/socket/raddrinfo.c (addrinfo_ipv4_private_p): new method.
(addrinfo_ipv4_loopback_p): ditto.
  (addrinfo_ipv4_multicast_p): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21928 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-01 12:28:50 +00:00
akr 849e730f15 * ext/socket/raddrinfo.c (addrinfo_ipv6_unspecified_p): new method.
(addrinfo_ipv6_loopback_p): ditto.
  (addrinfo_ipv6_multicast_p): ditto.
  (addrinfo_ipv6_linklocal_p): ditto.
  (addrinfo_ipv6_sitelocal_p): ditto.
  (addrinfo_ipv6_v4mapped_p): ditto.
  (addrinfo_ipv6_v4compat_p): ditto.
  (addrinfo_ipv6_mc_nodelocal_p): ditto.
  (addrinfo_ipv6_mc_linklocal_p): ditto.
  (addrinfo_ipv6_mc_sitelocal_p): ditto.
  (addrinfo_ipv6_mc_orglocal_p): ditto.
  (addrinfo_ipv6_mc_global_p): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21919 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-31 11:09:51 +00:00
akr db881044bc * ext/socket/raddrinfo.c (addrinfo_inspect_sockaddr): new
method AddrInfo#inspect_sockaddr.
  (inspect_sockaddr): extracted from addrinfo_inspect.
  (addrinfo_inspect): use inspect_sockaddr.
  (Init_addrinfo): define the new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-18 08:03:24 +00:00
akr d620500dda * ext/socket/raddrinfo.c (addrinfo_ip_address): new method
AddrInfo#ip_address.
  (addrinfo_ip_port): new method AddrInfo#ip_port.
  (Init_addrinfo): define the methods above.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-18 07:47:35 +00:00
akr 86aa5043d8 * ext/socket/raddrinfo.c (addrinfo_mdump): new method.
(addrinfo_mload): new method.
  (Init_addrinfo): define the method above.

* ext/socket/constants.c (constant_arg): str_to_int's first argument
  constified.

* ext/socket/mkconstants.rb (gen_name_to_int_decl): generated
  function's first argument constified.
  (gen_name_to_int_func_in_guard): ditto.
  (ipproto_to_int): generated.

* ext/socket/rubysocket.h (IS_IP_FAMILY): moved from raddrinfo.c.




git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 18:14:34 +00:00
akr e2f8800667 * ext/socket/socket.c (sock_s_getnameinfo): accept AddrInfo object.
* ext/socket/raddrinfo.c (rb_check_sockaddr_string_type): defined.

* ext/socket/rubysocket.h (rb_check_sockaddr_string_type): declared.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-17 16:39:03 +00:00
akr aaddab6dea * ext/socket/socket.c (addrinfo_s_ip): new method AddrInfo.ip.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21579 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-15 17:06:37 +00:00
akr 73757753ae * ext/socket/socket.c (addrinfo_ip_unpack): new method
AddrInfo#ip_unpack.
  (addrinfo_unix_path): new method AddrInfo#unix_path.
  (Init_socket): define above methods.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 14:58:25 +00:00
akr 839214e1e6 add test for AddrInfo.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-12 08:52:37 +00:00