com.h3c.of.lib.match

## Enum OxmBasicFieldType

- java.lang.Object
- - java.lang.Enum<OxmBasicFieldType>
  - - com.h3c.of.lib.match.OxmBasicFieldType

- All Implemented Interfaces:
    OxmFieldType, Serializable, Comparable<OxmBasicFieldType>

      public enum OxmBasicFieldType
      extends Enum<OxmBasicFieldType>
      implements OxmFieldType

  Denotes the default set of match field types for the `OXM Basic class`.

  Those match fields that all OpenFlow switches (v1.2, v1.3) are required to support are marked as "Required".

  The description of each field type includes the size of the field in bits, whether or not a bitmask can be applied to the field (for wild-carding), and what pre-requisites exist (if any).

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `ARP_OP` ARP opcode; Since 1.2.
    `ARP_SHA` ARP source hardware address; Since 1.2.
    `ARP_SPA` ARP source IPv4 address; Since 1.2.
    `ARP_THA` ARP target hardware address; Since 1.2.
    `ARP_TPA` ARP target IPv4 address; Since 1.2.
    `ETH_DST` Ethernet destination address; Required; Since 1.2.
    `ETH_SRC` Ethernet source address; Required; Since 1.2.
    `ETH_TYPE` Ethernet frame type; Required; Since 1.2.
    `ICMPV4_CODE` ICMP code; Since 1.2.
    `ICMPV4_TYPE` ICMP type; Since 1.2.
    `ICMPV6_CODE` ICMPv6 code; Since 1.2.
    `ICMPV6_TYPE` ICMPv6 type; Since 1.2.
    `IN_PHY_PORT` Switch physical input port; Since 1.2.
    `IN_PORT` Switch input port; Required; Since 1.2.
    `IP_DSCP` IP DSCP (6 bits in ToS field); Since 1.2.
    `IP_ECN` IP ECN (2 bits in ToS field); Since 1.2.
    `IP_PROTO` IP Protocol; Required; Since 1.2.
    `IPV4_DST` IPv4 destination address; Required; Since 1.2.
    `IPV4_SRC` IPv4 source address; Required; Since 1.2.
    `IPV6_DST` IPv6 destination address; Required; Since 1.2.
    `IPV6_EXTHDR` IPv6 Extension Header pseudo-field; Since 1.3.
    `IPV6_FLABEL` IPv6 Flow Label; Since 1.2.
    `IPV6_ND_SLL` Source link-layer for ND; Since 1.2.
    `IPV6_ND_TARGET` Target address for ND; Since 1.2.
    `IPV6_ND_TLL` Target link-layer for ND; Since 1.2.
    `IPV6_SRC` IPv6 source address; Required; Since 1.2.
    `METADATA` Metadata passed between tables; Since 1.2.
    `MPLS_BOS` MPLS BoS bit; Since 1.3.
    `MPLS_LABEL` MPLS label; Since 1.2.
    `MPLS_TC` MPLS TC; Since 1.2.
    `PBB_ISID` PBB I-SID; Since 1.3.
    `SCTP_DST` SCTP destination port; Since 1.2.
    `SCTP_SRC` SCTP source port; Since 1.2.
    `TCP_DST` TCP destination port; Required; Since 1.2.
    `TCP_SRC` TCP source port; Required; Since 1.2.
    `TUNNEL_ID` Logical Port Metadata; Since 1.3.
    `UDP_DST` UDP destination port; Required; Since 1.2.
    `UDP_SRC` UDP source port; Required; Since 1.2.
    `VLAN_PCP` VLAN priority; Since 1.2.
    `VLAN_VID` VLAN id; Since 1.2.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getCode()` Returns the code value for this basic field type.
    `boolean` | `isMaskable()` Returns true if this match field type allows masking of the value.
    `boolean` | `isRequired()` Returns true if this match field type is required to be supported by OpenFlow (v1.2, v1.3) switches.
    `static OxmBasicFieldType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static OxmBasicFieldType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

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

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### IN_PORT

          public static final OxmBasicFieldType IN_PORT

      Switch input port; Required; Since 1.2.

      Ingress port. Numerical representation of incoming port, starting at 1. This may be a physical or switch-defined logical port.

      32 bits; No mask.
      No pre-requisite.

    - #### IN_PHY_PORT

          public static final OxmBasicFieldType IN_PHY_PORT

      Switch physical input port; Since 1.2.

      Physical port. In `OfmPacketIn` messages, underlying physical port when packet received on a logical port.

      32 bits; No mask.
      Pre-requisite: `IN_PORT` present.

    - #### METADATA

          public static final OxmBasicFieldType METADATA

      Metadata passed between tables; Since 1.2.

      Table metadata. Used to pass information between tables.

      64 bits; Mask allowed.
      No pre-requisite.

    - #### ETH_DST

          public static final OxmBasicFieldType ETH_DST

      Ethernet destination address; Required; Since 1.2.

      Ethernet destination MAC address.

      48 bits; Mask allowed.
      No pre-requisite.

    - #### ETH_SRC

          public static final OxmBasicFieldType ETH_SRC

      Ethernet source address; Required; Since 1.2.

      Ethernet source MAC address.

      48 bits; Mask allowed.
      No pre-requisite.

    - #### ETH_TYPE

          public static final OxmBasicFieldType ETH_TYPE

      Ethernet frame type; Required; Since 1.2.

      Ethernet type of the OpenFlow packet payload, after VLAN tags.

      16 bits; No mask.
      No pre-requisite.

    - #### VLAN_VID

          public static final OxmBasicFieldType VLAN_VID

      VLAN id; Since 1.2.

      VLAN-ID from 802.1Q header. The CFI bit indicates the presence of a valid VLAN-ID.

      12+1 bits; No mask.
      No pre-requisite.

    - #### VLAN_PCP

          public static final OxmBasicFieldType VLAN_PCP

      VLAN priority; Since 1.2.

      VLAN-PCP from 802.1Q header.

      3 bits; No mask.
      Pre-requisite: `VLAN_VID present and != NONE`

    - #### IP_DSCP

          public static final OxmBasicFieldType IP_DSCP

      IP DSCP (6 bits in ToS field); Since 1.2.

      Diff Serv Code Point (DSCP). Part of the IPv4 ToS field or the IPv6 Traffic Class field.

      6 bits; No mask.
      Pre-requisite: `ETH_TYPE == 0x0800` (IPv4) or `ETH_TYPE == 0x86dd` (IPv6).

    - #### IP_ECN

          public static final OxmBasicFieldType IP_ECN

      IP ECN (2 bits in ToS field); Since 1.2.

      ECN bits of the IP header. Part of the IPv4 ToS field or the IPv6 Traffic Class field.

      2 bits; No mask.
      Pre-requisite: `ETH_TYPE == 0x0800` (IPv4) or `ETH_TYPE == 0x86dd` (IPv6).

    - #### IP_PROTO

          public static final OxmBasicFieldType IP_PROTO

      IP Protocol; Required; Since 1.2.

      IPv4 or IPv6 protocol number.

      8 bits; No mask.
      Pre-requisite: `ETH_TYPE == 0x0800` (IPv4) or `ETH_TYPE == 0x86dd` (IPv6).

    - #### IPV4_SRC

          public static final OxmBasicFieldType IPV4_SRC

      IPv4 source address; Required; Since 1.2.

      IPv4 source address. Can use subnet mask or arbitrary bitmask.

      32 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x0800` (IPv4).

    - #### IPV4_DST

          public static final OxmBasicFieldType IPV4_DST

      IPv4 destination address; Required; Since 1.2.

      IPv4 destination address. Can use subnet mask or arbitrary bitmask.

      32 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x0800` (IPv4).

    - #### TCP_SRC

          public static final OxmBasicFieldType TCP_SRC

      TCP source port; Required; Since 1.2.

      TCP source port.

      16 bits; No mask.
      Pre-requisite: `IP_PROTO == 6` (TCP).

    - #### TCP_DST

          public static final OxmBasicFieldType TCP_DST

      TCP destination port; Required; Since 1.2.

      TCP destination port.

      16 bits; No mask.
      Pre-requisite: `IP_PROTO == 6` (TCP).

    - #### UDP_SRC

          public static final OxmBasicFieldType UDP_SRC

      UDP source port; Required; Since 1.2.

      UDP source port.

      16 bits; No mask.
      Pre-requisite: `IP_PROTO == 17` (UDP).

    - #### UDP_DST

          public static final OxmBasicFieldType UDP_DST

      UDP destination port; Required; Since 1.2.

      UDP destination port.

      16 bits; No mask.
      Pre-requisite: `IP_PROTO == 17` (UDP).

    - #### SCTP_SRC

          public static final OxmBasicFieldType SCTP_SRC

      SCTP source port; Since 1.2.

      SCTP source port.

      16 bits; No mask.
      Pre-requisite: `IP_PROTO == 132` (SCTP).

    - #### SCTP_DST

          public static final OxmBasicFieldType SCTP_DST

      SCTP destination port; Since 1.2.

      SCTP destination port.

      16 bits; No mask.
      Pre-requisite: `IP_PROTO == 132` (SCTP).

    - #### ICMPV4_TYPE

          public static final OxmBasicFieldType ICMPV4_TYPE

      ICMP type; Since 1.2.

      ICMP type.

      8 bits; No mask.
      Pre-requisite: `IP_PROTO == 1` (ICMP).

    - #### ICMPV4_CODE

          public static final OxmBasicFieldType ICMPV4_CODE

      ICMP code; Since 1.2.

      ICMP code.

      8 bits; No mask.
      Pre-requisite: `IP_PROTO == 1` (ICMP).

    - #### ARP_OP

          public static final OxmBasicFieldType ARP_OP

      ARP opcode; Since 1.2.

      ARP opcode

      16 bits; No mask.
      Pre-requisite: `ETH_TYPE == 0x0806` (ARP).

    - #### ARP_SPA

          public static final OxmBasicFieldType ARP_SPA

      ARP source IPv4 address; Since 1.2.

      Source IPv4 address in the ARP payload. Can use subnet mask or arbitrary bitmask.

      32 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x0806` (ARP).

    - #### ARP_TPA

          public static final OxmBasicFieldType ARP_TPA

      ARP target IPv4 address; Since 1.2.

      Target IPv4 address in the ARP payload. Can use subnet mask or arbitrary bitmask.

      32 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x0806` (ARP).

    - #### ARP_SHA

          public static final OxmBasicFieldType ARP_SHA

      ARP source hardware address; Since 1.2.

      Source Ethernet address in the ARP payload.

      48 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x0806` (ARP).

    - #### ARP_THA

          public static final OxmBasicFieldType ARP_THA

      ARP target hardware address; Since 1.2.

      Target Ethernet address in the ARP payload.

      48 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x0806` (ARP).

    - #### IPV6_SRC

          public static final OxmBasicFieldType IPV6_SRC

      IPv6 source address; Required; Since 1.2.

      IPv6 source address. Can use subnet mask or arbitrary bitmask.

      128 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x86dd` (IPv6).

    - #### IPV6_DST

          public static final OxmBasicFieldType IPV6_DST

      IPv6 destination address; Required; Since 1.2.

      IPv6 destination address. Can use subnet mask or arbitrary bitmask.

      128 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x86dd` (IPv6).

    - #### IPV6_FLABEL

          public static final OxmBasicFieldType IPV6_FLABEL

      IPv6 Flow Label; Since 1.2.

      IPv6 flow label.

      20 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x86dd` (IPv6).

    - #### ICMPV6_TYPE

          public static final OxmBasicFieldType ICMPV6_TYPE

      ICMPv6 type; Since 1.2.

      ICMPv6 type.

      8 bits; No mask.
      Pre-requisite: `IP_PROTO == 58` (ICMPv6).

    - #### ICMPV6_CODE

          public static final OxmBasicFieldType ICMPV6_CODE

      ICMPv6 code; Since 1.2.

      ICMPv6 code.

      8 bits; No mask.
      Pre-requisite: `IP_PROTO == 58` (ICMPv6).

    - #### IPV6_ND_TARGET

          public static final OxmBasicFieldType IPV6_ND_TARGET

      Target address for ND; Since 1.2.

      The target address in an IPv6 Neighbor Discovery message.

      128 bits; No mask.
      Pre-requisite: `ICMPV6_TYPE == 135` (NBR_SOL) or `ICMPV6_TYPE == 136` (NBR_ADV).

    - #### IPV6_ND_SLL

          public static final OxmBasicFieldType IPV6_ND_SLL

      Source link-layer for ND; Since 1.2.

      The source link-layer address option in an IPv6 Neighbor Discovery message.

      48 bits; No mask.
      Pre-requisite: `ICMPV6_TYPE == 135` (NBR_SOL).

    - #### IPV6_ND_TLL

          public static final OxmBasicFieldType IPV6_ND_TLL

      Target link-layer for ND; Since 1.2.

      The target link-layer address option in an IPv6 Neighbor Discovery message.

      48 bits; No mask.
      Pre-requisite: `ICMPV6_TYPE == 136` (NBR_ADV).

    - #### MPLS_LABEL

          public static final OxmBasicFieldType MPLS_LABEL

      MPLS label; Since 1.2.

      The LABEL in the first MPLS shim header.

      20 bits; No mask.
      Pre-requisite: `ETH_TYPE == 0x8847` (MPLS_U) or `ETH_TYPE == 0x8848` (MPLS_M).

    - #### MPLS_TC

          public static final OxmBasicFieldType MPLS_TC

      MPLS TC; Since 1.2.

      The TC in the first MPLS shim header.

      3 bits; No mask.
      Pre-requisite: `ETH_TYPE == 0x8847` (MPLS_U) or `ETH_TYPE == 0x8848` (MPLS_M).

    - #### MPLS_BOS

          public static final OxmBasicFieldType MPLS_BOS

      MPLS BoS bit; Since 1.3.

      The BoS bit in the first MPLS shim header.

      1 bit; No mask.
      Pre-requisite: `ETH_TYPE == 0x8847` (MPLS_U) or `ETH_TYPE == 0x8848` (MPLS_M).

    - #### PBB_ISID

          public static final OxmBasicFieldType PBB_ISID

      PBB I-SID; Since 1.3.

      The I-SID in the first PBB service instance tag.

      24 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x88e7` (PBB).

    - #### TUNNEL_ID

          public static final OxmBasicFieldType TUNNEL_ID

      Logical Port Metadata; Since 1.3.

      Metadata associated with a logical port.

      64 bits; Mask allowed.
      No pre-requisite.

    - #### IPV6_EXTHDR

          public static final OxmBasicFieldType IPV6_EXTHDR

      IPv6 Extension Header pseudo-field; Since 1.3.

      IPv6 Extension Header pseudo-field.

      9 bits; Mask allowed.
      Pre-requisite: `ETH_TYPE == 0x86dd` (IPv6).

  - ### Method Detail

    - #### values

          public static OxmBasicFieldType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (OxmBasicFieldType c : OxmBasicFieldType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static OxmBasicFieldType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getCode

          public int getCode()

      Returns the code value for this basic field type.
      Returns:
        the code value

    - #### isRequired

          public boolean isRequired()

      Returns true if this match field type is required to be supported by OpenFlow (v1.2, v1.3) switches.
      Returns:
        true if the field type is required

    - #### isMaskable

          public boolean isMaskable()

      Returns true if this match field type allows masking of the value.
      Returns:
        true if the field type is maskable

Copyright © 2014. All Rights Reserved.