summaryrefslogtreecommitdiff
path: root/ext/socket/option.c
AgeCommit message (Collapse)Author
2015-08-15use rb_sym2strnobu
* ext/openssl/ossl_ssl.c (ossl_sslctx_set_ssl_version): use rb_sym2str to get rid of inadvertent ID creations. * ext/socket/ancdata.c (ancillary_inspect): ditto. * ext/socket/option.c (sockopt_inspect): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-25* ext/socket/extconf.rb: Solaris 11 has struct tcp_info.tcpi_ca_state,naruse
but it is a dummy. * ext/socket/option.c: Solaris 11 doesn't have u_intN_t. * ext/socket/option.c: Solaris 11 needs inspect_tcpi_msec. * ext/socket/raddrinfo.c: Solaris 11 has AF_PACKET but doesn't have related macros. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-05socket/option.c: fix inet_ntop link error on mswinnobu
* ext/socket/option.c (inet_ntop): link aliased inet_ntop in libruby on mswin not rb_w32_inet_ntop which fails to link for unknown reason. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-04socket/option.c: use rb_w32_inet_ntopnobu
* ext/socket/option.c (inet_ntop): the fallback implementaion is always available on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-21* ext/socket/option.c: Fix complation error on Android.akr
Bionic doesn't define TCP state constants. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19* ext/socket/option.c (inspect_tcp_info): Permit longer data. (glibcakr
2.7 adds tcpi_rcv_rtt, tcpi_rcv_space and tcpi_total_retrans to struct tcp_info.) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46022 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-19* ext/socket/option.c (inspect_tcp_info): New function to inspect struct ↵akr
tcp_info. (sockopt_inspect): Use inspect_tcp_info. * ext/socket/extconf.rb: Check tcp_info related things. * ext/socket/rubysocket.h: Include netinet/tcp_fsm.h if available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-21Several more OS information for TYPE_IP_MULTICAST_LOOP andakr
TYPE_IP_MULTICAST_TTL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20ext/socket/option.c: fix typonobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20* ext/socket/option.c: Use "int" for IP_MULTICAST_LOOP andakr
IP_MULTICAST_TTL on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20* ext/socket/option.c: Use "int" for IP_MULTICAST_LOOP andakr
IP_MULTICAST_TTL on Mac OS X. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20* ext/socket/option.c: Use "byte" as default argument forakr
IP_MULTICAST_LOOP and IP_MULTICAST_TTL socket option to follow the original multicast implementation. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-20* ext/socket/option.c: Use preprocessor macros to avoid repeatedakr
conditionals. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19socket/option.c: helper functionsnobu
* ext/socket/option.c (sockopt_pack_byte, sockopt_pack_int): extract helper functions to pack integers in a String. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44658 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19socket/option.c: revert r44647nobu
* ext/socket/option.c (NUM2SOCKOPT, sockopt_value): revert because these names are confusing. [ruby-dev:47903] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44656 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-19socket/option.c: socket option variationsnobu
* ext/socket/option.c (NUM2SOCKOPT, sockopt_value): extract to wrap socket option variations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18[DOC]akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44639 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-18* ext/socket/option.c: IP_MULTICAST_LOOP and IP_MULTICAST_TTL socketakr
option takes a byte on OpenBSD. Fixed by Jeremy Evans. [ruby-core:59496] [Bug #9350] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44638 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-02* ext/socket/option.c: rename functions introduced in r41009naruse
s/ip/ipv4/g because they are ipv4 functions. (there's a policy that the name "ip" is for methods which supports both ipv4 and ipv6) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-31* ext/socket/option.c (inspect_byte): used only on NetBSD.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-31* ext/socket/option.c (sockopt_s_byte): constructor of the sockoptnaruse
whose value's is byte. * ext/socket/option.c (sockopt_byte): getter for above. * ext/socket/option.c (inspect_byte): inspect for above. * ext/socket/option.c (sockopt_s_ip_multicast_loop): constructor of the sockopt whose optname is IP_MULTICAST_LOOP. * ext/socket/option.c (sockopt_ip_multicast_loop): getter for above. * ext/socket/option.c (sockopt_s_ip_multicast_ttl): constructor of the sockopt whose optname is IP_MULTICAST_TTL. * ext/socket/option.c (sockopt_ip_multicast_ttl): getter for above. * ext/socket/option.c (sockopt_inspect): use above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-16* ext/socket/option.c: Document synonymous methods, by windwiny [GH-277]zzak
* ext/stringio/stringio.c: ditto * ext/io/wait/wait.c: ditto * ext/gdbm/gdbm.c: ditto * ext/dl/cfunc.c: ditto * ext/zlib/zlib.c: ditto * ext/win32ole/win32ole.c: ditto * ext/dbm/dbm.c: ditto * ext/json/generator/generator.c: ditto * ext/date/date_core.c: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-04-08option.c: fix macro namenobu
* ext/socket/option.c (optname_to_sym): fix macro name. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-10-20* include/ruby/ruby.h: add C APIs.nari
VALUE rb_newobj_of(VALUE klass, VALUE flags) #define NEWOBJ_OF(obj,type,klass,flags) These allow to change a allocation strategy depending on klass or flags. * gc.c: ditto * array.c: use new C API. * bignum.c: ditto * class.c: ditto * complex.c: ditto * ext/socket/ancdata.c: ditto * ext/socket/option.c: ditto * hash.c: ditto * io.c: ditto * marshal.c: ditto * numeric.c: ditto * object.c: ditto * random.c: ditto * range.c: ditto * rational.c: ditto * re.c: ditto * string.c: ditto * struct.c: ditto [Feature #7177][Feature #7047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29option.c: mingw64 onlynobu
* ext/socket/option.c (inet_ntop): something weird only on mingw64. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29option.c: use rb_w32_inet_ntopnobu
* ext/socket/option.c (inet_ntop): use rb_w32_inet_ntop, instead of inet_ntop directly, which is unavailable on older version Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-29win32.c: rb_w32_inet_ntop should be constnobu
* win32/win32.c (rb_w32_inet_ntop): type should be const. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-28ext/socket: suppress warnings on mingw64nobu
* ext/socket/ancdata.c (nogvl_sendmsg_func): explicitly cast via VALUE to suppress a warning on mingw64. * ext/socket/option.c: declare inet_ntop() for mingw64 which has the function but lacks arpa/inet.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-15* ext/socket: Make Socket documentation appear. Add documentation fordrbrain
Socket, TCPServer, SOCKSSocket. Patch by Sylvain Daubert. [Ruby 1.9 - Feature #5182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32977 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-15* remove trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31573 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26fix a typo.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26* ext/socket/option.c: define IFNAMSIZ if not available.akr
fix compilation error on mingw32. reported by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26update comment.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-26* ext/socket/option.c (rb_if_indextoname): new function to abstractakr
environments without if_indextoname. (inspect_ipv6_multicast_if): new function to inspect IPV6_MULTICAST_IF. Socket::Option.new(:INET6, :IPV6, :MULTICAST_IF, [2].pack("I!")).inspect is "#<Socket::Option: INET6 IPV6 MULTICAST_IF eth0>". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25This ifdef should be useless after r30374.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* ext/socket/extconf.rb: check the existence of if_indextoname().usa
* ext/socket/option.c: yesterday's akr's commits destroyed the build of some unrelated platforms (such as Windows). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30372 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* ext/socket/option.c (inspect_ipv4_add_drop_membership): new functionakr
to inspect struct ip_mreq and struct ip_mreqn for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. Socket::Option.new(:INET, :IP, :ADD_MEMBERSHIP, [239,255,99,81, 0,0,0,0].pack("CCCCCCCC")).inspect is now "#<Socket::Option: INET IP ADD_MEMBERSHIP 239.255.99.81 0.0.0.0>". (inspect_ipv4_multicast_if): new function to inspect struct in_addr and struct ip_mreqn for IP_MULTICAST_IF. Socket::Option.new(:INET, :IP, :MULTICAST_IF, [192,168,0,7].pack("CCCC")).inspect is now "#<Socket::Option: INET IP MULTICAST_IF 192.168.0.7>". * ext/socket/extconf.rb: check struct ip_mreq and struct ip_mreqn. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-12-25* ext/socket/option.c (inspect_ipv6_mreq): new function to inspectakr
struct ipv6_mreq for IPV6_JOIN_GROUP and IPV6_LEAVE_GROUP. Socket::Option.new(:INET6, :IPV6, :JOIN_GROUP, [0xff12,0,0,0,0,0,0,1, 2].pack("nnnnnnnnI!")).inspect is now: "#<Socket::Option: INET6 IPV6 JOIN_GROUP ff12::1 eth0>" * ext/socket/extconf.rb: check struct ipv6_mreq. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30361 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-09-09* ext/socket/option.c (inspect_peercred): support OpenBSD-current.akr
patch by Jeremy Evans. [ruby-core:32240] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29206 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-05-04* ext/socket/option.c (sockopt_inspect): use rb_str_cat2 andakr
rb_str_append. * ext/socket/ancdata.c (ancillary_inspect): refined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-22* ext/**/*.[ch]: removed trailing spaces.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22* ext/socket: use rsock_ prefix for internal initialization functions.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-22update doc.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27012 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-03-21* ext/socket: make sources rdoc friendly.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-01* ext/socket: add rsock_prefix.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22684 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-25* ext/socket/option.c (sockopt_level): extracted from sockopt_level_m.akr
(sockopt_optname): extracted from sockopt_optname_m. (sockopt_data): apply StringValue. (sockopt_s_linger): new method. (sockopt_linger): new method. (inspect_linger): show onoff value if it is neither 0 nor 1. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22634 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* ext/socket/option.c (inspect_timeval_as_interval): renamed fromakr
inspect_timeval. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* ext/socket/option.c (inspect_timeval): fix the size test.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* ext/socket/option.c (inspect_linger): message refined.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-02-22* ext/socket/option.c (inspect_errno): new function.akr
(sockopt_inspect): use inspect_errno for SO_ERROR. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e