Class IpV6Packet

All Implemented Interfaces:
Serializable, Iterable<Packet>, IpPacket, Packet

public final class IpV6Packet extends AbstractPacket implements IpPacket
Since:
pcap4j 0.9.10
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      private static final org.slf4j.Logger logger
    • payload

      private final Packet payload
  • Constructor Details

  • Method Details

    • newPacket

      public static IpV6Packet newPacket(byte[] rawData, int offset, int length) throws IllegalRawDataException
      A static factory method. This method validates the arguments by ByteArrays.validateBounds(byte[], int, int), which may throw exceptions undocumented here.
      Parameters:
      rawData - rawData
      offset - offset
      length - 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.
      Specified by:
      getHeader in interface IpPacket
      Specified by:
      getHeader in interface Packet
      Overrides:
      getHeader in class AbstractPacket
      Returns:
      the Header object representing this packet's header. May be null if the header doesn't exist
    • 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 interface Packet
      Overrides:
      getPayload in class AbstractPacket
      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 interface Packet
      Specified by:
      getBuilder in class AbstractPacket
      Returns:
      a new Builder object populated with this object's fields values