Package org.onlab.packet
Class Ip6Address
- java.lang.Object
- 
- org.onlab.packet.IpAddress
- 
- org.onlab.packet.Ip6Address
 
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class org.onlab.packet.IpAddressIpAddress.Version
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static Ip6AddressALL_DHCP_RELAY_AGENTS_AND_SERVERSA link-scoped multicast address used by a DHCP client to communicate with neighboring DHCP relay agents and servers.static Ip6AddressALL_DHCP_SERVERSA site-scoped multicast address used by a DHCP relay agent to communicate with DHCP servers.static Ip6AddressALL_RIP_ROUTERSAll RIP routers multicast group.static intBIT_LENGTHstatic intBYTE_LENGTHstatic IpAddress.VersionVERSIONstatic Ip6AddressZEROAll-zero unspecified IPv6 address.- 
Fields inherited from class org.onlab.packet.IpAddressINET_BIT_LENGTH, INET_BYTE_LENGTH, INET6_BIT_LENGTH, INET6_BYTE_LENGTH
 
- 
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static Ip6AddressmakeMaskedAddress(Ip6Address address, int prefixLength)Creates an IPv6 address by masking it with a network mask of given mask length.static Ip6AddressmakeMaskPrefix(int prefixLength)Creates an IPv6 network mask prefix.static Ip6AddressvalueOf(byte[] value)Converts a byte array into an IPv6 address.static Ip6AddressvalueOf(byte[] value, int offset)Converts a byte array and a given offset from the beginning of the array into an IPv6 address.static Ip6AddressvalueOf(java.lang.String value)Converts an IPv6 string literal (e.g., "1111:2222::8888") into an IP address.static Ip6AddressvalueOf(java.net.InetAddress inetAddress)Converts an InetAddress into an IPv6 address.- 
Methods inherited from class org.onlab.packet.IpAddressbyteLength, compareTo, equals, getIp4Address, getIp6Address, hashCode, isIp4, isIp6, isLinkLocal, isMulticast, isSelfAssigned, isZero, makeMaskedAddress, makeMaskPrefix, toInetAddress, toIpPrefix, toOctets, toString, valueOf, valueOf, valueOf, version
 
- 
 
- 
- 
- 
Field Detail- 
VERSIONpublic static final IpAddress.Version VERSION 
 - 
BYTE_LENGTHpublic static final int BYTE_LENGTH - See Also:
- Constant Field Values
 
 - 
BIT_LENGTHpublic static final int BIT_LENGTH - See Also:
- Constant Field Values
 
 - 
ALL_DHCP_RELAY_AGENTS_AND_SERVERSpublic static final Ip6Address ALL_DHCP_RELAY_AGENTS_AND_SERVERS A link-scoped multicast address used by a DHCP client to communicate with neighboring DHCP relay agents and servers. (RFC 3315)
 - 
ALL_DHCP_SERVERSpublic static final Ip6Address ALL_DHCP_SERVERS A site-scoped multicast address used by a DHCP relay agent to communicate with DHCP servers. (RFC 3315)
 - 
ALL_RIP_ROUTERSpublic static final Ip6Address ALL_RIP_ROUTERS All RIP routers multicast group. (RFC 2080)
 - 
ZEROpublic static final Ip6Address ZERO All-zero unspecified IPv6 address.
 
- 
 - 
Method Detail- 
valueOfpublic static Ip6Address valueOf(byte[] value) Converts a byte array into an IPv6 address.- Parameters:
- value- the IPv6 address value stored in network byte order (i.e., the most significant byte first)
- Returns:
- an IPv6 address
- Throws:
- java.lang.IllegalArgumentException- if the argument is invalid
 
 - 
valueOfpublic static Ip6Address valueOf(byte[] value, int offset) Converts a byte array and a given offset from the beginning of the array into an IPv6 address.The IP address is stored in network byte order (i.e., the most significant byte first). - Parameters:
- value- the value to use
- offset- the offset in bytes from the beginning of the byte array
- Returns:
- an IPv6 address
- Throws:
- java.lang.IllegalArgumentException- if the arguments are invalid
 
 - 
valueOfpublic static Ip6Address valueOf(java.net.InetAddress inetAddress) Converts an InetAddress into an IPv6 address.- Parameters:
- inetAddress- the InetAddress value to use. It must contain an IPv6 address
- Returns:
- an IPv6 address
- Throws:
- java.lang.IllegalArgumentException- if the argument is invalid
 
 - 
valueOfpublic static Ip6Address valueOf(java.lang.String value) Converts an IPv6 string literal (e.g., "1111:2222::8888") into an IP address.- Parameters:
- value- an IPv6 address value in string form
- Returns:
- an IPv6 address
- Throws:
- java.lang.IllegalArgumentException- if the argument is invalid
 
 - 
makeMaskPrefixpublic static Ip6Address makeMaskPrefix(int prefixLength) Creates an IPv6 network mask prefix.- Parameters:
- prefixLength- the length of the mask prefix. Must be in the interval [0, 128]
- Returns:
- a new IPv6 address that contains a mask prefix of the specified length
- Throws:
- java.lang.IllegalArgumentException- if the arguments are invalid
 
 - 
makeMaskedAddresspublic static Ip6Address makeMaskedAddress(Ip6Address address, int prefixLength) Creates an IPv6 address by masking it with a network mask of given mask length.- Parameters:
- address- the address to mask
- prefixLength- the length of the mask prefix. Must be in the interval [0, 128]
- Returns:
- a new IPv6 address that is masked with a mask prefix of the specified length
- Throws:
- java.lang.IllegalArgumentException- if the prefix length is invalid
 
 
- 
 
-