openconfig-packet-match

This module defines data related to packet header fields used in matching operations, for example in ACLs. When a field is omit...

  • Version: 2017-12-15

    openconfig-packet-match@2017-12-15


    
      module openconfig-packet-match {
    
        yang-version 1;
    
        namespace
          "http://openconfig.net/yang/header-fields";
    
        prefix oc-pkt-match;
    
        import openconfig-inet-types {
          prefix oc-inet;
        }
        import openconfig-yang-types {
          prefix oc-yang;
        }
        import openconfig-packet-match-types {
          prefix oc-pkt-match-types;
        }
        import openconfig-extensions {
          prefix oc-ext;
        }
    
        organization "OpenConfig working group";
    
        contact
          "OpenConfig working group
    www.openconfig.net";
    
        description
          "This module defines data related to packet header fields
    used in matching operations, for example in ACLs.  When a
    field is omitted from a match expression, the effect is a
    wildcard ('any') for that field.";
    
        revision "2017-12-15" {
          description
            "Add MPLS packet field matches";
          reference
            "1.1.0";
    
        }
    
        revision "2017-05-26" {
          description
            "Separated IP matches into AFs";
          reference
            "1.0.0";
    
        }
    
        revision "2016-08-08" {
          description
            "OpenConfig public release";
          reference
            "0.2.0";
    
        }
    
        revision "2016-04-27" {
          description "Initial revision";
          reference
            "TBD";
    
        }
    
        oc-ext:openconfig-version "1.1.0";
    
        grouping ethernet-header-config {
          description
            "Configuration data of fields in Ethernet header.";
          leaf source-mac {
            type oc-yang:mac-address;
            description
              "Source IEEE 802 MAC address.";
          }
    
          leaf source-mac-mask {
            type oc-yang:mac-address;
            description
              "Source IEEE 802 MAC address mask.";
          }
    
          leaf destination-mac {
            type oc-yang:mac-address;
            description
              "Destination IEEE 802 MAC address.";
          }
    
          leaf destination-mac-mask {
            type oc-yang:mac-address;
            description
              "Destination IEEE 802 MAC address mask.";
          }
    
          leaf ethertype {
            type oc-pkt-match-types:ethertype-type;
            description
              "Ethertype field to match in Ethernet packets";
          }
        }  // grouping ethernet-header-config
    
        grouping ethernet-header-state {
          description
            "State information of fields in Ethernet header.";
        }  // grouping ethernet-header-state
    
        grouping ethernet-header-top {
          description
            "Top level container for fields in Ethernet header.";
          container l2 {
            description "Ethernet header fields";
            container config {
              description "Configuration data";
              uses ethernet-header-config;
            }  // container config
    
            container state {
              config false;
              description "State Information.";
              uses ethernet-header-config;
    
              uses ethernet-header-state;
            }  // container state
          }  // container l2
        }  // grouping ethernet-header-top
    
        grouping mpls-header-top {
          description
            "Top-level container for fields in an MPLS header.";
          container mpls {
            description "MPLS header fields";
            container config {
              description
                "Configuration parameters relating to fields within
    the MPLS header.";
              uses mpls-header-config;
            }  // container config
    
            container state {
              config false;
              description
                "Operational state parameters relating to fields
    within the MPLS header";
              uses mpls-header-config;
            }  // container state
          }  // container mpls
        }  // grouping mpls-header-top
    
        grouping mpls-header-config {
          description
            "Configuration parameters relating to matches within
    MPLS header fields.";
          leaf traffic-class {
            type uint8 {
              range "0..7";
            }
            description
              "The value of the MPLS traffic class (TC) bits,
    formerly known as the EXP bits.";
          }
        }  // grouping mpls-header-config
    
        grouping ip-protocol-fields-common-config {
          description
            "IP protocol fields common to IPv4 and IPv6";
          leaf dscp {
            type oc-inet:dscp;
            description
              "Value of diffserv codepoint.";
          }
    
          leaf protocol {
            type oc-pkt-match-types:ip-protocol-type;
            description
              "The protocol carried in the IP packet, expressed either
    as its IP protocol number, or by a defined identity.";
          }
    
          leaf hop-limit {
            type uint8 {
              range "0..255";
            }
            description
              "The IP packet's hop limit -- known as TTL (in hops) in
    IPv4 packets, and hop limit in IPv6";
          }
        }  // grouping ip-protocol-fields-common-config
    
        grouping ipv4-protocol-fields-config {
          description
            "Configuration data of IP protocol fields
    for IPv4";
          leaf source-address {
            type oc-inet:ipv4-prefix;
            description
              "Source IPv4 address prefix.";
          }
    
          leaf destination-address {
            type oc-inet:ipv4-prefix;
            description
              "Destination IPv4 address prefix.";
          }
    
          uses ip-protocol-fields-common-config;
        }  // grouping ipv4-protocol-fields-config
    
        grouping ipv4-protocol-fields-state {
          description
            "State information of IP header fields for IPv4";
        }  // grouping ipv4-protocol-fields-state
    
        grouping ipv4-protocol-fields-top {
          description
            "IP header fields for IPv4";
          container ipv4 {
            description
              "Top level container for IPv4 match field data";
            container config {
              description
                "Configuration data for IPv4 match fields";
              uses ipv4-protocol-fields-config;
            }  // container config
    
            container state {
              config false;
              description
                "State information for IPv4 match fields";
              uses ipv4-protocol-fields-config;
    
              uses ipv4-protocol-fields-state;
            }  // container state
          }  // container ipv4
        }  // grouping ipv4-protocol-fields-top
    
        grouping ipv6-protocol-fields-config {
          description
            "Configuration data for IPv6 match fields";
          leaf source-address {
            type oc-inet:ipv6-prefix;
            description
              "Source IPv6 address prefix.";
          }
    
          leaf source-flow-label {
            type oc-inet:ipv6-flow-label;
            description
              "Source IPv6 Flow label.";
          }
    
          leaf destination-address {
            type oc-inet:ipv6-prefix;
            description
              "Destination IPv6 address prefix.";
          }
    
          leaf destination-flow-label {
            type oc-inet:ipv6-flow-label;
            description
              "Destination IPv6 Flow label.";
          }
    
          uses ip-protocol-fields-common-config;
        }  // grouping ipv6-protocol-fields-config
    
        grouping ipv6-protocol-fields-state {
          description
            "Operational state data for IPv6 match fields";
        }  // grouping ipv6-protocol-fields-state
    
        grouping ipv6-protocol-fields-top {
          description
            "Top-level grouping for IPv6 match fields";
          container ipv6 {
            description
              "Top-level container for IPv6 match field data";
            container config {
              description
                "Configuration data for IPv6 match fields";
              uses ipv6-protocol-fields-config;
            }  // container config
    
            container state {
              config false;
              description
                "Operational state data for IPv6 match fields";
              uses ipv6-protocol-fields-config;
    
              uses ipv6-protocol-fields-state;
            }  // container state
          }  // container ipv6
        }  // grouping ipv6-protocol-fields-top
    
        grouping transport-fields-config {
          description
            "Configuration data of transport-layer packet fields";
          leaf source-port {
            type oc-pkt-match-types:port-num-range;
            description "Source port or range";
          }
    
          leaf destination-port {
            type oc-pkt-match-types:port-num-range;
            description
              "Destination port or range";
          }
    
          leaf-list tcp-flags {
            type identityref {
              base oc-pkt-match-types:TCP_FLAGS;
            }
            description
              "List of TCP flags to match";
          }
        }  // grouping transport-fields-config
    
        grouping transport-fields-state {
          description
            "State data of transport-fields";
        }  // grouping transport-fields-state
    
        grouping transport-fields-top {
          description
            "Destination transport-fields top level grouping";
          container transport {
            description
              "Transport fields container";
            container config {
              description "Configuration data";
              uses transport-fields-config;
            }  // container config
    
            container state {
              config false;
              description "State data";
              uses transport-fields-config;
    
              uses transport-fields-state;
            }  // container state
          }  // container transport
        }  // grouping transport-fields-top
      }  // module openconfig-packet-match
    

© 2023 YumaWorks, Inc. All rights reserved.