com.h3c.util.pkt

## Class IcmpOptionV6

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

-     public class IcmpOptionV6
      extends Object

  ICMPv6 option data store (immutable).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `IcmpOptionV6.Type` ICMPv6 option types.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IcmpOptionV6(IcmpOptionV6.Type type, byte[] bytes)` Create a new ICMPv6 option data store for `IcmpTypeCodeV6.ROUTER_ADVERTISE_NDP` and `IcmpTypeCodeV6.REDIRECT_MSG_NDP` messages.
    `IcmpOptionV6(IcmpOptionV6.Type type, long mtu)` Create a new ICMPv6 option data store for `IcmpTypeCodeV6.ROUTER_ADVERTISE_NDP` messages.
    `IcmpOptionV6(IcmpOptionV6.Type type, MacAddress linkLayerAddr)` Create a new ICMPv6 option data store for `IcmpTypeCodeV6.ROUTER_SOLICT_NDP`, `IcmpTypeCodeV6.ROUTER_ADVERTISE_NDP`, or `IcmpTypeCodeV6.NEIGHBOR_SOLICIT_NDP` messages.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `bytes()` Returns a copy of the option payload bytes.
    `MacAddress` | `linkLayerAddr()` Returns the link-layer address or null.
    `long` | `mtu()` Returns the MTU value.
    `String` | `toString()`
    `IcmpOptionV6.Type` | `type()` Returns this option's type.

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

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

- - ### Constructor Detail

    - #### IcmpOptionV6

          public IcmpOptionV6(IcmpOptionV6.Type type,
                      MacAddress linkLayerAddr)

      Create a new ICMPv6 option data store for `IcmpTypeCodeV6.ROUTER_SOLICT_NDP`, `IcmpTypeCodeV6.ROUTER_ADVERTISE_NDP`, or `IcmpTypeCodeV6.NEIGHBOR_SOLICIT_NDP` messages.
      Parameters:
        `type` - this option's type
        `linkLayerAddr` - link layer address

    - #### IcmpOptionV6

          public IcmpOptionV6(IcmpOptionV6.Type type,
                      long mtu)

      Create a new ICMPv6 option data store for `IcmpTypeCodeV6.ROUTER_ADVERTISE_NDP` messages.
      Parameters:
        `type` - this option's type
        `mtu` - MTU value

    - #### IcmpOptionV6

          public IcmpOptionV6(IcmpOptionV6.Type type,
                      byte[] bytes)

      Create a new ICMPv6 option data store for `IcmpTypeCodeV6.ROUTER_ADVERTISE_NDP` and `IcmpTypeCodeV6.REDIRECT_MSG_NDP` messages.
      Parameters:
        `type` - this option's type
        `bytes` - prefix information or redirect header/payload bytes

  - ### Method Detail

    - #### type

          public IcmpOptionV6.Type type()

      Returns this option's type.
      Returns:
        this option's type

    - #### mtu

          public long mtu()

      Returns the MTU value.
      Returns:
        the MTU value

    - #### linkLayerAddr

          public MacAddress linkLayerAddr()

      Returns the link-layer address or null.
      Returns:
        the link-layer address

    - #### bytes

          public byte[] bytes()

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

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.