Package org.pcap4j.packet
Class IpV6Packet
- java.lang.Object
-
- org.pcap4j.packet.AbstractPacket
-
- org.pcap4j.packet.IpV6Packet
-
public final class IpV6Packet extends AbstractPacket implements IpPacket
- Since:
- pcap4j 0.9.10
- Author:
- Kaito Yamada
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IpV6Packet.Builder
static interface
IpV6Packet.IpV6FlowLabel
The interface representing an IPv6 flow label.static class
IpV6Packet.IpV6Header
static interface
IpV6Packet.IpV6TrafficClass
The interface representing an IPv6 traffic class.-
Nested classes/interfaces inherited from class org.pcap4j.packet.AbstractPacket
AbstractPacket.AbstractBuilder, AbstractPacket.AbstractHeader
-
Nested classes/interfaces inherited from interface org.pcap4j.packet.IpPacket
IpPacket.IpHeader
-
Nested classes/interfaces inherited from interface org.pcap4j.packet.Packet
Packet.Header
-
-
Method Summary
Modifier and Type Method Description IpV6Packet.Builder
getBuilder()
Returns a new Builder object populated with this object's fields' values.IpV6Packet.IpV6Header
getHeader()
Returns the Header object representing this packet's header.Packet
getPayload()
Returns the Packet object representing this packet's payload.static IpV6Packet
newPacket(byte[] rawData, int offset, int length)
A static factory method.-
Methods inherited from class org.pcap4j.packet.AbstractPacket
buildHexString, buildRawData, buildString, calcHashCode, calcLength, equals, getRawData, hashCode, length, toHexString, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.pcap4j.packet.Packet
contains, get, getOuterOf, getRawData, iterator, length
-
-
-
-
Method Detail
-
newPacket
public static IpV6Packet newPacket(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 IpV6Packet object.
- Throws:
IllegalRawDataException
- if parsing the raw data fails.
-
getHeader
public IpV6Packet.IpV6Header getHeader()
Description copied from class:AbstractPacket
Returns the Header object representing this packet's header. This subclass have to override this method if the packet represented by the subclass has a header.
-
getPayload
public Packet getPayload()
Description copied from class:AbstractPacket
Returns the Packet object representing this packet's payload. This subclass have to override this method if the packet represented by the subclass has a payload.- Specified by:
getPayload
in interfacePacket
- Overrides:
getPayload
in classAbstractPacket
- Returns:
- the Packet object representing this packet's payload. May be null if the payload doesn't exist
-
getBuilder
public IpV6Packet.Builder getBuilder()
Description copied from interface:Packet
Returns a new Builder object populated with this object's fields' values.- Specified by:
getBuilder
in interfacePacket
- Specified by:
getBuilder
in classAbstractPacket
- Returns:
- a new Builder object populated with this object's fields values
-
-