Class IcmpV6CommonPacket

java.lang.Object
org.pcap4j.packet.AbstractPacket
org.pcap4j.packet.IcmpV6CommonPacket
All Implemented Interfaces:
Serializable, Iterable<Packet>, Packet

public final class IcmpV6CommonPacket extends AbstractPacket
Since:
pcap4j 0.9.15
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • newPacket

      public static IcmpV6CommonPacket 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 IcmpV6CommonPacket object.
      Throws:
      IllegalRawDataException - if parsing the raw data fails.
    • 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 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 IcmpV6CommonPacket.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
    • hasValidChecksum

      public boolean hasValidChecksum(Inet6Address srcAddr, Inet6Address dstAddr, boolean acceptZero)
      Parameters:
      srcAddr - srcAddr
      dstAddr - dstAddr
      acceptZero - acceptZero
      Returns:
      true if the packet represented by this object has a valid checksum; false otherwise.