Module org.pcap4j.core
Package org.pcap4j.packet
Class IpV6NeighborDiscoverySourceLinkLayerAddressOption
- java.lang.Object
-
- org.pcap4j.packet.IpV6NeighborDiscoverySourceLinkLayerAddressOption
-
- All Implemented Interfaces:
java.io.Serializable,IcmpV6CommonPacket.IpV6NeighborDiscoveryOption
public final class IpV6NeighborDiscoverySourceLinkLayerAddressOption 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 classIpV6NeighborDiscoverySourceLinkLayerAddressOption.Builder
-
Field Summary
Fields Modifier and Type Field Description private bytelengthprivate static intLENGTH_OFFSETprivate static intLENGTH_SIZEprivate static intLINK_LAYER_ADDRESS_OFFSETprivate byte[]linkLayerAddressprivate static longserialVersionUIDprivate IpV6NeighborDiscoveryOptionTypetypeprivate static intTYPE_OFFSETprivate static intTYPE_SIZE
-
Constructor Summary
Constructors Modifier Constructor Description privateIpV6NeighborDiscoverySourceLinkLayerAddressOption(byte[] rawData, int offset, int length)privateIpV6NeighborDiscoverySourceLinkLayerAddressOption(IpV6NeighborDiscoverySourceLinkLayerAddressOption.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)IpV6NeighborDiscoverySourceLinkLayerAddressOption.BuildergetBuilder()bytegetLength()intgetLengthAsInt()byte[]getLinkLayerAddress()MacAddressgetLinkLayerAddressAsMacAddress()byte[]getRawData()IpV6NeighborDiscoveryOptionTypegetType()inthashCode()intlength()static IpV6NeighborDiscoverySourceLinkLayerAddressOptionnewInstance(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
-
LINK_LAYER_ADDRESS_OFFSET
private static final int LINK_LAYER_ADDRESS_OFFSET
- See Also:
- Constant Field Values
-
type
private final IpV6NeighborDiscoveryOptionType type
-
length
private final byte length
-
linkLayerAddress
private final byte[] linkLayerAddress
-
-
Constructor Detail
-
IpV6NeighborDiscoverySourceLinkLayerAddressOption
private IpV6NeighborDiscoverySourceLinkLayerAddressOption(byte[] rawData, int offset, int length) throws IllegalRawDataException- Throws:
IllegalRawDataException
-
IpV6NeighborDiscoverySourceLinkLayerAddressOption
private IpV6NeighborDiscoverySourceLinkLayerAddressOption(IpV6NeighborDiscoverySourceLinkLayerAddressOption.Builder builder)
-
-
Method Detail
-
newInstance
public static IpV6NeighborDiscoverySourceLinkLayerAddressOption 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 IpV6NeighborDiscoverySourceLinkLayerAddressOption 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
-
getLinkLayerAddress
public byte[] getLinkLayerAddress()
- Returns:
- linkLayerAddress
-
getLinkLayerAddressAsMacAddress
public MacAddress getLinkLayerAddressAsMacAddress()
- Returns:
- a MacAddress object
-
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 IpV6NeighborDiscoverySourceLinkLayerAddressOption.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
-
-