- java.lang.Object
-
- org.pcap4j.packet.IpV6NeighborDiscoveryRedirectedHeaderOption
-
- All Implemented Interfaces:
java.io.Serializable,IcmpV6CommonPacket.IpV6NeighborDiscoveryOption
public final class IpV6NeighborDiscoveryRedirectedHeaderOption extends java.lang.Object implements IcmpV6CommonPacket.IpV6NeighborDiscoveryOption
- Since:
- pcap4j 0.9.15
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIpV6NeighborDiscoveryRedirectedHeaderOption.Builder
-
Field Summary
Fields Modifier and Type Field Description private static intIP_HEADER_OFFSETprivate PacketipPacketprivate bytelengthprivate static intLENGTH_OFFSETprivate static intLENGTH_SIZEprivate byte[]reservedprivate static intRESERVED_OFFSETprivate static intRESERVED_SIZEprivate static longserialVersionUIDprivate IpV6NeighborDiscoveryOptionTypetypeprivate static intTYPE_OFFSETprivate static intTYPE_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description privateIpV6NeighborDiscoveryRedirectedHeaderOption(byte[] rawData, int offset, int length)privateIpV6NeighborDiscoveryRedirectedHeaderOption(IpV6NeighborDiscoveryRedirectedHeaderOption.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)IpV6NeighborDiscoveryRedirectedHeaderOption.BuildergetBuilder()PacketgetIpPacket()bytegetLength()intgetLengthAsInt()byte[]getRawData()byte[]getReserved()IpV6NeighborDiscoveryOptionTypegetType()inthashCode()intlength()static IpV6NeighborDiscoveryRedirectedHeaderOptionnewInstance(byte[] rawData, int offset, int length)A static factory method.java.lang.StringtoString()
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
TYPE_OFFSET
private static final int TYPE_OFFSET
- See Also:
- Constant Field Values
-
TYPE_SIZE
private static final int TYPE_SIZE
- See Also:
- Constant Field Values
-
LENGTH_OFFSET
private static final int LENGTH_OFFSET
- See Also:
- Constant Field Values
-
LENGTH_SIZE
private static final int LENGTH_SIZE
- See Also:
- Constant Field Values
-
RESERVED_OFFSET
private static final int RESERVED_OFFSET
- See Also:
- Constant Field Values
-
RESERVED_SIZE
private static final int RESERVED_SIZE
- See Also:
- Constant Field Values
-
IP_HEADER_OFFSET
private static final int IP_HEADER_OFFSET
- See Also:
- Constant Field Values
-
type
private final IpV6NeighborDiscoveryOptionType type
-
length
private final byte length
-
reserved
private final byte[] reserved
-
ipPacket
private final Packet ipPacket
-
-
Constructor Detail
-
IpV6NeighborDiscoveryRedirectedHeaderOption
private IpV6NeighborDiscoveryRedirectedHeaderOption(byte[] rawData, int offset, int length) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
IpV6NeighborDiscoveryRedirectedHeaderOption
private IpV6NeighborDiscoveryRedirectedHeaderOption(IpV6NeighborDiscoveryRedirectedHeaderOption.Builder builder)
-
-
Method Detail
-
newInstance
public static IpV6NeighborDiscoveryRedirectedHeaderOption 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 IpV6NeighborDiscoveryRedirectedHeaderOption object.
- Throws:
IllegalRawDataException- if parsing the raw data fails.
-
getType
public IpV6NeighborDiscoveryOptionType getType()
- Specified by:
getTypein interfaceIcmpV6CommonPacket.IpV6NeighborDiscoveryOption- Returns:
- type
-
getLength
public byte getLength()
- Returns:
- length
-
getLengthAsInt
public int getLengthAsInt()
- Returns:
- length
-
getReserved
public byte[] getReserved()
- Returns:
- reserved
-
getIpPacket
public Packet getIpPacket()
- Returns:
- ipPacket
-
length
public int length()
- Specified by:
lengthin interfaceIcmpV6CommonPacket.IpV6NeighborDiscoveryOption- Returns:
- length
-
getRawData
public byte[] getRawData()
- Specified by:
getRawDatain interfaceIcmpV6CommonPacket.IpV6NeighborDiscoveryOption- Returns:
- raw data
-
getBuilder
public IpV6NeighborDiscoveryRedirectedHeaderOption.Builder getBuilder()
- Returns:
- a new Builder object populated with this object's fields.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-