com.h3c.util.pkt

## Class LldpTlv

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

-     public class LldpTlv
      extends Object

  LLDP Type-Length-Value data store (immutable).

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `LldpTlv.Builder` Builder (mutable) used to create a new instances.
    `static class` | `LldpTlv.Capability` Capabilities (bitmask enumeration).
    `static class` | `LldpTlv.ChassisIdSubType` Chassis ID sub-types.
    `static class` | `LldpTlv.PortIdSubType` Port ID sub-types.
    `static class` | `LldpTlv.PrivateBuilder` PrivateBuilder (mutable) used to create a new instances.
    `static class` | `LldpTlv.Type` Main TLV types.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `byte[]` | `bytes()` Returns a copy of the bytes array.
    `static LldpTlv` | `chassisIdMacAddr(MacAddress mac)` Build a Chassis ID `LldpTlv` of `LldpTlv.ChassisIdSubType.MAC_ADDR`.
    `static LldpTlv` | `chassisIdName(LldpTlv.ChassisIdSubType st, String name)` Build a Chassis ID `LldpTlv` for one of the following sub-types: `LldpTlv.ChassisIdSubType.INTF_NAME`, `LldpTlv.ChassisIdSubType.INTF_NAME`, `LldpTlv.ChassisIdSubType.LOCAL`, `LldpTlv.ChassisIdSubType.CHASSIS_COMP`, `LldpTlv.ChassisIdSubType.INTF_ALIAS`, `LldpTlv.ChassisIdSubType.PORT_COMP`
    `LldpTlv.ChassisIdSubType` | `chassisIdSubType()` Returns the chassis ID sub-type.
    `LldpTlv.Capability[]` | `enabled()` Returns a copy of the enabled capabilities.
    `IpAddress` | `ipAddr()` Returns the IP address.
    `MacAddress` | `macAddr()` Returns the MAC address.
    `String` | `name()` Returns the string name.
    `Integer` | `number()` Returns the number value (scalar).
    `static LldpTlv` | `portIdMacAddr(MacAddress mac)` Build a Port ID `LldpTlv` of `LldpTlv.PortIdSubType.MAC_ADDR`.
    `static LldpTlv` | `portIdName(LldpTlv.PortIdSubType st, String name)` Build a Port ID `LldpTlv` for one of the following sub-types: `LldpTlv.PortIdSubType.INTF_NAME`, `LldpTlv.PortIdSubType.INTF_NAME`, `LldpTlv.ChassisIdSubType.LOCAL`, `LldpTlv.PortIdSubType.AGENT_CIRC_ID`, `LldpTlv.PortIdSubType.INTF_ALIAS`, `LldpTlv.PortIdSubType.PORT_COMP`
    `LldpTlv.PortIdSubType` | `portIdSubType()` Returns the port ID sub-type.
    `LldpTlv.Capability[]` | `supported()` Returns a copy of the supported capabilities.
    `String` | `toString()`
    `static LldpTlv` | `ttl(int value)` Build a Time-to-Live `LldpTlv`.
    `LldpTlv.Type` | `type()` Returns the type.

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

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

- - ### Method Detail

    - #### chassisIdMacAddr

          public static LldpTlv chassisIdMacAddr(MacAddress mac)

      Build a Chassis ID `LldpTlv` of `LldpTlv.ChassisIdSubType.MAC_ADDR`.
      Parameters:
        `mac` - MAC address
      Returns:
        the immutable LLDP TLV instance using the MAC address field

    - #### chassisIdName

          public static LldpTlv chassisIdName(LldpTlv.ChassisIdSubType st,
                              String name)

      Build a Chassis ID `LldpTlv` for one of the following sub-types: `LldpTlv.ChassisIdSubType.INTF_NAME`, `LldpTlv.ChassisIdSubType.INTF_NAME`, `LldpTlv.ChassisIdSubType.LOCAL`, `LldpTlv.ChassisIdSubType.CHASSIS_COMP`, `LldpTlv.ChassisIdSubType.INTF_ALIAS`, `LldpTlv.ChassisIdSubType.PORT_COMP`
      Parameters:
        `st` - chassis ID sub-type
        `name` - chassis ID string value
      Returns:
        the immutable LLDP TLV instance using the name field

    - #### portIdMacAddr

          public static LldpTlv portIdMacAddr(MacAddress mac)

      Build a Port ID `LldpTlv` of `LldpTlv.PortIdSubType.MAC_ADDR`.
      Parameters:
        `mac` - MAC address
      Returns:
        the immutable LLDP TLV instance using the MAC address field

    - #### portIdName

          public static LldpTlv portIdName(LldpTlv.PortIdSubType st,
                           String name)

      Build a Port ID `LldpTlv` for one of the following sub-types: `LldpTlv.PortIdSubType.INTF_NAME`, `LldpTlv.PortIdSubType.INTF_NAME`, `LldpTlv.ChassisIdSubType.LOCAL`, `LldpTlv.PortIdSubType.AGENT_CIRC_ID`, `LldpTlv.PortIdSubType.INTF_ALIAS`, `LldpTlv.PortIdSubType.PORT_COMP`
      Parameters:
        `st` - port ID sub-type
        `name` - port ID string value
      Returns:
        the immutable LLDP TLV instance using the name field

    - #### ttl

          public static LldpTlv ttl(int value)

      Build a Time-to-Live `LldpTlv`.
      Parameters:
        `value` - TTL value
      Returns:
        the immutable LLDP TLV instance using the number field

    - #### type

          public LldpTlv.Type type()

      Returns the type.
      Returns:
        the type

    - #### bytes

          public byte[] bytes()

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

    - #### macAddr

          public MacAddress macAddr()

      Returns the MAC address.
      Returns:
        the MAC address

    - #### name

          public String name()

      Returns the string name.
      Returns:
        the string name

    - #### number

          public Integer number()

      Returns the number value (scalar).
      Returns:
        the number value

    - #### ipAddr

          public IpAddress ipAddr()

      Returns the IP address.
      Returns:
        the IP address

    - #### supported

          public LldpTlv.Capability[] supported()

      Returns a copy of the supported capabilities.
      Returns:
        the supported capabilities

    - #### enabled

          public LldpTlv.Capability[] enabled()

      Returns a copy of the enabled capabilities.
      Returns:
        the enabled capabilities

    - #### chassisIdSubType

          public LldpTlv.ChassisIdSubType chassisIdSubType()

      Returns the chassis ID sub-type.
      Returns:
        the chassis ID sub-type

    - #### portIdSubType

          public LldpTlv.PortIdSubType portIdSubType()

      Returns the port ID sub-type.
      Returns:
        the port ID sub-type

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2014. All Rights Reserved.