Package org.pcap4j.packet
Class IpV6NeighborDiscoveryPrefixInformationOption
- java.lang.Object
-
- org.pcap4j.packet.IpV6NeighborDiscoveryPrefixInformationOption
-
- All Implemented Interfaces:
java.io.Serializable
,IcmpV6CommonPacket.IpV6NeighborDiscoveryOption
public final class IpV6NeighborDiscoveryPrefixInformationOption extends java.lang.Object implements IcmpV6CommonPacket.IpV6NeighborDiscoveryOption
- Since:
- pcap4j 0.9.15
- Author:
- Kaito Yamada
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IpV6NeighborDiscoveryPrefixInformationOption.Builder
-
Method Summary
Modifier and Type Method Description boolean
equals(java.lang.Object obj)
boolean
getAddressConfigurationFlag()
IpV6NeighborDiscoveryPrefixInformationOption.Builder
getBuilder()
byte
getLength()
int
getLengthAsInt()
boolean
getOnLinkFlag()
int
getPreferredLifetime()
long
getPreferredLifetimeAsLong()
java.net.Inet6Address
getPrefix()
byte
getPrefixLength()
int
getPrefixLengthAsInt()
byte[]
getRawData()
byte
getReserved1()
int
getReserved2()
IpV6NeighborDiscoveryOptionType
getType()
int
getValidLifetime()
long
getValidLifetimeAsLong()
int
hashCode()
int
length()
static IpV6NeighborDiscoveryPrefixInformationOption
newInstance(byte[] rawData, int offset, int length)
A static factory method.java.lang.String
toString()
-
-
-
Method Detail
-
newInstance
public static IpV6NeighborDiscoveryPrefixInformationOption newInstance(byte[] rawData, int offset, int length) throws IllegalRawDataException
A static factory method. This method validates the arguments byByteArrays.validateBounds(byte[], int, int)
, which may throw exceptions undocumented here.- Parameters:
rawData
- rawDataoffset
- offsetlength
- length- Returns:
- a new IpV6NeighborDiscoveryPrefixInformationOption object.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getType
public IpV6NeighborDiscoveryOptionType getType()
- Specified by:
getType
in interfaceIcmpV6CommonPacket.IpV6NeighborDiscoveryOption
- Returns:
- type
-
getLength
public byte getLength()
- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()
- Returns:
- length
-
getPrefixLength
public byte getPrefixLength()
- Returns:
- prefixLength
-
getPrefixLengthAsInt
public int getPrefixLengthAsInt()
- Returns:
- prefixLength
-
getOnLinkFlag
public boolean getOnLinkFlag()
- Returns:
- onLinkFlag
-
getAddressConfigurationFlag
public boolean getAddressConfigurationFlag()
- Returns:
- addressConfigurationFlag
-
getReserved1
public byte getReserved1()
- Returns:
- reserved1
-
getValidLifetime
public int getValidLifetime()
- Returns:
- validLifetime
-
getValidLifetimeAsLong
public long getValidLifetimeAsLong()
- Returns:
- validLifetime
-
getPreferredLifetime
public int getPreferredLifetime()
- Returns:
- preferredLifetime
-
getPreferredLifetimeAsLong
public long getPreferredLifetimeAsLong()
- Returns:
- preferredLifetime
-
getReserved2
public int getReserved2()
- Returns:
- reserved2
-
getPrefix
public java.net.Inet6Address getPrefix()
- Returns:
- prefix
-
length
public int length()
- Specified by:
length
in interfaceIcmpV6CommonPacket.IpV6NeighborDiscoveryOption
- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawData
in interfaceIcmpV6CommonPacket.IpV6NeighborDiscoveryOption
- Returns:
- raw data
-
getBuilder
public IpV6NeighborDiscoveryPrefixInformationOption.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-