com.h3c.util.pkt

## Class Ethernet

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

- All Implemented Interfaces:
    Protocol

      public class Ethernet
      extends Object
      implements Protocol

  Ethernet data store (immutable) and associated `Ethernet.Builder` (mutable).

  Includes support for the following OpenFlow match fields:

  - Ethernet destination address
  - Ethernet source address
  - Ethernet frame type
  - VLAN ID
  - VLAN priority

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `Ethernet.Builder` Builder (mutable) used to create new protocol instances.
    `static class` | `Ethernet.Control` Control types.
    `static class` | `Ethernet.Dsap` Destination service access point types.
    `static class` | `Ethernet.SnapId` SNAP ID (vendor and local) data store (immutable).
    `static class` | `Ethernet.Ssap` Source service access point types.
    `static class` | `Ethernet.VlanPriority` VLAN Priorities.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static EthernetType` | `NONE` Used to indicate 802.3 Snap packet types.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `Ethernet.Control` | `control()` Returns the control type (802.3 encodings).
    `Ethernet.Dsap` | `dsap()` Returns the destination service access point (802.3 encodings).
    `MacAddress` | `dstAddr()` Returns the destination address.
    `ProtocolId` | `id()` Returns the protocol ID.
    `int` | `len()` Returns the length in 802.3 packets.
    `Ethernet.SnapId` | `snapId()` Returns the SNAP ID (802.3 encodings).
    `MacAddress` | `srcAddr()` Returns the source address.
    `Ethernet.Ssap` | `ssap()` Returns the source service access point (802.3 encodings).
    `String` | `toDebugString()` Returns the protocol debug string.
    `String` | `toString()`
    `EthernetType` | `type()` Returns the Ethernet type.
    `boolean` | `vlanDei()` Returns the VLAN Drop Eligibility Indicator flag.
    `int` | `vlanId()` Returns the VLAN ID.
    `Ethernet.VlanPriority` | `vlanPriority()` Returns the VLAN priority.

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

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

- - ### Field Detail

    - #### NONE

          public static final EthernetType NONE

      Used to indicate 802.3 Snap packet types.

  - ### Method Detail

    - #### id

          public ProtocolId id()

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

    - #### dstAddr

          public MacAddress dstAddr()

      Returns the destination address.
      Returns:
        the destination address.

    - #### srcAddr

          public MacAddress srcAddr()

      Returns the source address.
      Returns:
        the source address

    - #### type

          public EthernetType type()

      Returns the Ethernet type.
      Returns:
        the Ethernet type

    - #### len

          public int len()

      Returns the length in 802.3 packets.
      Returns:
        the 802.3 length

    - #### vlanId

          public int vlanId()

      Returns the VLAN ID.
      Returns:
        the VLAN ID

    - #### vlanDei

          public boolean vlanDei()

      Returns the VLAN Drop Eligibility Indicator flag.
      Returns:
        the VLAN DEI flag

    - #### vlanPriority

          public Ethernet.VlanPriority vlanPriority()

      Returns the VLAN priority.
      Returns:
        the VLAN priority

    - #### dsap

          public Ethernet.Dsap dsap()

      Returns the destination service access point (802.3 encodings).
      Returns:
        the destination service access point

    - #### ssap

          public Ethernet.Ssap ssap()

      Returns the source service access point (802.3 encodings).
      Returns:
        the source service access point

    - #### control

          public Ethernet.Control control()

      Returns the control type (802.3 encodings).
      Returns:
        the control type

    - #### snapId

          public Ethernet.SnapId snapId()

      Returns the SNAP ID (802.3 encodings).
      Returns:
        the SNAP ID

    - #### 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.