Class

Resolv::IPv6

Inheritance
< Object

A Resolv::DNS IPv6 address.

Constants

Name   Description
Regex = / (?:#{Regex_8Hex}) | (?:#{Regex_CompressedHex}) | (?:#{Regex_6Hex4Dec}) | (?:#{Regex_CompressedHex4Dec})/x A composite IPv6 address Regexp.
Regex_6Hex4Dec = /\A ((?:[0-9A-Fa-f]{1,4}:){6,6}) (\d+)\.(\d+)\.(\d+)\.(\d+) \z/x IPv4 mapped IPv6 address format a:b:c:d:e:f:w.x.y.z
Regex_8Hex = /\A (?:[0-9A-Fa-f]{1,4}:){7} [0-9A-Fa-f]{1,4} \z/x IPv6 address format a:b:c:d:e:f:g:h
Regex_CompressedHex = /\A ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) \z/x Compressed IPv6 address format a::b
Regex_CompressedHex4Dec = /\A ((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?) :: ((?:[0-9A-Fa-f]{1,4}:)*) (\d+)\.(\d+)\.(\d+)\.(\d+) \z/x Compressed IPv4 mapped IPv6 address format a::b:w.x.y.z

Attributes

Name Visibility R/W Description
address public R The raw IPv6 address as a String.

Methods

Class

Visibility Signature
public create (arg)

Instance

Visibility Signature
public to_name ()

Class Method Detail

create(arg)

Creates a new IPv6 address from arg which may be:

IPv6:returns arg.
String:arg must match one of the IPv6::Regex* constants

Instance Method Detail

to_name()

Turns this IPv6 address into a Resolv::DNS::Name.