com.h3c.util.pkt

## Class Icmp

- java.lang.Object
- - com.h3c.util.pkt.Icmp

- All Implemented Interfaces:
    Protocol

      public class Icmp
      extends Object
      implements Protocol

  ICMPv4 data store (immutable) and associated `Icmp.Builder` (mutable).

  Includes support for the following OpenFlow match fields:

  - ICMPv4 type
  - ICMPv4 code

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Icmp.Builder` Builder (mutable) used to create new protocol instances.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `bytes()` Returns a copy of the payload bytes.
    `int` | `checkSum()` Returns the decoded check sum.
    `ProtocolId` | `id()` Returns the protocol ID.
    `int` | `ident()` Returns the identifier for `IcmpTypeCode.ECHO_REQ` or `IcmpTypeCode.ECHO_REPLY` messages.
    `int` | `seqNum()` Returns the sequence number for `IcmpTypeCode.ECHO_REQ` or `IcmpTypeCode.ECHO_REPLY` messages.
    `String` | `toDebugString()` Returns the protocol debug string.
    `String` | `toString()`
    `IcmpTypeCode` | `typeCode()` Returns the type/code enumeration.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Method Detail

    - #### id

          public ProtocolId id()

      Description copied from interface: `Protocol`
      Returns the protocol ID.
      Specified by:
        `id` in interface `Protocol`
      Returns:
        protocol ID

    - #### typeCode

          public IcmpTypeCode typeCode()

      Returns the type/code enumeration.
      Returns:
        the type/code enumeration.

    - #### checkSum

          public int checkSum()

      Returns the decoded check sum.
      Returns:
        the check sum

    - #### ident

          public int ident()

      Returns the identifier for `IcmpTypeCode.ECHO_REQ` or `IcmpTypeCode.ECHO_REPLY` messages.
      Returns:
        the identifier

    - #### seqNum

          public int seqNum()

      Returns the sequence number for `IcmpTypeCode.ECHO_REQ` or `IcmpTypeCode.ECHO_REPLY` messages.
      Returns:
        the sequence number

    - #### bytes

          public byte[] bytes()

      Returns a copy of the payload bytes.
      Returns:
        the payload bytes

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### toDebugString

          public String toDebugString()

      Description copied from interface: `Protocol`
      Returns the protocol debug string.
      Specified by:
        `toDebugString` in interface `Protocol`
      Returns:
        the protocol debug string

Copyright © 2014. All Rights Reserved.