100+ results results for 'ipv6' (306 ms)
38default_ipv6 = /cygwin/ !~ RUBY_PLATFORM 39if enable_config("ipv6", default_ipv6) 40 if checking_for("ipv6") {try_link(<<EOF)} 70 have_library(ipv6lib = "inet6") and "zeta" 71 elsif ipv6lib = with_config("ipv6-lib") 72 warn <<EOS 72 warn <<EOS 73--with-ipv6-lib and --with-ipv6-libdir option will be obsolete, use 74--with-inet6lib and --with-inet6-{include,lib} options instead. 75EOS 76 find_library(ipv6lib, nil, with_config("ipv6-libdir", ldirs)) and 77 ipv6lib 221 222Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature. 223But your getaddrinfo() and getnameinfo() are appeared to be broken. Sorry,status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 126 lines
114 expect(subject.nameservers[0].ipv4).to eq(nil) 115 expect(subject.nameservers[0].ipv6).to eq(nil) 116 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 118 expect(subject.nameservers[1].ipv4).to eq(nil) 119 expect(subject.nameservers[1].ipv6).to eq(nil) 120 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 122 expect(subject.nameservers[2].ipv4).to eq(nil) 123 expect(subject.nameservers[2].ipv6).to eq(nil) 124 endstatus_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 161 lines
147 expect(subject.nameservers[0].ipv4).to eq(nil) 148 expect(subject.nameservers[0].ipv6).to eq(nil) 149 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 151 expect(subject.nameservers[1].ipv4).to eq(nil) 152 expect(subject.nameservers[1].ipv6).to eq(nil) 153 expect(subject.nameservers[2].name).to eq("ns-374.awsdns-46.com") 154 expect(subject.nameservers[2].ipv4).to eq(nil) 155 expect(subject.nameservers[2].ipv6).to eq(nil) 156 expect(subject.nameservers[3].name).to eq("ns-914.awsdns-50.net") 157 expect(subject.nameservers[3].ipv4).to eq(nil) 158 expect(subject.nameservers[3].ipv6).to eq(nil) 159 endstatus_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 168 lines
148 expect(subject.nameservers[0].ipv4).to eq(nil) 149 expect(subject.nameservers[0].ipv6).to eq(nil) 150 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 152 expect(subject.nameservers[1].ipv4).to eq(nil) 153 expect(subject.nameservers[1].ipv6).to eq(nil) 154 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 156 expect(subject.nameservers[2].ipv4).to eq(nil) 157 expect(subject.nameservers[2].ipv6).to eq(nil) 158 expect(subject.nameservers[3]).to be_a(Whois::Record::Nameserver) 160 expect(subject.nameservers[3].ipv4).to eq(nil) 161 expect(subject.nameservers[3].ipv6).to eq(nil) 162 expect(subject.nameservers[4]).to be_a(Whois::Record::Nameserver) 164 expect(subject.nameservers[4].ipv4).to eq(nil) 165 expect(subject.nameservers[4].ipv6).to eq(nil) 166 endrack_test.rb https://github.com/amatsuda/rails.git | Ruby | 192 lines
109 110 test "host if ipv6 reference" do 111 @env.delete "HTTP_X_FORWARDED_HOST" 115 116 test "host if ipv6 reference with port" do 117 @env.delete "HTTP_X_FORWARDED_HOST"merge_and_resolve_default_url_config_test.rb git://github.com/rails/rails.git | Ruby | 424 lines
244 245 def test_database_url_with_ipv6_host_and_port 246 ENV["DATABASE_URL"] = "postgres://[::1]:5454/foo"status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 113 lines
87 expect(subject.nameservers[0].ipv4).to eq(nil) 88 expect(subject.nameservers[0].ipv6).to eq(nil) 89 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 91 expect(subject.nameservers[1].ipv4).to eq(nil) 92 expect(subject.nameservers[1].ipv6).to eq(nil) 93 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 95 expect(subject.nameservers[2].ipv4).to eq(nil) 96 expect(subject.nameservers[2].ipv6).to eq(nil) 97 expect(subject.nameservers[3]).to be_a(Whois::Record::Nameserver) 99 expect(subject.nameservers[3].ipv4).to eq(nil) 100 expect(subject.nameservers[3].ipv6).to eq(nil) 101 endagent.rb https://github.com/adamhjk/marionette-collective.git | Ruby | 277 lines
183 # validate :command, :shellsafe 184 # validate :command, :ipv6address 185 # validate :command, :ipv4address 207 208 when :ipv6address 209 begin 211 ip = IPAddr.new(@request[key]) 212 raise InvalidRPCData, "#{key} should be an ipv6 address" unless ip.ipv6? 213 rescue 213 rescue 214 raise InvalidRPCData, "#{key} should be an ipv6 address" 215 endfix-overtrusting_in_non_standard_http_header.rb https://bitbucket.org/gibwar/moebooru | Ruby | 135 lines
11 # http://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces 12 # http://en.wikipedia.org/wiki/Private_network#Private_IPv6_addresses. 13 remove_const :TRUSTED_PROXIESrequest.rb https://github.com/areijonen/ramaze.git | Ruby | 222 lines
47 # Request is from a local network? 48 # Checks both IPv4 and IPv6 49 50 ipv4 = %w[ 127.0.0.1/32 192.168.0.0/16 172.16.0.0/12 10.0.0.0/8 169.254.0.0/16 ] 51 ipv6 = %w[ fc00::/7 fe80::/10 fec0::/10 ::1 ] 52 LOCAL = (ipv4 + ipv6).map{|a| IPAddr.new(a)} unless defined?(LOCAL)ipv4_address.rb https://github.com/pr0d1r2/ipv4_address.git | Ruby | 145 lines
10 DOCUMENTATION = ['192.0.2.0/24', '198.51.100.0/24', '203.0.113.0/24'] 11 IPV6_RELAY = ['192.88.99.0/24'] 12 BENCHMARK = ['198.18.0.0/15'] 74 75 def ipv6_relay? 76 exist_in_pool?(IPV6_RELAY) 78 79 def self.ipv6_relay?(addr) 80 begin 80 begin 81 new(addr).ipv6_relay? 82 rescue 116 !documentation? && 117 !ipv6_relay? && 118 !benchmark? &&test_acl.rb git://github.com/jruby/jruby.git | Ruby | 199 lines
20 192.168.1.5 yum.macos.or.jp 21 ::ffff:192.168.1.5 ipv6.macos.or.jp 22 ::192.168.1.5 too.yumipv6.macos.or.jp 59 assert(a.match(@hosts['yum'])) 60 assert(a.match(@hosts['ipv6'])) 61 assert(! a.match(@hosts['too']))whois.nic.ch.rb git://github.com/weppos/whois.git | Ruby | 112 lines
97 list[name].ipv4 = ip if Whois::Server.valid_ipv4?(ip) 98 list[name].ipv6 = ip if Whois::Server.valid_ipv6?(ip) 99 elsebind_php_ipv6.rb https://bitbucket.org/technopunk2099/metasploit-framework.git | Ruby | 88 lines
21 super(merge_info(info, 22 'Name' => 'PHP Command Shell, Bind TCP (via php) IPv6', 23 'Description' => 'Listen for a connection and spawn a command shell via php (IPv6)',tc_helper.rb git://github.com/cpjolicoeur/cerberus.git | Ruby | 157 lines
104 form.add(Dataforms::XDataField.new('FORM_TYPE', :hidden)).value = 'urn:xmpp:dataforms:softwareinfo' 105 form.add(Dataforms::XDataField.new('ip_version')).values = ['ipv4', 'ipv6'] 106 form.add(Dataforms::XDataField.new('software')).value = 'Psi' # re-ordered 135 <value>ipv4</value> 136 <value>ipv6</value> 137 </field>ack.rb https://bitbucket.org/technopunk2099/metasploit-framework.git | Ruby | 139 lines
37 38 # No IPv6 support yet 39 def support_ipv6?interface.rb https://github.com/lak/puppet-old.git | Ruby | 109 lines
80 * IPV4/prefixlength like 127.0.1.1/24 81 * IPV6/prefixlength like FE80::21A:2FFF:FE30:ECF0/128 82 * an optional suffix for IPV6 addresses from this list: eui-64, link-localcares.rb git://github.com/davidbalbert/eventless.git | Ruby | 146 lines
138 ip = IPAddress.parse(IPSocket.getaddress(host)) 139 family = ip.ipv6? ? Socket::AF_INET6 : Socket::AF_INET 140cgi_test.rb https://github.com/wayshawn/rails.git | Ruby | 220 lines
101 102 def test_host_if_ipv6_reference 103 @request_hash.delete "HTTP_X_FORWARDED_HOST" 107 108 def test_host_if_ipv6_reference_with_port 109 @request_hash.delete "HTTP_X_FORWARDED_HOST"candlepin_consumer_spec.rb https://github.com/mbacovsky/katello.git | Ruby | 83 lines
23 "net.interface.eth2.netmask" => "255.255.255.0", 24 "net.interface.eth2.ipv6_address.link" => "fe80::1a03:73ff:fe44:6d94", 25 "net.interface.eth0.broadcast" => "123.123.123.123", 27 "net.interface.eth0.netmask" => "255.255.255.0", 28 "net.interface.eth0.ipv6_address.link" => "fe80::2a03:73ff:fe44:6d94", 29 "net.interface.em1.broadcast" => "123.123.123.123", 31 "net.interface.em1.netmask" => "255.255.255.0", 32 "net.interface.em1.ipv6_address.link" => "fc80::2a03:73ff:fe44:6d94" 33 }CMakeListGen.rb https://github.com/vonami/inet-flc.git | Ruby | 219 lines
7# CMakeLists.txt generater for omnetpp type projects. Currently works with INET 8# and generates IPv6Suite's OneBigExe.cmake but should work for others too. 9# 74 75# Used only by IPv6Suite 76def readSourceList(filename) 149 #Do special inclusion of files only found in sourceList returned from 150 #readSourceList (IPv6Suite one huge statc executable) 151 readSourceList("#{dir}/sourcelist") 215 projName = ARGV[1] 216 @customise = projName == "IPv6Suite" 217 outname = @customise ? "OneBigStaticExe.cmake" : "CMakeLists.txt"firewall.rb https://gitlab.com/jkday/bootstrap.git | Ruby | 227 lines
95 # It will be qualified with a /32 CIDR notation 96 # - An IPv6 address: 97 # It will be qualified with a /128 CIDR notation 180 %w{/sbin/service iptables save} 181 when :IPv6 182 %w{/sbin/service ip6tables save} 187 %w{/usr/libexec/iptables/iptables.init save} 188 when :IPv6 189 %w{/usr/libexec/iptables/ip6tables.init save} 192 case proto.to_sym 193 when :IPv4, :IPv6 194 if (persist_ver and Puppet::Util::Package.versioncmp(persist_ver, '1.0') > 0) 208 ["/bin/sh", "-c", "/usr/sbin/iptables-save > /etc/iptables/iptables.rules"] 209 when :IPv6 210 ["/bin/sh", "-c", "/usr/sbin/ip6tables-save > /etc/iptables/ip6tables.rules"]connection_string.rb https://github.com/mongodb/mongo-ruby-driver.git | Ruby | 327 lines
179 'ipv4' => Mongo::Address::IPv4, 180 'ipv6' => Mongo::Address::IPv6, 181 'unix' => Mongo::Address::Unixreverse_ipv6_tcp.rb https://bitbucket.org/technopunk2099/metasploit-framework.git | Ruby | 71 lines
18 def self.handler_type_alias 19 "reverse_ipv6_tcp" 20 end 24 super(merge_info(info, 25 'Name' => 'Reverse TCP Stager (IPv6)', 26 'Description' => 'Connect back to the attacker over IPv6', 65 [ 66 OptInt.new("SCOPEID", [false, "The IPv6 Scope ID, required for link-layer addresses", 0]) 67 ], self.class)rack_test.rb https://github.com/drd/rails.git | Ruby | 150 lines
60 61 def test_host_if_ipv6_reference 62 @env.delete "HTTP_X_FORWARDED_HOST" 66 67 def test_host_if_ipv6_reference_with_port 68 @env.delete "HTTP_X_FORWARDED_HOST"interface_types.rb git://github.com/trema/trema.git | Ruby | 131 lines
125 126class IPv6_in_IPv4 < NetworkAdapter 127endtest_rack_handler.rb git://github.com/puma/puma.git | Ruby | 270 lines
99 100 def test_ipv6_host_supplied_port_default 101 @options[:Host] = "::1"socks5.rb https://github.com/pbrumm/net-ssh.git | Ruby | 143 lines
108 when 4 109 ipv6addr hostname = socket.recv(16) 110 elsegetaddrinfo_spec.rb https://github.com/chad/rubyspec.git | Ruby | 46 lines
8 # The check for AP_INET6's class is needed because ipaddr.rb adds 9 # fake AP_INET6 even in case when IPv6 is not really supported. 10 # Without such check, this test might fail when ipaddr was requiredstatus_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 71 lines
63 expect(subject.nameservers[0].ipv4).to eq("130.242.24.5") 64 expect(subject.nameservers[0].ipv6).to eq(nil) 65 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 67 expect(subject.nameservers[1].ipv4).to eq(nil) 68 expect(subject.nameservers[1].ipv6).to eq(nil) 69 endipaddress6.rb https://github.com/ody/ody-ipaddress6.git | Ruby | 130 lines
7# Uses ruby's own resolv class which queries DNS and /etc/hosts. 8# The closest thing to a default/primary IPv6 addresses is 9# assumed to be the AAAA that you have published via DNS orresult.rb https://github.com/mongodb/mongo-ruby-driver.git | Ruby | 128 lines
70 address_str = if record_host.index(':') 71 # IPV6 address 72 "[#{record_host}]:#{port}"instance_address.rb https://github.com/apache/deltacloud.git | Ruby | 71 lines
57 58 def is_ipv6? 59 address_type == :ipv6test_addr.rb https://github.com/ruby/ruby.git | Ruby | 63 lines
18 19 def test_valid_ipv6_link_local_address 20 bug17112 = "[ruby-core:99539]" 20 bug17112 = "[ruby-core:99539]" 21 assert_not_match(Resolv::IPv6::Regex, "fe80::1%", bug17112) 22 assert_not_match(Resolv::IPv6::Regex, "fe80:2:3:4:5:6:7:8%", bug17112) 22 assert_not_match(Resolv::IPv6::Regex, "fe80:2:3:4:5:6:7:8%", bug17112) 23 assert_not_match(Resolv::IPv6::Regex, "fe90::1%em1", bug17112) 24 assert_not_match(Resolv::IPv6::Regex, "1:2:3:4:5:6:7:8%em1", bug17112) 24 assert_not_match(Resolv::IPv6::Regex, "1:2:3:4:5:6:7:8%em1", bug17112) 25 assert_match(Resolv::IPv6::Regex, "fe80:2:3:4:5:6:7:8%em1", bug17112) 26 assert_match(Resolv::IPv6::Regex, "fe80::20d:3aff:fe7d:9760%eth0", bug17112) 26 assert_match(Resolv::IPv6::Regex, "fe80::20d:3aff:fe7d:9760%eth0", bug17112) 27 assert_match(Resolv::IPv6::Regex, "fe80::1%em1", bug17112) 28 assert_match(Resolv::IPv6::Regex, "FE80:2:3:4:5:6:7:8%EM1", bug17112)udp.rb https://bitbucket.org/technopunk2099/metasploit-framework.git | Ruby | 166 lines
101 102 # Catch unconnected IPv6 sockets talking to IPv4 addresses 103 peer = Rex::Socket.resolv_nbo(peerhost)php.rb https://github.com/bschwartz/deprec.git | Ruby | 99 lines
18 --with-apxs2=/usr/local/apache2/bin/apxs 19 --disable-ipv6 20 --enable-socketsgenerate-vhosts.rb https://github.com/rafaelfranca/generate-vhosts.git | Ruby | 139 lines
124 125# The following lines are desirable for IPv6 capable hosts 126::1 localhost ip6-localhost ip6-loopbackdomain_name.rb https://bitbucket.org/mulligan/extractext.git | Ruby | 237 lines
40 # Returns a host name representation suitable for use in the host 41 # name part of a URI. A host name, an IPv4 address, or a IPv6 42 # address enclosed in square brackets. 58 # Parses _hostname_ into a DomainName object. An IP address is also 59 # accepted. An IPv6 address may be enclosed in square brackets. 60 def initialize(hostname)utils.rb git://github.com/jruby/jruby.git | Ruby | 247 lines
59 # 60 # It will create IPV4 and IPV6 sockets on all interfaces. 61 def create_listeners(address, port)validates_ip_address.rb https://github.com/willian/validators.git | Ruby | 47 lines
15 valid = Validators::Ip.v6?(value.to_s) 16 scope = :invalid_ipv6_address 17 elsestatus_registered_spec.rb git://github.com/weppos/whois.git | Ruby | 138 lines
125 expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") 126 expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") 127 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 129 expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") 130 expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") 131 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 133 expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") 134 expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") 135 endproperty_nameservers_with_ip_spec.rb git://github.com/weppos/whois.git | Ruby | 39 lines
30 expect(subject.nameservers[0].ipv4).to eq("193.247.72.8") 31 expect(subject.nameservers[0].ipv6).to eq("2001:8a8:21:5::11") 32 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 34 expect(subject.nameservers[1].ipv4).to eq("62.12.149.3") 35 expect(subject.nameservers[1].ipv6).to eq("2001:8a8:21:5::12") 36 endaddress.rb git://github.com/mongodb/mongo-ruby-driver.git | Ruby | 252 lines
15require 'mongo/address/ipv4' 16require 'mongo/address/ipv6' 17require 'mongo/address/unix' 33 ::Socket::PF_UNIX => Unix, 34 ::Socket::AF_INET6 => IPv6, 35 ::Socket::AF_INET => IPv4 56 # 57 # @example Initialize the address with an IPV6 address and port. 58 # Mongo::Address.new("[::1]:27017") 59 # 60 # @example Initialize the address with an IPV6 address and no port. 61 # Mongo::Address.new("[::1]") 246 when Unix::MATCH then Unix.parse(address) 247 when IPv6::MATCH then IPv6.parse(address) 248 else IPv4.parse(address)status_registered_spec.rb https://gitlab.com/dandrews/whois.git | Ruby | 175 lines
147 expect(subject.nameservers[0].ipv4).to eq(nil) 148 expect(subject.nameservers[0].ipv6).to eq(nil) 149 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 151 expect(subject.nameservers[1].ipv4).to eq(nil) 152 expect(subject.nameservers[1].ipv6).to eq(nil) 153 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 155 expect(subject.nameservers[2].ipv4).to eq(nil) 156 expect(subject.nameservers[2].ipv6).to eq(nil) 157 expect(subject.nameservers[3]).to be_a(Whois::Record::Nameserver) 159 expect(subject.nameservers[3].ipv4).to eq(nil) 160 expect(subject.nameservers[3].ipv6).to eq(nil) 161 expect(subject.nameservers[4]).to be_a(Whois::Record::Nameserver) 163 expect(subject.nameservers[4].ipv4).to eq(nil) 164 expect(subject.nameservers[4].ipv6).to eq(nil) 165 expect(subject.nameservers[5]).to be_a(Whois::Record::Nameserver)record.rb git://github.com/tenderlove/dnssd.git | Ruby | 97 lines
56 addr = IPAddr.new addr unless IPAddr === addr 57 raise ArgumentError, "#{addr} is not IPv6" unless addr.ipv6? 58 addr.htonipaddress6_spec.rb https://github.com/barn/facter.git | Ruby | 36 lines
11 12describe "IPv6 address fact" do 13 it "should return ipaddress6 information for Darwin" dotest_dns.rb git://github.com/jruby/jruby.git | Ruby | 219 lines
194 195 def test_ipv6_name 196 addr = Resolv::IPv6.new("\0"*16)regexp.rb https://bitbucket.org/postmodern/ronin-support.git | Ruby | 112 lines
32 33 # A regular expression for matching IPv6 Addresses. 34 IPv6 = union( 55 # A regular expression for matching IP Addresses. 56 IP = /#{IPv4}|#{IPv6}/ 57httpbl_lookup.rb https://bitbucket.org/technopunk2099/metasploit-framework.git | Ruby | 99 lines
38 # Not compatible today 39 def support_ipv6? 40 falseirssi.rb git://github.com/mxcl/homebrew.git | Ruby | 93 lines
28 "--enable-ssl", 29 "--enable-ipv6", 30 "--with-socks"acl.rb https://github.com/mfurr/Diamondback-Ruby.git | Ruby | 144 lines
46 ipaddr = IPAddr.new(addr[3]) 47 ipaddr = ipaddr.ipv4_mapped if @pat[1].ipv6? && ipaddr.ipv4? 48 rescue ArgumentErrorserver.rb https://gitlab.com/dandrews/whois.git | Ruby | 332 lines
72 # @param [Symbol] type The type of WHOIS server to lookup. 73 # Known values are :tld, :ipv4, :ipv6. 74 # 106 # The type of WHOIS server to define. 107 # Known values are :tld, :ipv4, :ipv6. 108 # @param [String] allocation 127 # 128 # # Define a new server for an range of IPv6 addresses 129 # Whois::Server.define :ipv6, "2001:2000::/19", "whois.ripe.net" 165 # The type of WHOIS server to define. 166 # Known values are :tld, :ipv4, :ipv6. 167 # @param [String] allocation 190 # It successfully detects the following query types: 191 # * ipv6 192 # * ipv4request.rb git://github.com/alexreisner/geocoder.git | Ruby | 114 lines
87 ip.split(':').first 88 # IPv6 bracket notation 89 elsif match = ip.match(/\[(\S+)\]/) 90 match.captures.first 91 # IPv6 bare notation 92 elserack_tests.rb git://github.com/IronLanguages/main.git | Ruby | 259 lines
168 "should respond", 169 #ArgumentError: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be use... 170 "should support HTTP auth", 182 "should respond", 183 #ArgumentError: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be use... 184 "should have CGI headers on POST",event.rb https://github.com/jankubr/freec.git | Ruby | 56 lines
9FreeSWITCH-IPv4: 10.0.1.2 10FreeSWITCH-IPv6: %3A%3A1 11Event-Date-Local: 2009-05-14%2019%3A29%3A09add-connection.rb git://pkgs.fedoraproject.org/NetworkManager | Ruby | 87 lines
75 "ipv4" => s_ip4, 76 "ipv6" => s_ip6 77}ipv6.rb https://bitbucket.org/jrossi/metasploit | Ruby | 231 lines
60 61 # IPv6Header is complete IPv6 struct, used in IPv6Packet. 62 # 73 # String :body 74 class IPv6Header < Struct.new(:ipv6_v, :ipv6_class, :ipv6_label, 75 :ipv6_len, :ipv6_next, :ipv6_hop, 127 # Getter for the flow label. 128 def ipv6_label; self[:ipv6_label].to_i; end 129 # Setter for the payload length. 186 187 # IPv6Packet is used to construct IPv6 Packets. They contain an EthHeader and an IPv6Header, and in 188 # the distant, unknowable future, will take interesting IPv6ish payloads. 207 @eth_header = (args[:eth] || EthHeader.new) 208 @ipv6_header = (args[:ipv6] || IPv6Header.new) 209 @eth_header.eth_proto = 0x86ddsocksify.rb https://code.google.com/p/het-manager/ | Ruby | 245 lines
159 ].pack('CCCC') 160 elsif host =~ /^[:0-9a-f]+$/ # to IPv6 address 161 raise "TCP/IPv6 over SOCKS is not yet supported (inet_pton missing in Ruby & not supported by Tor" 228 ].pack('CCCC') 229 elsif host =~ /^[:0-9a-f]+$/ # to IPv6 address 230 raise "TCP/IPv6 over SOCKS is not yet supported (inet_pton missing in Ruby & not supported by Tor"firewall_leaks.rb https://gitlab.com/JesseW/tails.git | Ruby | 62 lines
15 end 16 when 'ipv6' 17 if leaks.ipv6_leaks.empty? 18 leaks.save_pcap_file 19 raise "Couldn't detect any IPv6 leaks" 20 endserver.rb git://github.com/jruby/jruby.git | Ruby | 277 lines
173 if nums[0] == "::1" 174 # IPv6 175 port = nums[1].to_i * 256 + nums[2].to_iipv6.rb git://github.com/mongodb/mongo-ruby-driver.git | Ruby | 112 lines
17 18 # Sets up resolution with IPv6 support if the address is an ip 19 # address. 21 # @since 2.0.0 22 class IPv6 23 32 33 # The regular expression to use to match an IPv6 ip address. 34 # 37 38 # Parse an IPv6 address into its host and port. 39 # 40 # @example Parse the address. 41 # IPv6.parse("[::1]:28011") 42 #dns_resolver.rb git://github.com/tarcieri/cool.io.git | Ruby | 219 lines
9# as best I could with extremely limited knowledge of the DNS format. There's 10# obviously a ton of stuff it doesn't support (like IPv6 and TCP). 11# 28 # and cannot resolve anything with records larger than 512-bytes. Also, 29 # IPv6 is not presently supported. 30 #mkconstants.rb git://github.com/rhomobile/rhodes.git | Ruby | 697 lines
255def_name_to_int("rsock_ip_optname_to_int", /\AIP_/, "IP_") 256def_name_to_int("rsock_ipv6_optname_to_int", /\AIPV6_/, "IPV6_", "IPPROTO_IPV6") 257def_name_to_int("rsock_tcp_optname_to_int", /\ATCP_/, "TCP_") 269def_intern('rsock_intern_ip_optname', /\AIP_/, "IP_") 270def_intern('rsock_intern_ipv6_optname', /\AIPV6_/, "IPV6_") 271def_intern('rsock_intern_tcp_optname', /\ATCP_/, "TCP_") 470IPPROTO_ICMPV6 471IPPROTO_IPV6 472IPPROTO_NONE 651 652IPV6_JOIN_GROUP 653IPV6_LEAVE_GROUP 662IPV6_HOPLIMIT 663IPV6_HOPOPTS 664IPV6_NEXTHOPextconf.rb git://github.com/rhomobile/rhodes.git | Ruby | 366 lines
37default_ipv6 = /mswin|cygwin|beos|haiku/ !~ RUBY_PLATFORM 38if enable_config("ipv6", default_ipv6) 39 if checking_for("ipv6") {try_link(<<EOF)} 75 have_library(ipv6lib = "inet6") and "zeta" 76 elsif ipv6lib = with_config("ipv6-lib") 77 warn <<EOS 238 239Fatal: --enable-ipv6 is specified, and your OS seems to support IPv6 feature. 240But your getaddrinfo() and getnameinfo() are appeared to be broken. Sorry, 332have_type("struct in6_pktinfo", headers) {|src| 333 src.sub(%r'^/\*top\*/', '\1'"\n#if defined(IPPROTO_IPV6) && defined(IPV6_PKTINFO)") << 334 "#else\n" << "#error\n" << ">>>>>> no in6_pktinfo <<<<<<\n" << "#endif\n" 345# workaround for recent Windows SDK 346$defs << "-DIPPROTO_IPV6=IPPROTO_IPV6" if $defs.include?("-DHAVE_CONST_IPPROTO_IPV6") && !have_macro("IPPROTO_IPV6") 347ethernet.rb https://bitbucket.org/jrossi/metasploit | Ruby | 63 lines
41 ETHERTYPE_NOVELL = 0x8138 42 ETHERTYPE_IPV6 = 0x86DD 43 ETHERTYPE_MPLS_UNICAST = 0x8847ruby.rb https://github.com/radiohead/redis-rb.git | Ruby | 259 lines
111 def self.connect(host, port, timeout) 112 # Limit lookup to IPv4, as Redis doesn't yet do IPv6... 113 addr = ::Socket.getaddrinfo(host, nil, Socket::AF_INET)sysconf.rb git://github.com/jruby/jruby.git | Ruby | 141 lines
44 SC_IOV_MAX = 56 45 SC_IPV6 = 118 46 SC_JOB_CONTROL = 6test_TestNetwork.rb https://github.com/revenant/ipv6suite.git | Ruby | 146 lines
106 r = RSRuby.instance 107 wait = `ruby ~/src/IPv6SuiteWithINET/Etc/scripts/RImportOmnet.rb rtr.vec` 108 raise wait if $?.exitstatus > 0 126 wait = `rm test2.Rdata` 127 wait = `ruby ~/src/IPv6SuiteWithINET/Etc/scripts/RImportOmnet.rb rtrmip6.vec` 128 raise wait if $?.exitstatus > 0 133 diffs = r.diff(data["time"]) 134 assert(diffs.max <= rtr.attributes["MIPv6MaxRtrAdvInterval"].to_f, "maximum #{diffs.max} should be less than in XML #{rtr.attributes["MIPv6MaxRtrAdvInterval"].to_f}") 135 135 136 assert(diffs.min >= rtr.attributes["MIPv6MinRtrAdvInterval"].to_f, 137 "Unsolicited RAs separation in sim #{diffs.min} should always be \ 137 "Unsolicited RAs separation in sim #{diffs.min} should always be \ 138greater than in XML #{rtr.attributes["MIPv6MinRtrAdvInterval"].to_f}") 139mpg321.rb https://github.com/directionless/homebrew.git | Ruby | 60 lines
13 # This is a homemade patch fashioned using deduction. 14 # 2. Also a couple of IPV6 values are not defined on OSX that are needed. 15 # This patch was seen in the wild for an app called lscube: 26 "--disable-mpg123-symlink", 27 "--enable-ipv6", 28 "--disable-alsa" 52+ * BSD-based systems like FreeBSD and OS X */ 53+#if !defined(IPV6_ADD_MEMBERSHIP) && defined(IPV6_JOIN_GROUP) 54+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP 54+#define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP 55+#define IPV6_DROP_MEMBERSHIP IPV6_LEAVE_GROUP 56+#endifrange_walker_spec.rb https://bitbucket.org/technopunk2099/metasploit-framework.git | Ruby | 105 lines
9 end 10 it "should handle single ipv6 addresses" do 11 walker = Rex::Socket::RangeWalker.new("::1")ruby-debug-ide.rb https://github.com/mark-moseley/ruby-debug-ide.git | Ruby | 184 lines
140 $stderr.printf "Fast Debugger (ruby-debug-ide 0.4.9) listens on #{host}:#{port}\n" 141 # 127.0.0.1 seemingly works with all systems and with IPv6 as well. 142 # "localhost" and nil on have problems on some systems.route.rb https://github.com/adamhjk/chef.git | Ruby | 140 lines
41 @networking = nil 42 @networking_ipv6 = nil 43 @hostname = nil 55 56 def networking_ipv6(arg=nil) 57 set_or_return( 57 set_or_return( 58 :networking_ipv6, 59 arg,resolv.rb https://reflectivecs.svn.codeplex.com/svn | Ruby | 2341 lines
363 # +name+ can be a Resolv::DNS::Name or a String. Retrieved address will 364 # be a Resolv::IPv4 or Resolv::IPv6 365 374 # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will 375 # be a Resolv::IPv4 or Resolv::IPv6 376 387 # +name+ can be a Resolv::DNS::Name or a String. Retrieved addresses will 388 # be a Resolv::IPv4 or Resolv::IPv6 389 391 each_resource(name, Resource::IN::A) {|resource| yield resource.address} 392 if use_ipv6? 393 each_resource(name, Resource::IN::AAAA) {|resource| yield resource.address} 402 end 403 list.any? {|a| a.ipv6? && !a.ipv6_loopback? && !a.ipv6_linklocal? } 404 endipaddr.rb https://reflectivecs.svn.codeplex.com/svn | Ruby | 851 lines
33 def valid_v6?(addr) 34 # IPv6 (normal) 35 return true if /\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*\Z/ =~ addr 37 return true if /\A::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*)?\Z/ =~ addr 38 # IPv6 (IPv4 compat) 39 return true if /\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:/ =~ addr && valid_v4?($') 63# IPAddr provides a set of methods to manipulate an IP address. Both IPv4 and 64# IPv6 are supported. 65# 71# 72# p ipaddr1 #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff> 73# 75# 76# ipaddr2 = ipaddr1.mask(48) #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000> 77#os_captive_portal.rb https://github.com/idemarinis/OpenWISP-Captive-Portals-Manager.git | Ruby | 235 lines
44 45 # Test to see if the passed parameter is a valid ipv6 address 46 def is_ipv6_address?(address) 46 def is_ipv6_address?(address) 47 IPAddr.new(address).ipv6? 48 end 72 73 # Returns the first non-link-local ipv6 address assigned to the passed interface name 74 def get_interface_ipv6_address(interface)measure-handoff.rb https://github.com/revenant/ipv6suite.git | Ruby | 181 lines
71 ARGV.options { |opt| 72 opt.banner = "Usage: ruby #{__FILE__} [options] ipv6addr port" 73 153 STDERR.puts "\n" 154 STDERR.puts "Most likely IPv6 support was not enabled for ruby during compilation" 155 exit 1socket.rb git://github.com/tarcieri/cool.io.git | Ruby | 233 lines
115 family = ::Socket::AF_INET 116 elsif(Resolv::IPv6.create(addr) rescue nil) 117 family = ::Socket::AF_INET6resolv.rb http://rubyworks.googlecode.com/svn/trunk/ | Ruby | 1886 lines
81 ((|name|)) must be a instance of Resolv::DNS::Name or String. Lookupped 82 address is represented as an instance of Resolv::IPv4 or Resolv::IPv6. 83 88 89 ((|address|)) must be a instance of Resolv::IPv4, Resolv::IPv6 or String. 90 Lookupped name is represented as an instance of Resolv::DNS::Name. 172 173== Resolv::IPv6 class 174=== class methods 174=== class methods 175--- Resolv::IPv6.create(address) 176 177=== methods 178--- Resolv::IPv6#to_s 179--- Resolv::IPv6#to_nameipaddr.rb http://multisketchup.googlecode.com/svn/trunk/ | Ruby | 701 lines
20# 21# p ipaddr1 #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff> 22# 24# 25# ipaddr2 = ipaddr1.mask(48) #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000> 26# 35# IPAddr provides a set of methods to manipulate an IP address. Both 36# IPv4 and IPv6 are supported. 37class IPAddr 180 181 # Returns true if the ipaddr is an IPv6 address. 182 def ipv6? 185 186 # Returns true if the ipaddr is an IPv4-mapped IPv6 address. 187 def ipv4_mapped?common.rb git://github.com/IronLanguages/main.git | Ruby | 612 lines
17 # RFC 2396 (URI Generic Syntax) 18 # RFC 2732 (IPv6 Literal Addresses in URL's) 19 # RFC 2373 (IPv6 Addressing Architecture) 58 # RFC 2373, APPENDIX B: 59 # IPv6address = hexpart [ ":" IPv4address ] 60 # IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT 77 HEXSEQ2 = "(?:#{HEX4}:)*#{LASTPART}" 78 # IPv6address = hexseq2 | [ hexseq1 ] "::" [ hexseq2 ] 79 IPV6ADDR = "(?:#{HEXSEQ2}|(?:#{HEXSEQ1})?::(?:#{HEXSEQ2})?)" 80 81 # IPv6prefix = ( hexseq1 | [ hexseq1 ] "::" [ hexseq1 ] ) "/" 1*2DIGIT 82 # unused 83 84 # ipv6reference = "[" IPv6address "]" (RFC 2732) 85 IPV6REF = "\\[#{IPV6ADDR}\\]"ipaddr.rb git://github.com/IronLanguages/main.git | Ruby | 767 lines
28 def valid_v6?(addr) 29 # IPv6 (normal) 30 return true if /\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*\Z/ =~ addr 32 return true if /\A::([\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*)?\Z/ =~ addr 33 # IPv6 (IPv4 compat) 34 return true if /\A[\dA-Fa-f]{1,4}(:[\dA-Fa-f]{1,4})*:/ =~ addr && valid_v4?($') 58# IPAddr provides a set of methods to manipulate an IP address. Both IPv4 and 59# IPv6 are supported. 60# 66# 67# p ipaddr1 #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff> 68# 70# 71# ipaddr2 = ipaddr1.mask(48) #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000> 72#common.rb git://github.com/IronLanguages/main.git | Ruby | 848 lines
17 # RFC 2396 (URI Generic Syntax) 18 # RFC 2732 (IPv6 Literal Addresses in URL's) 19 # RFC 2373 (IPv6 Addressing Architecture) 249 # RFC 2396 (URI Generic Syntax) 250 # RFC 2732 (IPv6 Literal Addresses in URL's) 251 # RFC 2373 (IPv6 Addressing Architecture) 268 # RFC 2373, APPENDIX B: 269 # IPv6address = hexpart [ ":" IPv4address ] 270 # IPv4address = 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT "." 1*3DIGIT 288 # IPv6address = hexseq2 | [ hexseq1 ] "::" [ hexseq2 ] 289 ret[:IPV6ADDR] = ipv6addr = "(?:#{hexseq2}|(?:#{hexseq1})?::(?:#{hexseq2})?)" 290 294 # ipv6reference = "[" IPv6address "]" (RFC 2732) 295 ret[:IPV6REF] = ipv6ref = "\\[#{ipv6addr}\\]" 296socket.rb git://github.com/IronLanguages/main.git | Ruby | 756 lines
116 begin 117 sock.ipv6only! if self.ipv6? 118 sock.setsockopt(:SOCKET, :REUSEADDR, 1) 133 begin 134 sock.ipv6only! if self.ipv6? 135 sock.setsockopt(:SOCKET, :REUSEADDR, 1) 166 # - IPv4 unspecified address (0.0.0.0) is replaced by IPv4 loopback address (127.0.0.1). 167 # - IPv6 unspecified address (::) is replaced by IPv6 loopback address (::1). 168 # 205class Socket < BasicSocket 206 # enable the socket option IPV6_V6ONLY if IPV6_V6ONLY is available. 207 def ipv6only! 284 sockets << s 285 s.ipv6only! if ai.ipv6? 286 if reuseaddrnew_spec.rb git://github.com/IronLanguages/main.git | Ruby | 87 lines
10 11 it 'it should initialize IPAddr ipv6 address with short notation' do 12 a = IPAddr.new 17 18 it 'it should initialize IPAddr ipv6 address with long notation' do 19 a = IPAddr.new("0123:4567:89ab:cdef:0ABC:DEF0:1234:5678") 24 25 it 'it should initialize IPAddr ipv6 address with / subnet notation' do 26 a = IPAddr.new("3ffe:505:2::/48") 30 a.ipv4?.should == false 31 a.ipv6?.should == true 32 a.inspect.should == "#<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000>" 34 35 it 'it should initialize IPAddr ipv6 address with mask subnet notation' do 36 a = IPAddr.new("3ffe:505:2::/ffff:ffff:ffff::")reverse_spec.rb git://github.com/IronLanguages/main.git | Ruby | 27 lines
11describe "IPAddr#ip6_arpa" do 12 it 'should be able to convert an IPv6 address into the reverse DNS lookup representation according to RFC3172' do 13 IPAddr.new("3ffe:505:2::f").ip6_arpa.should == "f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.5.0.5.0.e.f.f.3.ip6.arpa" 20describe "IPAddr#ip6_int" do 21 it 'should be able to convert an IPv6 address into the reverse DNS lookup representation according to RFC1886' do 22 IPAddr.new("3ffe:505:2::f").ip6_int.should == "f.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.0.5.0.5.0.e.f.f.3.ip6.int"new_spec.rb git://github.com/IronLanguages/main.git | Ruby | 80 lines
19 20 it "binds to localhost and a port with either IPv4 or IPv6" do 21 @server = TCPServer.new(SocketSpecs.hostname, SocketSpecs.port)getaddrinfo_spec.rb git://github.com/IronLanguages/main.git | Ruby | 122 lines
19 # The check for AP_INET6's class is needed because ipaddr.rb adds 20 # fake AP_INET6 even in case when IPv6 is not really supported. 21 # Without such check, this test might fail when ipaddr was required 93 supports_ip6 do 94 it "accepts empty addresses for IPv6 passive sockets" do 95 BasicSocket.do_not_reverse_lookup = true 107 supports_ip6 do 108 it "accepts empty addresses for IPv6 non-passive sockets" do 109 BasicSocket.do_not_reverse_lookup = trueSocket.rb git://github.com/rhomobile/rhodes.git | Ruby | 356 lines
248 249 IPV6_JOIN_GROUP = 12 250 250 251 IPV6_LEAVE_GROUP = 13 252 252 253 IPV6_MULTICAST_HOPS = 10 254 254 255 IPV6_MULTICAST_IF = 9 256 256 257 IPV6_MULTICAST_LOOP = 11 258tcp_socket.rb https://github.com/jwkoelewijn/celluloid-io.git | Ruby | 79 lines
31 32 # Guess it's not IPv4! Is it IPv6? 33 unless @addr 34 begin 35 @addr = Resolv::IPv6.create(remote_host) 36 rescue ArgumentError 53 family = Socket::AF_INET 54 when Resolv::IPv6 55 family = Socket::AF_INET6base.rb git://github.com/weppos/whois.git | Ruby | 192 lines
52 # The type of WHOIS adapter to define. 53 # Known values are :tld, :ipv4, :ipv6. 54 # @param [String] allocationstatus_reserved_spec.rb git://github.com/weppos/whois.git | Ruby | 115 lines
87 expect(subject.nameservers[0].ipv4).to eq("213.248.199.16") 88 expect(subject.nameservers[0].ipv6).to eq(nil) 89 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 91 expect(subject.nameservers[1].ipv4).to eq("195.66.240.250") 92 expect(subject.nameservers[1].ipv6).to eq("2a01:40:1001:37::2") 93 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 95 expect(subject.nameservers[2].ipv4).to eq("213.219.13.194") 96 expect(subject.nameservers[2].ipv6).to eq(nil) 97 endproperty_nameservers_with_ipv4_and_ipv6_spec.rb git://github.com/weppos/whois.git | Ruby | 43 lines
5# 6# /spec/fixtures/responses/whois.nic.fr/re/property_nameservers_with_ipv4_and_ipv6.expected 7# 15 16describe Whois::Record::Parser::WhoisNicFr, "property_nameservers_with_ipv4_and_ipv6.expected" do 17 18 subject do 19 file = fixture("responses", "whois.nic.fr/re/property_nameservers_with_ipv4_and_ipv6.txt") 20 part = Whois::Record::Part.new(body: File.read(file)) 30 expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") 31 expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") 32 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 34 expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") 35 expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") 36 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)property_nameservers_with_ipv4_and_some_ipv6_spec.rb git://github.com/weppos/whois.git | Ruby | 55 lines
5# 6# /spec/fixtures/responses/whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6.expected 7# 15 16describe Whois::Record::Parser::WhoisNicFr, "property_nameservers_with_ipv4_and_some_ipv6.expected" do 17 18 subject do 19 file = fixture("responses", "whois.nic.fr/fr/property_nameservers_with_ipv4_and_some_ipv6.txt") 20 part = Whois::Record::Part.new(body: File.read(file)) 30 expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") 31 expect(subject.nameservers[0].ipv6).to eq("2001:660:3003:2::4:1") 32 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 34 expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") 35 expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") 36 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)property_nameservers_with_ipv4_and_ipv6_spec.rb git://github.com/weppos/whois.git | Ruby | 43 lines
5# 6# /spec/fixtures/responses/whois.nic.fr/pm/property_nameservers_with_ipv4_and_ipv6.expected 7# 15 16describe Whois::Record::Parser::WhoisNicFr, "property_nameservers_with_ipv4_and_ipv6.expected" do 17 18 subject do 19 file = fixture("responses", "whois.nic.fr/pm/property_nameservers_with_ipv4_and_ipv6.txt") 20 part = Whois::Record::Part.new(body: File.read(file)) 30 expect(subject.nameservers[0].ipv4).to eq("192.93.0.1") 31 expect(subject.nameservers[0].ipv6).to eq("2001:660:3005:1::1:1") 32 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 34 expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") 35 expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") 36 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver)property_nameservers_spec.rb git://github.com/weppos/whois.git | Ruby | 45 lines
36 expect(subject.nameservers[3].ipv4).to eq("91.220.191.220") 37 expect(subject.nameservers[3].ipv6).to eq(nil) 38 expect(subject.nameservers[4]).to be_a(Whois::Record::Nameserver) 40 expect(subject.nameservers[4].ipv4).to eq("195.234.53.220") 41 expect(subject.nameservers[4].ipv6).to eq(nil) 42 endnameserver_spec.rb git://github.com/weppos/whois.git | Ruby | 64 lines
31 # i.ipv4.should == "127.0.0.1" 32 # i.ipv6.should be_nil 33 # end 39 i.ipv4.should == "127.0.0.1" 40 i.ipv6.should be_nil 41 end 50 i.ipv4.should == "127.0.0.1" 51 i.ipv6.should be_nil 52 endip.rb git://github.com/tqbf/ruckus.git | Ruby | 38 lines
1# === IP addresses are integers with special assignment 2# You can use a Ruckus::Number as an IP address (or an IPv6 3# address, if you make it 128 bits wide), but Ruckus::IPwhois.nic.uk.rb git://github.com/weppos/whois.git | Ruby | 180 lines
137 name, ipv4, ipv6 = line.strip.split(/\s+/) 138 Record::Nameserver.new(:name => name, :ipv4 => ipv4, :ipv6 => ipv6) 139 endwhois.nic.fr.rb git://github.com/weppos/whois.git | Ruby | 177 lines
95 ipv4 = ips.find { |ip| Whois::Server.valid_ipv4?(ip) } 96 ipv6 = ips.find { |ip| Whois::Server.valid_ipv6?(ip) } 97 Record::Nameserver.new(:name => name, :ipv4 => ipv4, :ipv6 => ipv6)nameserver.rb git://github.com/weppos/whois.git | Ruby | 49 lines
26 # @attr [String] ipv4 27 # @attr [String] ipv6 28 # 28 # 29 class Nameserver < SuperStruct.new(:name, :ipv4, :ipv6) 30ipv6.rb git://github.com/weppos/whois.git | Ruby | 33 lines
1Whois::Server.define :ipv6, "2001:0000::/32", "teredo", :adapter => Whois::Server::Adapters::NotImplemented 2Whois::Server.define :ipv6, "2001:0200::/23", "whois.apnic.net" 2Whois::Server.define :ipv6, "2001:0200::/23", "whois.apnic.net" 3Whois::Server.define :ipv6, "2001:0400::/23", "whois.arin.net" 4Whois::Server.define :ipv6, "2001:0600::/23", "whois.ripe.net" 4Whois::Server.define :ipv6, "2001:0600::/23", "whois.ripe.net" 5Whois::Server.define :ipv6, "2001:0800::/22", "whois.ripe.net" 6Whois::Server.define :ipv6, "2001:0C00::/22", "whois.apnic.net" 6Whois::Server.define :ipv6, "2001:0C00::/22", "whois.apnic.net" 7Whois::Server.define :ipv6, "2001:1000::/22", "whois.lacnic.net" 8Whois::Server.define :ipv6, "2001:1400::/22", "whois.ripe.net" 8Whois::Server.define :ipv6, "2001:1400::/22", "whois.ripe.net" 9Whois::Server.define :ipv6, "2001:1800::/23", "whois.arin.net" 10Whois::Server.define :ipv6, "2001:1A00::/23", "whois.ripe.net" 10Whois::Server.define :ipv6, "2001:1A00::/23", "whois.ripe.net" 11Whois::Server.define :ipv6, "2001:1C00::/22", "whois.ripe.net" 12Whois::Server.define :ipv6, "2001:2000::/19", "whois.ripe.net"server.rb git://github.com/weppos/whois.git | Ruby | 410 lines
45 TYPE_IPV4 = :ipv4, 46 TYPE_IPV6 = :ipv6, 47 TYPE_ASN16 = :asn16, 125 # The type of WHOIS server to define. 126 # Known values are :tld, :ipv4, :ipv6. 127 # @param [String] allocation 146 # 147 # # Define a new server for an range of IPv6 addresses 148 # Whois::Server.define :ipv6, "2001:2000::/19", "whois.ripe.net" 186 # The type of WHOIS server to define. 187 # Known values are :tld, :ipv4, :ipv6. 188 # @param [String] allocation 210 # It successfully detects the following query types: 211 # * ipv6 212 # * ipv4property_nameservers_multiple_ipv4_spec.rb git://github.com/weppos/whois.git | Ruby | 39 lines
30 expect(subject.nameservers[0].ipv4).to eq("212.157.203.190") 31 expect(subject.nameservers[0].ipv6).to eq(nil) 32 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 34 expect(subject.nameservers[1].ipv4).to eq("212.157.203.189") 35 expect(subject.nameservers[1].ipv6).to eq(nil) 36 endstatus_registered_spec.rb git://github.com/weppos/whois.git | Ruby | 138 lines
125 expect(subject.nameservers[0].ipv4).to eq("192.134.4.1") 126 expect(subject.nameservers[0].ipv6).to eq("2001:660:3003:2::4:1") 127 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 129 expect(subject.nameservers[1].ipv4).to eq("192.93.0.4") 130 expect(subject.nameservers[1].ipv6).to eq("2001:660:3005:1::1:2") 131 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 133 expect(subject.nameservers[2].ipv4).to eq("192.134.0.49") 134 expect(subject.nameservers[2].ipv6).to eq("2001:660:3006:1::1:1") 135 endproperty_nameservers_with_ip_spec.rb git://github.com/weppos/whois.git | Ruby | 41 lines
36 expect(subject.nameservers[2].ipv4).to eq("178.217.247.2") 37 expect(subject.nameservers[2].ipv6).to eq("2a02:1360::56") 38 endstatus_registered_spec.rb git://github.com/weppos/whois.git | Ruby | 142 lines
129 expect(subject.nameservers[0].ipv4).to eq("212.72.23.4") 130 expect(subject.nameservers[0].ipv6).to eq(nil) 131 expect(subject.nameservers[1]).to be_a(Whois::Record::Nameserver) 133 expect(subject.nameservers[1].ipv4).to eq("212.72.1.186") 134 expect(subject.nameservers[1].ipv6).to eq(nil) 135 expect(subject.nameservers[2]).to be_a(Whois::Record::Nameserver) 137 expect(subject.nameservers[2].ipv4).to eq("62.231.243.249") 138 expect(subject.nameservers[2].ipv6).to eq(nil) 139 endserver_spec.rb git://github.com/weppos/whois.git | Ruby | 302 lines
138 139 it "recognizes ipv6" do 140 server = Whois::Server.guess("2001:0db8:85a3:0000:0000:8a2e:0370:7334") 141 expect(server).to be_a(Whois::Server::Adapters::Base) 142 expect(server.type).to eq(Whois::Server::TYPE_IPV6) 143 end 144 145 it "recognizes ipv6 when zero groups" do 146 server = Whois::Server.guess("2002::1") 147 expect(server).to be_a(Whois::Server::Adapters::Base) 148 expect(server.type).to eq(Whois::Server::TYPE_IPV6) 149 end 268 269 context "when the input is a ipv6" do 270 it "lookups definitions and returns the adapter" domodule.rb http://beef.googlecode.com/svn/trunk/ | Ruby | 56 lines
24# TODO LIST 25# Add IPv6 support 26# Add HTTPS supportgeneric.rb git://github.com/ruby/ruby.git | Ruby | 1567 lines
234 # 235 # Since IPv6 addresses are wrapped with brackets in URIs, 236 # this method returns IPv6 addresses wrapped with brackets. 634 635 # Extract the host part of the URI and unwrap brackets for IPv6 addresses. 636 # 637 # This method is the same as URI::Generic#host except 638 # brackets for IPv6 (and future IP) addresses are removed. 639 #ipaddr.rb git://github.com/ruby/ruby.git | Ruby | 750 lines
21# IPAddr provides a set of methods to manipulate an IP address. Both IPv4 and 22# IPv6 are supported. 23# 29# 30# p ipaddr1 #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0001/ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff> 31# 33# 34# ipaddr2 = ipaddr1.mask(48) #=> #<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000> 35# 45 IN4MASK = 0xffffffff 46 # 128 bit mask for IPv6 47 IN6MASK = 0xffffffffffffffffffffffffffffffff 47 IN6MASK = 0xffffffffffffffffffffffffffffffff 48 # Format string for IPv6 49 IN6FORMAT = (["%.4x"] * 8).join(':')test_dns.rb git://github.com/ruby/ruby.git | Ruby | 317 lines
214 215 def test_ipv6_name 216 addr = Resolv::IPv6.new("\0"*16) 221 222 def test_ipv6_create 223 ref = '[Bug #11910] [ruby-core:72559]' 223 ref = '[Bug #11910] [ruby-core:72559]' 224 assert_instance_of Resolv::IPv6, Resolv::IPv6.create('::1'), ref 225 assert_instance_of Resolv::IPv6, Resolv::IPv6.create('::1:127.0.0.1'), ref 227 228 def test_ipv6_to_s 229 test_cases = [ 239 test_cases.each do |expected, ipv6| 240 assert_equal expected, Resolv::IPv6.create(ipv6).to_s 241 endtest_addrinfo.rb git://github.com/ruby/ruby.git | Ruby | 696 lines
15 Addrinfo.tcp("127.0.0.1", addrinfo.ip_port) 16 elsif addrinfo.ipv6? && addrinfo.ipv6_unspecified? 17 Addrinfo.tcp("::1", addrinfo.ip_port) 17 Addrinfo.tcp("::1", addrinfo.ip_port) 18 elsif addrinfo.ipv6? && (ai = addrinfo.ipv6_to_ipv4) && ai.ip_address == "0.0.0.0" 19 Addrinfo.tcp("127.0.0.1", addrinfo.ip_port) 100 assert(ipv4_ai.ipv4?) 101 assert(!ipv4_ai.ipv6?) 102 assert(!ipv4_ai.unix?)test_socket.rb git://github.com/ruby/ruby.git | Ruby | 754 lines
256 rescue 257 # allow failure if the address is IPv6 258 raise unless addr.ipv6? 350 next true unless s 351 next true if ai.ipv6_linklocal? # IPv6 link-local address is too troublesome in this test. 352 case RUBY_PLATFORM 356 # Cent OS 5.6 (2.6.18-238.19.1.el5xen) doesn't correctly work 357 # sendmsg with pktinfo for link-local ipv6 addresses 358 next true 360 when /freebsd/ 361 if ifa.addr.ipv6_linklocal? 362 # FreeBSD 9.0 with default setting (ipv6_activate_all_interfaces 363 # is not YES) sets IFDISABLED to interfaces which don't have 364 # global IPv6 address. 365 # Link-local IPv6 addresses on those interfaces don't work.mkconstants.rb git://github.com/ruby/ruby.git | Ruby | 814 lines
60 guard = nil 61 if /\A(AF_INET6|PF_INET6|IPV6_.*)\z/ =~ name 62 # IPv6 is not supported although AF_INET6 is defined on mingw 266def_name_to_int("rsock_ip_optname_to_int", /\AIP_/, "IP_") 267def_name_to_int("rsock_ipv6_optname_to_int", /\AIPV6_/, "IPV6_", "IPPROTO_IPV6") 268def_name_to_int("rsock_tcp_optname_to_int", /\ATCP_/, "TCP_") 280def_intern('rsock_intern_ip_optname', /\AIP_/, "IP_") 281def_intern('rsock_intern_ipv6_optname', /\AIPV6_/, "IPV6_") 282def_intern('rsock_intern_tcp_optname', /\ATCP_/, "TCP_") 365PF_INET nil IPv4 protocol 366AF_INET6 nil IPv6 protocol 367PF_INET6 nil IPv6 protocol 496IPPROTO_ICMPV6 nil ICMP6 497IPPROTO_IPV6 nil IP6 header 498IPPROTO_NONE nil IP6 no next headerini_parser_test.rb http://ovz-web-panel.googlecode.com/svn/trunk/ | Ruby | 35 lines
14 VE0CPUUNITS=1000 15IPV6="no" 16 EOS 25 assert_equal 'no', @parser.get('VZFASTBOOT') 26 assert_equal 'no', @parser.get('IPV6') 27 assert_equal 1000, @parser.get('VE0CPUUNITS').to_itest_ipaddr.rb git://github.com/ruby/ruby.git | Ruby | 391 lines
36 assert_equal(false, a.ipv4?) 37 assert_equal(true, a.ipv6?) 38 assert_equal("#<IPAddr: IPv6:3ffe:0505:0002:0000:0000:0000:0000:0000/ffff:ffff:ffff:0000:0000:0000:0000:0000>", a.inspect) 57 assert_equal(true, a.ipv4?) 58 assert_equal(false, a.ipv6?) 59 assert_equal(32, a.prefix) 373 374 h = { a1 => 'ipv4', a2 => 'ipv4', a3 => 'ipv6', a4 => 'ipv6', a5 => 'ipv4', a6 => 'ipv6', a7 => 'ipv4', a8 => 'ipv4'} 375 assert_equal(5, h.size) 377 assert_equal('ipv4', h[a2]) 378 assert_equal('ipv6', h[a3]) 379 assert_equal('ipv6', h[a4])virtual_server_test.rb http://ovz-web-panel.googlecode.com/svn/trunk/ | Ruby | 67 lines
8 9 test "IPv6 address assignment" do 10 @server_101.ip_address = "2001:0db8:85a3:0000:0000:8a2e:0370:7334" 49 50 test "IPv6 nameserver assigment" do 51 @server_101.nameserver = "2001:db8:85a3::8a2e:370:7334"ip6tables.rb https://gitlab.com/jkday/bootstrap.git | Ruby | 184 lines
63 64 @protocol = "IPv6" 65test_packet.rb http://packetfu.googlecode.com/svn/trunk/ | Ruby | 175 lines
139 140 def test_parse_ipv6_packet 141 assert_equal(IPv6Packet.layer, 2) 141 assert_equal(IPv6Packet.layer, 2) 142 assert_equal(IPv6Packet.layer_symbol, :internet) 143 pcaps = PcapFile.new.file_to_array(:f => 'sample-ipv6.pcap') 143 pcaps = PcapFile.new.file_to_array(:f => 'sample-ipv6.pcap') 144 p = Packet.parse(pcaps[0]) # Really an IPv6 packet 145 assert_equal(p.to_s, pcaps[0]) 147 assert(!p.kind_of?(IPPacket), "Misidentified as an IP Packet!") 148 assert_kind_of(IPv6Packet,p) 149 endcookbook_api_ipv6_spec.rb https://github.com/adamhjk/chef.git | Ruby | 112 lines
20 21describe "Knife cookbook API integration with IPv6", :workstation do 22 include IntegrationSupport 24 25 when_the_chef_server "is bound to IPv6" do 26 let(:chef_zero_opts) { {:host => "::1"} } 68 69 # Some Solaris test platforms are too old for IPv6. These tests should not 70 # otherwise be platform dependent, so exclude solaris 70 # otherwise be platform dependent, so exclude solaris 71 context "and the chef_server_url contains an IPv6 literal", :not_supported_on_solaris do 72test_dnssd_reply_query_record.rb git://github.com/tenderlove/dnssd.git | Ruby | 91 lines
8 @ipv4 = "\300\000\002\001" 9 @ipv6 = " \001\r\270\000\000\000\000\000\000\000\000\000\000\000\001" 10 @nowhere = "\007nowhere\007example\000" 19 def test_record_data_AAAA 20 qr = util_qr DNSSD::Record::A, @ipv6 21 21 22 assert_equal IPAddr.new_ntoh(@ipv6), qr.record_data 23 endtest_dnssd_record.rb git://github.com/tenderlove/dnssd.git | Ruby | 96 lines
8 @ipv4 = "\300\000\002\001".force_encoding("ascii-8bit") 9 @ipv6 = " \001\r\270\000\000\000\000\000\000\000\000\000\000\000\001".force_encoding("ascii-8bit") 10 @nowhere = "\007nowhere\007example\000".force_encoding("ascii-8bit") 31 a_variable = IPAddr.new '2001:db8::1' 32 assert_equal @ipv6, a_variable.hton 33 end 35 def test_class_to_data_AAAA 36 assert_equal @ipv6, @R.to_data(DNSSD::Record::AAAA, '2001:db8::1') 37 assert_equal @ipv6,resolve.rb git://github.com/tenderlove/dnssd.git | Ruby | 100 lines
53 # 54 # +family+ can be used to select a particular address family (IPv6 vs IPv4). 55 # 60 when Socket::AF_INET then DNSSD::Service::IPv4 61 when Socket::AF_INET6 then DNSSD::Service::IPv6 62 when Socket::AF_UNSPEC then 0service.rb git://github.com/tenderlove/dnssd.git | Ruby | 261 lines
14 IPv4 = 1 unless const_defined? :IPv4 15 IPv6 = 2 unless const_defined? :IPv6 16 # :startdoc: 156 when IPv4 then Socket::AF_INET 157 when IPv6 then Socket::AF_INET6 158 else protocolportsBackend.rb git://pkgs.fedoraproject.org/PackageKit | Ruby | 957 lines
112"haskell" => GROUP_UNKNOWN, 113"ipv6" => GROUP_NETWORK, 114"kde" => GROUP_DESKTOP_KDE,