bbf-frame-processing-profiles

This module contains a collection of YANG definitions for supporting the Broadband Forum requirements on the management of sub-i...

  • Version: 2023-12-15

    bbf-frame-processing-profiles@2023-12-15


    
      module bbf-frame-processing-profiles {
    
        yang-version 1.1;
    
        namespace
          "urn:bbf:yang:bbf-frame-processing-profiles";
    
        prefix bbf-fpprof;
    
        import bbf-yang-types {
          prefix bbf-yang;
        }
        import bbf-dot1q-types {
          prefix bbf-dot1qt;
        }
        import bbf-frame-processing-types {
          prefix bbf-fpt;
        }
        import bbf-frame-classification {
          prefix bbf-classif;
        }
        import bbf-frame-editing {
          prefix bbf-fedit;
        }
        import ietf-interfaces {
          prefix if;
        }
        import bbf-sub-interfaces {
          prefix bbf-subif;
        }
        import bbf-sub-interface-tagging {
          prefix bbf-subif-tag;
        }
    
        organization
          "Broadband Forum <https://www.broadband-forum.org>
         Common YANG Work Area";
    
        contact
          "Comments or questions about this Broadband Forum YANG module
         should be directed to <mailto:help@broadband-forum.org>.
    
         Editor:      Nick Hancock, Adtran
    
         Editor:      Ludwig Pauwels, Nokia
    
         PS Leader:   Joey Boyd, Adtran
    
         WA Director: Joey Boyd, Adtran
    
         WA Director: Sven Ooghe, Nokia";
    
        description
          "This module contains a collection of YANG definitions for
         supporting the Broadband Forum requirements on the management of
         sub-interfaces as applicable to access network equipment. As
         such, this module is specific to access network equipment (e.g.,
         BBF-specified Access Nodes and FTTdp DPUs).
    
         Specifically, this module contains the definition of a profile
         for classifying frames and performing ingress- and egress-rewrite
         actions, and it augments the frame processing configuration of a
         (VLAN sub-)interface for using this profile
    
         Copyright (c) 2017-2023, Broadband Forum
    
         Redistribution and use in source and binary forms, with or
         without modification, are permitted provided that the following
         conditions are met:
    
         1. Redistributions of source code must retain the above copyright
            notice, this list of conditions and the following disclaimer.
    
         2. Redistributions in binary form must reproduce the above
            copyright notice, this list of conditions and the following
            disclaimer in the documentation and/or other materials
            provided with the distribution.
    
         3. Neither the name of the copyright holder nor the names of its
            contributors may be used to endorse or promote products
            derived from this software without specific prior written
            permission.
    
         THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
         CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES,
         INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
         MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
         DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
         CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
         SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
         NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
         LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
         CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
         STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
         ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
         ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
         The above license is used as a license under copyright only.
         Please reference the Forum IPR Policy for patent licensing terms
         <https://www.broadband-forum.org/ipr-policy>.
    
         Any moral rights which are necessary to exercise under the above
         license grant are also deemed granted under this license.
    
         This version of this YANG module is part of TR-383a7; see
         the TR itself for full legal notices.";
    
        revision "2023-12-15" {
          description
            "Amendment 7.
           * Approval Date:    2023-12-15.
           * Publication Date: 2023-12-15.";
          reference
            "TR-383a7: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-7.pdf>";
    
        }
    
        revision "2023-03-07" {
          description
            "Amendment 6.
           * Approval Date:    2023-03-07.
           * Publication Date: 2023-03-07.";
          reference
            "TR-383a6: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-6.pdf>";
    
        }
    
        revision "2022-03-01" {
          description
            "Amendment 5.
           * Approval Date:    2022-03-01.
           * Publication Date: 2022-03-01.";
          reference
            "TR-383a5: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-5.pdf>";
    
        }
    
        revision "2021-06-02" {
          description
            "Amendment 4.
           * Approval Date:    2021-06-02.
           * Publication Date: 2021-06-02.";
          reference
            "TR-383a4: Common YANG Modules
            	  <https://www.broadband-forum.org/technical/download/
            		   TR-383_Amendment-4.pdf>";
    
        }
    
    
        feature vlan-id-translation {
          description
            "Indicates support for using the frame processing profile in
           combination with VLAN ID translation.";
        }
    
        feature dscp-match-criteria {
          description
            "Indicates support for the use of DSCP values as match
           criteria.";
        }
    
        container frame-processing-profiles {
          description
            "Configuration of frame processing profiles.";
          list frame-processing-profile {
            key "name";
            description
              "A profile providing a mechanism to configure frame processing
             behavior. The frame processing behavior refers to both
             directions:
             - Ingress, refers to frames received from the lower-layer
               interface of an interface referencing this profile into the
               interface referencing this profile.
             - Egress, refers to frames received from a higher-layer of
               the interface stack, or from a forwarder, and that are to
               be transmitted to the lower-layer of the interface
               referencing this profile.
             - In the ingress direction, classification criteria identify
               whether a frame received on the lower-layer interface shall
               be offered to the interface referencing this profile.
             - For both the ingress and egress direction, rewrite
               configuration provides the tag manipulations to be
               performed.";
            leaf name {
              type bbf-yang:string-ascii64;
              description
                "The name of the profile.";
            }
    
            leaf priority {
              type uint16 {
                range "1..max";
              }
              mandatory true;
              description
                "This field indicates the priority for applying the match
               criteria of this rule against the priority of match
               criteria of other rules of this or of other interfaces on
               the same lower-layer interface.
    
               The higher the value, the lower the priority, i.e.,
               priority 1 is the highest priority.";
            }
    
            container match-criteria {
              presence
                "The presence of this container indicates that the profile
               will be configured with positive match criteria.";
              description
                "This container collects match criteria for various frame
               fields.
    
               The match criteria are unambiguous in case a frame field
               is unique. This is not the case for the match criteria
               defined via leaf 'ethernet-frame-type'. The value is to be
               compared with the first Ethertype of an untagged Ethernet
               frame; or for frames that contain one or more VLAN tags it
               is the value to be compared with the Ethertype that is the
               first after the VLAN tags for which a matching criteria is
               specified via the leafs in the case 'vlan-tagged'.
    
               For example, if matching criteria are specified for one
               outer VLAN tag, and a received IPoE frame is single tagged,
               then the leaf 'ethernet-frame-type' refers to the Ethertype
               0x0800 being the Ethertype that identifies the frame as
               IPoE. While the same configuration applied to a received
               IPoE frame that is double tagged, then the leaf
               'ethernet-frame-type' refers to the Ethertype 0x8100 being
               the Ethertype that identifies the frame contains an inner
               VLAN tag.";
              leaf any-frame {
                type empty;
                description
                  "Any frame.
    
                 Configuring the 'any-frame' case is equivalent to not
                 configuring any match-criteria and means that 'all frames
                 match'. This permits explicit configuration, e.g., in
                 case of the Transparent LAN Service (TLS).";
              }
    
              container vlans {
                presence
                  "The presence of this container enables configuration of a
                 filter on VLAN tags.
    
                 If the container is not present, then the presence or
                 absence of VLAN tags in the frame is not a filter
                 criterion and then, as to this filter, 'all frames
                 match'.";
                description
                  "Match criteria associated with VLAN tags.";
                choice vlan-tag-match-type {
                  mandatory true;
                  description
                    "Provides a choice of how the frames may be matched.";
                  leaf untagged {
                    type empty;
                    description
                      "Untagged match. Matches all untagged traffic.";
                  }
                  list tag {
                    key "index";
                    min-elements 1;
                    max-elements 2;
                    description
                      "The tags to match, with the outermost tag to match
                       assigned index 0.";
                    leaf index {
                      type bbf-classif:tag-index;
                      must
                        'count(../../tag[index = 0]) > 0' {
                        error-message
                          "An inner tag has been specified without an "
                            + "outer tag";
                        description
                          "Only allow matching on an inner tag, if also
                           matching on the outer tags at the same time.";
                      }
                      description
                        "The index into the tag stack, outermost tag
                         first.";
                    }
    
                    leaf tag-type {
                      type union {
                        type bbf-dot1qt:dot1q-tag-type;
                        type bbf-dot1qt:ether-type;
                        type bbf-dot1qt:ether-type-hex;
                      }
                      mandatory true;
                      description
                        "VLAN tag type.";
                    }
    
                    leaf vlan-id {
                      type union {
                        type bbf-dot1qt:vlan-id;
                        type enumeration {
                          enum "priority-tagged" {
                            value 0;
                            description
                              "Priority-tagged frames are frames with a
                               VLAN tag present and that match VLAN ID
                               0.";
                          }
                          enum
                            "vlan-id-is-a-parameter" {
                            value 1;
                            description
                              "The VLAN ID to classify frames for is not
                               specified inside this profile but has to be
                               specified at the place where this profile
                               is referenced.";
                          }
                        }
                      }
                      mandatory true;
                      description
                        "Allowed VLAN IDs.";
                    }
    
                    leaf pbit {
                      type union {
                        type bbf-dot1qt:pbit-list;
                        type enumeration {
                          enum "any" {
                            value 0;
                            description
                              "Matches any value of the p-bits in the
                               range of 0 to 7.";
                          }
                        }
                      }
                      default "any";
                      description
                        "Allowed value of the p-bits.";
                    }
    
                    leaf dei {
                      type union {
                        type bbf-dot1qt:dei;
                        type enumeration {
                          enum "any" {
                            value 0;
                            description
                              "Matches any Drop Eligible Indicator (DEI)
                               value, i.e., value 0 or 1.";
                          }
                        }
                      }
                      default "any";
                      description
                        "Allowed DEI values.";
                    }
                  }  // list tag
                }  // choice vlan-tag-match-type
              }  // container vlans
    
              container frame-destination-filter {
                presence
                  "The presence of this container enables configuration of match
    criteria related to one or multiple of the destination fields
    of a frame.
    
    If the container is not present, then none of the destination
    fields of the frame are used as match criterion and then, as
    to this match criterion, 'all frames match'. The same applies
    when the container exists but does not contain any
    configuration.";
                description
                  "Identifies the set of frames to which the frame-forwarding
    action shall apply. If within the container multiple match
    criteria are configured, then these are to be combined with a
    logical OR-operation. This applies to multiple entries in the
    same list, and to entries in different lists.";
                list destination-mac-address {
                  key "name";
                  description
                    "The frame classification to be performed on the
    destination MAC address.";
                  leaf name {
                    type bbf-yang:string-ascii64;
                    description "The rule name.";
                  }
    
                  choice mac-address {
                    description
                      "A choice on the value of the MAC address.";
                    case any-multicast-mac-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as a multicast MAC address.";
                      leaf any-multicast-mac-address {
                        type empty;
                        description
                          "The MAC address is classified as a multicast address,
    i.e., it is an address for which the least significant
    bit of the first octet is set to 1.";
                      }
                    }  // case any-multicast-mac-address
    
                    case unicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as a unicast address.";
                      leaf unicast-address {
                        type empty;
                        description
                          "The MAC address is classified as a unicast address, i.e.,
    it is an address for which the least significant bit of
    the first octet is set to 0 (zero).";
                      }
                    }  // case unicast-address
    
                    case broadcast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as the broadcast address.";
                      leaf broadcast-address {
                        type empty;
                        description
                          "The MAC address is classified as a broadcast address,
    i.e., address FF:FF:FF:FF:FF:FF.";
                      }
                    }  // case broadcast-address
    
                    case cfm-multicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as a CFM OAM multicast address.";
                      leaf cfm-multicast-address {
                        type empty;
                        description
                          "The MAC address is classified as a CFM multicast address,
    i.e., it is an address of the form 01:80:C2:00:00:3X.";
                        reference
                          "IEEE 802.1Q-2014 Clause 8.13.11";
    
                      }
                    }  // case cfm-multicast-address
    
                    case ipv4-multicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as an IPv4 multicast address.";
                      leaf ipv4-multicast-address {
                        type empty;
                        description
                          "The MAC address is classified as an IPv4 multicast
    address, i.e., it is an address in the range
    01:00:5E:00:00:00 up to and including
    01:00:5E:7F:FF:FF.";
                      }
                    }  // case ipv4-multicast-address
    
                    case ipv6-multicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as an IPv6 multicast address.";
                      leaf ipv6-multicast-address {
                        type empty;
                        description
                          "The MAC address is classified as an IPv6 multicast
    address, i.e., it is an address of the form
    33:33:XX:XX:XX:XX.";
                      }
                    }  // case ipv6-multicast-address
    
                    case mac-address-filter {
                      description
                        "The value and the mask together identify a set of MAC
    addresses that comply with this classification. Evaluation
    is performed by making a bit-wise AND operation between the
    to be evaluated MAC address and the mac-address-mask. There
    is a match if the result equals the value specified in the
    mac-address-value.";
                      leaf mac-address-value {
                        type yang:mac-address;
                        description
                          "The value with which a comparison shall be made after
    performing the bit-wise AND operation on the to be
    evaluated MAC address.";
                      }
    
                      leaf mac-address-mask {
                        type yang:mac-address;
                        default
                          "FF:FF:FF:FF:FF:FF";
                        description
                          "A mask to be applied on the to be evaluated MAC address.
    The mask is applied as a bit-wise AND operation.";
                      }
                    }  // case mac-address-filter
                  }  // choice mac-address
                }  // list destination-mac-address
    
                list destination-ipv4-address {
                  key "name";
                  description
                    "The frame classification to be performed on the destination
    IPv4 address.";
                  leaf name {
                    type bbf-yang:string-ascii64;
                    description "The rule name.";
                  }
    
                  choice ipv4-address {
                    description
                      "A choice on the value of the IPv4 address.";
                    case any-multicast-ipv4-address {
                      description
                        "This represents all IPv4 addresses in the range 224.0.0.0
    up to 239.255.255.255.";
                      leaf any-multicast-ipv4-address {
                        type empty;
                        description
                          "Indicates the address is an IPv4 multicast group
    address.";
                      }
                    }  // case any-multicast-ipv4-address
    
                    case all-hosts-multicast-address {
                      description
                        "This represents the 'all hosts' IPv4 multicast group
    address 224.0.0.1 that is used to address all hosts on the
    same network segment.";
                      leaf all-hosts-multicast-address {
                        type empty;
                        description
                          "Indicates the IPv4 address is the 'all hosts' IPv4
    multicast group address.";
                      }
                    }  // case all-hosts-multicast-address
    
                    case rip-multicast-address {
                      description
                        "This represents the RIP version 2 IPv4 multicast group
    address 224.0.0.9 that is used to send routing information
    to all RIPv2-aware routers on a network segment.";
                      leaf rip-multicast-address {
                        type empty;
                        description
                          "Indicates the IPv4 address is the RIP version 2 IPv4
    multicast group address.";
                      }
                    }  // case rip-multicast-address
    
                    case ntp-multicast-address {
                      description
                        "This represents the NTP group IPv4 multicast group address
    224.0.1.1 that is used to send network timing protocol
    messages to all NTP clients on a network segment.";
                      leaf ntp-multicast-address {
                        type empty;
                        description
                          "Indicates the IPv4 address is the NTP IPv4 multicast
    group address.";
                      }
                    }  // case ntp-multicast-address
    
                    case ipv4-prefix {
                      if-feature bbf-classif:filter-on-ip-prefix;
                      description
                        "This represents an IPv4 address prefix.";
                      leaf ipv4-prefix {
                        type inet:ipv4-prefix;
                        description
                          "This represents an IPv4 address prefix. The prefix length
    is given by the number following the slash character and
    must be less than or equal to 32.";
                      }
                    }  // case ipv4-prefix
                  }  // choice ipv4-address
                }  // list destination-ipv4-address
    
                list destination-ipv6-address {
                  key "name";
                  description
                    "The frame classification to be performed on the destination
    IPv6 address.";
                  leaf name {
                    type bbf-yang:string-ascii64;
                    description "The rule name.";
                  }
    
                  choice ipv6-address {
                    description
                      "A choice on the value of the IPv6 address.";
                    case any-multicast-ipv6-address {
                      description
                        "This represents all IPv6 addresses which use the prefix
    ff00::/8.";
                      leaf any-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the address is an IPv6 multicast address.";
                      }
                    }  // case any-multicast-ipv6-address
    
                    case all-nodes-multicast-ipv6-address {
                      description
                        "This represents the 'all nodes' IPv6 multicast address
    ff02::1 which is used to address all nodes on the local
    network segment.";
                      leaf all-nodes-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the IPv6 address is the 'all nodes' IPv6
    multicast address.";
                      }
                    }  // case all-nodes-multicast-ipv6-address
    
                    case rip-multicast-ipv6-address {
                      description
                        "This represents the Routing Information Protocol(RIP)
    IPv6 multicast address ff02::9 which is used to send
    routing information to all RIP aware routers on a network
    segment.";
                      leaf rip-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the IPv6 address is the RIP routers IPv6
    multicast address.";
                      }
                    }  // case rip-multicast-ipv6-address
    
                    case ntp-multicast-ipv6-address {
                      description
                        "This represents the NTP IPv6 multicast address ff02::101
    which is used to send Network Timing Protocol (NTP)
    messages to all NTP clients on a network segment.";
                      leaf ntp-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the IPv6 address is the NTP IPv6 multicast
    address.";
                      }
                    }  // case ntp-multicast-ipv6-address
    
                    case ipv6-prefix {
                      if-feature bbf-classif:filter-on-ip-prefix;
                      description
                        "This represents an IPv6 address prefix.";
                      leaf ipv6-prefix {
                        type inet:ipv6-prefix;
                        description
                          "This represents an IPv6 address prefix. The prefix length
    is given by the number following the slash character and
    must be less than or equal to 128.";
                      }
                    }  // case ipv6-prefix
                  }  // choice ipv6-address
                }  // list destination-ipv6-address
              }  // container frame-destination-filter
    
              leaf-list ethernet-frame-type {
                type bbf-dot1qt:ether-type-or-acronym;
                description
                  "The value to be compared with the first Ethertype of an
    untagged Ethernet frame; or for frames that contain one or
    more VLAN tags it is the value to be compared with the
    Ethertype that is defined by the context where this grouping
    is used. It can be even the Ethertype that identifies a VLAN
    tag.";
              }
    
              leaf-list protocol {
                type protocols;
                description
                  "Defines the protocols which will be matched.";
              }
    
              leaf dscp-range {
                type bbf-inet:dscp-range;
                description
                  "String identifying the DSCP values and/or range.";
                reference
                  "RFC 2474";
    
              }
            }  // container match-criteria
    
            container exclude-criteria {
              if-feature bbf-subif-tag:exclude-criteria;
              presence
                "The presence of this container indicates that the profile
               will be configured with exclude criteria.";
              description
                "Exclude criteria extend the match criteria defined within
               the container 'match-criteria'. In other words, a frame
               matches in the interface referencing this profile when it
               matches the criteria defined in 'match-criteria' container
               AND if it does not match the criteria defined in the
               'exclude-criteria' container. A non-existing
               'exclude-criteria' container means it does not provide
               additional criteria and all frames match that part of the
               classification.";
              container frame-destination-filter {
                presence
                  "The presence of this container enables configuration of match
    criteria related to one or multiple of the destination fields
    of a frame.
    
    If the container is not present, then none of the destination
    fields of the frame are used as match criterion and then, as
    to this match criterion, 'all frames match'. The same applies
    when the container exists but does not contain any
    configuration.";
                description
                  "Identifies the set of frames to which the frame-forwarding
    action shall apply. If within the container multiple match
    criteria are configured, then these are to be combined with a
    logical OR-operation. This applies to multiple entries in the
    same list, and to entries in different lists.";
                list destination-mac-address {
                  key "name";
                  description
                    "The frame classification to be performed on the
    destination MAC address.";
                  leaf name {
                    type bbf-yang:string-ascii64;
                    description "The rule name.";
                  }
    
                  choice mac-address {
                    description
                      "A choice on the value of the MAC address.";
                    case any-multicast-mac-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as a multicast MAC address.";
                      leaf any-multicast-mac-address {
                        type empty;
                        description
                          "The MAC address is classified as a multicast address,
    i.e., it is an address for which the least significant
    bit of the first octet is set to 1.";
                      }
                    }  // case any-multicast-mac-address
    
                    case unicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as a unicast address.";
                      leaf unicast-address {
                        type empty;
                        description
                          "The MAC address is classified as a unicast address, i.e.,
    it is an address for which the least significant bit of
    the first octet is set to 0 (zero).";
                      }
                    }  // case unicast-address
    
                    case broadcast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as the broadcast address.";
                      leaf broadcast-address {
                        type empty;
                        description
                          "The MAC address is classified as a broadcast address,
    i.e., address FF:FF:FF:FF:FF:FF.";
                      }
                    }  // case broadcast-address
    
                    case cfm-multicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as a CFM OAM multicast address.";
                      leaf cfm-multicast-address {
                        type empty;
                        description
                          "The MAC address is classified as a CFM multicast address,
    i.e., it is an address of the form 01:80:C2:00:00:3X.";
                        reference
                          "IEEE 802.1Q-2014 Clause 8.13.11";
    
                      }
                    }  // case cfm-multicast-address
    
                    case ipv4-multicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as an IPv4 multicast address.";
                      leaf ipv4-multicast-address {
                        type empty;
                        description
                          "The MAC address is classified as an IPv4 multicast
    address, i.e., it is an address in the range
    01:00:5E:00:00:00 up to and including
    01:00:5E:7F:FF:FF.";
                      }
                    }  // case ipv4-multicast-address
    
                    case ipv6-multicast-address {
                      description
                        "This case applies when the to-be-classified MAC address is
    classified as an IPv6 multicast address.";
                      leaf ipv6-multicast-address {
                        type empty;
                        description
                          "The MAC address is classified as an IPv6 multicast
    address, i.e., it is an address of the form
    33:33:XX:XX:XX:XX.";
                      }
                    }  // case ipv6-multicast-address
    
                    case mac-address-filter {
                      description
                        "The value and the mask together identify a set of MAC
    addresses that comply with this classification. Evaluation
    is performed by making a bit-wise AND operation between the
    to be evaluated MAC address and the mac-address-mask. There
    is a match if the result equals the value specified in the
    mac-address-value.";
                      leaf mac-address-value {
                        type yang:mac-address;
                        description
                          "The value with which a comparison shall be made after
    performing the bit-wise AND operation on the to be
    evaluated MAC address.";
                      }
    
                      leaf mac-address-mask {
                        type yang:mac-address;
                        default
                          "FF:FF:FF:FF:FF:FF";
                        description
                          "A mask to be applied on the to be evaluated MAC address.
    The mask is applied as a bit-wise AND operation.";
                      }
                    }  // case mac-address-filter
                  }  // choice mac-address
                }  // list destination-mac-address
    
                list destination-ipv4-address {
                  key "name";
                  description
                    "The frame classification to be performed on the destination
    IPv4 address.";
                  leaf name {
                    type bbf-yang:string-ascii64;
                    description "The rule name.";
                  }
    
                  choice ipv4-address {
                    description
                      "A choice on the value of the IPv4 address.";
                    case any-multicast-ipv4-address {
                      description
                        "This represents all IPv4 addresses in the range 224.0.0.0
    up to 239.255.255.255.";
                      leaf any-multicast-ipv4-address {
                        type empty;
                        description
                          "Indicates the address is an IPv4 multicast group
    address.";
                      }
                    }  // case any-multicast-ipv4-address
    
                    case all-hosts-multicast-address {
                      description
                        "This represents the 'all hosts' IPv4 multicast group
    address 224.0.0.1 that is used to address all hosts on the
    same network segment.";
                      leaf all-hosts-multicast-address {
                        type empty;
                        description
                          "Indicates the IPv4 address is the 'all hosts' IPv4
    multicast group address.";
                      }
                    }  // case all-hosts-multicast-address
    
                    case rip-multicast-address {
                      description
                        "This represents the RIP version 2 IPv4 multicast group
    address 224.0.0.9 that is used to send routing information
    to all RIPv2-aware routers on a network segment.";
                      leaf rip-multicast-address {
                        type empty;
                        description
                          "Indicates the IPv4 address is the RIP version 2 IPv4
    multicast group address.";
                      }
                    }  // case rip-multicast-address
    
                    case ntp-multicast-address {
                      description
                        "This represents the NTP group IPv4 multicast group address
    224.0.1.1 that is used to send network timing protocol
    messages to all NTP clients on a network segment.";
                      leaf ntp-multicast-address {
                        type empty;
                        description
                          "Indicates the IPv4 address is the NTP IPv4 multicast
    group address.";
                      }
                    }  // case ntp-multicast-address
    
                    case ipv4-prefix {
                      if-feature bbf-classif:filter-on-ip-prefix;
                      description
                        "This represents an IPv4 address prefix.";
                      leaf ipv4-prefix {
                        type inet:ipv4-prefix;
                        description
                          "This represents an IPv4 address prefix. The prefix length
    is given by the number following the slash character and
    must be less than or equal to 32.";
                      }
                    }  // case ipv4-prefix
                  }  // choice ipv4-address
                }  // list destination-ipv4-address
    
                list destination-ipv6-address {
                  key "name";
                  description
                    "The frame classification to be performed on the destination
    IPv6 address.";
                  leaf name {
                    type bbf-yang:string-ascii64;
                    description "The rule name.";
                  }
    
                  choice ipv6-address {
                    description
                      "A choice on the value of the IPv6 address.";
                    case any-multicast-ipv6-address {
                      description
                        "This represents all IPv6 addresses which use the prefix
    ff00::/8.";
                      leaf any-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the address is an IPv6 multicast address.";
                      }
                    }  // case any-multicast-ipv6-address
    
                    case all-nodes-multicast-ipv6-address {
                      description
                        "This represents the 'all nodes' IPv6 multicast address
    ff02::1 which is used to address all nodes on the local
    network segment.";
                      leaf all-nodes-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the IPv6 address is the 'all nodes' IPv6
    multicast address.";
                      }
                    }  // case all-nodes-multicast-ipv6-address
    
                    case rip-multicast-ipv6-address {
                      description
                        "This represents the Routing Information Protocol(RIP)
    IPv6 multicast address ff02::9 which is used to send
    routing information to all RIP aware routers on a network
    segment.";
                      leaf rip-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the IPv6 address is the RIP routers IPv6
    multicast address.";
                      }
                    }  // case rip-multicast-ipv6-address
    
                    case ntp-multicast-ipv6-address {
                      description
                        "This represents the NTP IPv6 multicast address ff02::101
    which is used to send Network Timing Protocol (NTP)
    messages to all NTP clients on a network segment.";
                      leaf ntp-multicast-ipv6-address {
                        type empty;
                        description
                          "Indicates the IPv6 address is the NTP IPv6 multicast
    address.";
                      }
                    }  // case ntp-multicast-ipv6-address
    
                    case ipv6-prefix {
                      if-feature bbf-classif:filter-on-ip-prefix;
                      description
                        "This represents an IPv6 address prefix.";
                      leaf ipv6-prefix {
                        type inet:ipv6-prefix;
                        description
                          "This represents an IPv6 address prefix. The prefix length
    is given by the number following the slash character and
    must be less than or equal to 128.";
                      }
                    }  // case ipv6-prefix
                  }  // choice ipv6-address
                }  // list destination-ipv6-address
              }  // container frame-destination-filter
    
              leaf-list ethernet-frame-type {
                type bbf-dot1qt:ether-type-or-acronym;
                description
                  "The value to be compared with the first Ethertype of an
    untagged Ethernet frame; or for frames that contain one or
    more VLAN tags it is the value to be compared with the
    Ethertype that is defined by the context where this grouping
    is used. It can be even the Ethertype that identifies a VLAN
    tag.";
              }
    
              leaf-list protocol {
                type protocols;
                description
                  "Defines the protocols which will be matched.";
              }
    
              leaf dscp-range {
                type bbf-inet:dscp-range;
                description
                  "String identifying the DSCP values and/or range.";
                reference
                  "RFC 2474";
    
              }
            }  // container exclude-criteria
    
            container ingress-rewrite {
              presence
                "The presence of this container indicates that ingress
               frames will be subject to VLAN tag manipulations.";
              description
                "Ingress rewrite refers to the supported tag manipulations
               before the frame is offered to a higher-layer interface or
               to a forwarder.";
              list copy-from-tags-to-marking-list {
                key "tag-index";
                description
                  "Input VLAN tag from which p-bits and/or DEI bits will be
                 preserved.";
                leaf tag-index {
                  type bbf-classif:tag-index;
                  description
                    "Specifies from which input VLAN tag fields must be
                   copied to the frame's marking list.";
                }
    
                leaf pbit-marking-index {
                  type union {
                    type enumeration {
                      enum "not-preserved" {
                        value 0;
                        description
                          "The p-bits are not preserved.";
                      }
                    }
                    type bbf-fpt:qos-pbit-marking-index;
                  }
                  default "not-preserved";
                  description
                    "Specifies the index of the frame's p-bit marking list
                   to which the p-bits shall be copied.";
                }
    
                leaf dei-marking-index {
                  type union {
                    type enumeration {
                      enum "not-preserved" {
                        value 0;
                        description
                          "The DEI bit is not preserved.";
                      }
                    }
                    type bbf-fpt:qos-dei-marking-index;
                  }
                  default "not-preserved";
                  description
                    "Specifies the index of the frame's DEI marking list to
                   which the DEI bit shall be copied.";
                }
              }  // list copy-from-tags-to-marking-list
    
              leaf pop-tags {
                type uint8 {
                  range "0..2";
                }
                default "0";
                description
                  "The number of tags to pop.";
              }
    
              list push-tag {
                if-feature bbf-fpprof:vlan-id-translation;
                key "index";
                max-elements 2;
                description
                  "Makes the push-tag data node feature dependent.";
                leaf index {
                  type bbf-fpt:tag-index;
                  must
                    "(count(../../push-tag[index = 0]) > 0)" {
                    error-message
                      "An inner tag has been specified without an outer tag";
                    description
                      "Only allow a push of an inner tag if an outer tag is also
    being pushed.";
                  }
                  description
                    "The index into the tag stack.";
                }
    
                choice pbit {
                  mandatory true;
                  description
                    "Selects how the p-bits are to be written.";
                  case write-pbit-0 {
                    description
                      "Tagged and priority-tagged frames contain p-bits. Untagged
    frames do not contain p-bits.
    
    Provides a simple method to identify what p-bits MUST be
    inserted in the output frame that can be applied to all
    frame types. More advanced methods can be provided via
    other cases of the choice 'pbit'.";
                    leaf write-pbit-0 {
                      type empty;
                      description
                        "Push p-bits=000 in the tag.";
                    }
                  }  // case write-pbit-0
    
                  case copy-pbit-from-input-or-0 {
                    description
                      "Copy from the specified input tag, or write p-bits=000 if
    the input tag does not exist.";
                    leaf pbit-from-tag-index {
                      type bbf-fpt:tag-index;
                      description
                        "Specifies from which tag the p-bits MUST be copied.";
                    }
                  }  // case copy-pbit-from-input-or-0
    
                  case write-pbit-value {
                    if-feature bbf-subif-tag:write-pbit-value-in-vlan-tag;
                    description
                      "Write a value of the p-bits into the tag.";
                    leaf write-pbit {
                      type bbf-dot1qt:pbit;
                      description
                        "Specified value of the p-bits to write into the tag.";
                    }
                  }  // case write-pbit-value
    
                  case generate-pbit-from-marking-list-or-0 {
                    description
                      "The p-bits field in the VLAN tag is generated from the
    frame's p-bit marking list.
    
    If there are no p-bits in the p-bit marking list, then
    p-bits=000 is pushed in the VLAN tag of the frame.";
                    leaf pbit-marking-index {
                      type bbf-fpt:qos-pbit-marking-index;
                      description
                        "This leaf provides the index in the p-bit marking list
    from which the value of the p-bits shall be taken to put
    in the VLAN tag.";
                    }
                  }  // case generate-pbit-from-marking-list-or-0
                }  // choice pbit
    
                choice dei {
                  mandatory true;
                  description
                    "Selects how the DEI bit is to be written.";
                  case write-dei-0 {
                    description
                      "Tagged and priority-tagged frames contain a DEI bit.
    Untagged frames do not contain a DEI bit.
    
    Leaf 'write-dei-0' provides a simple method to identify
    what DEI MUST be inserted in the output frame that can be
    applied to all frame types. More advanced methods can be
    provided via other cases of the choice 'dei'.";
                    leaf write-dei-0 {
                      type empty;
                      description
                        "Write the value 0 for DEI in the tag.";
                    }
                  }  // case write-dei-0
    
                  case copy-dei-from-input-or-0 {
                    description
                      "Copy DEI from the specified input tag, or write DEI=0 if
    the input tag does not exist.";
                    leaf dei-from-tag-index {
                      type bbf-fpt:tag-index;
                      description
                        "Specifies from which tag the DEI bit MUST be copied.";
                    }
                  }  // case copy-dei-from-input-or-0
    
                  case write-dei-1 {
                    description
                      "Tagged and priority-tagged frames contain a DEI bit.
    Untagged frames do not contain a DEI bit.
    
    Leaf 'write-dei-1' provides a simple method to identify
    what DEI MUST be inserted in the output frame that can be
    applied to all frame types. More advanced methods can be
    provided via other cases of the choice 'dei'.";
                    leaf write-dei-1 {
                      type empty;
                      description
                        "Write the value 1 for DEI in the tag.";
                    }
                  }  // case write-dei-1
    
                  case generate-dei-from-marking-list-or-0 {
                    description
                      "The DEI field in the VLAN tag is generated from the frame's
    DEI marking list.
    
    If there is no DEI bit in the DEI marking list, then the
    DEI value 0 is written in the VLAN tag of the frame.";
                    leaf dei-marking-index {
                      type bbf-fpt:qos-dei-marking-index;
                      description
                        "This leaf provides the index in the DEI marking list from
    which the DEI value shall be taken to put in the VLAN
    tag.";
                    }
                  }  // case generate-dei-from-marking-list-or-0
                }  // choice dei
    
                leaf tag-type {
                  type union {
                    type bbf-dot1qt:dot1q-tag-type;
                    type bbf-dot1qt:ether-type;
                    type bbf-dot1qt:ether-type-hex;
                  }
                  mandatory true;
                  description "VLAN tag type.";
                }
    
                leaf vlan-id {
                  type union {
                    type bbf-dot1qt:vlan-id-or-0;
                    type enumeration {
                      enum
                        "vlan-id-is-a-parameter" {
                        value 0;
                        description
                          "The VLAN ID of the tag to push into frames is
    not specified inside this profile but has to be
    specified at the place where this profile is
    referenced.";
                      }
                    }
                  }
                  mandatory true;
                  description
                    "The VLAN ID value to write in the sent frames'
    identified VLAN tag.";
                }
              }  // list push-tag
            }  // container ingress-rewrite
    
            container egress-rewrite {
              presence
                "The presence of this container indicates that egress frames
               will be subject to VLAN tag manipulations.";
              description
                "Egress refers to frames sent from the interface from which
               this profile is referenced towards the the lower-layer in
               the interface stack, i.e., in the direction of the physical
               interface. Rewrite refers to the supported tag
               manipulations.";
              leaf pop-tags {
                if-feature bbf-fpprof:vlan-id-translation;
                type uint8 {
                  range "0..2";
                }
                default "0";
                description
                  "Makes the 'pop-tags' data node feature dependent.";
              }
    
              list push-tag {
                key "index";
                max-elements 2;
                description
                  "The VLAN tags to push.";
                leaf index {
                  type bbf-fpt:tag-index;
                  must
                    "(count(../../push-tag[index = 0]) > 0)" {
                    error-message
                      "An inner tag has been specified without an outer tag";
                    description
                      "Only allow a push of an inner tag if an outer tag is also
    being pushed.";
                  }
                  description
                    "The index into the tag stack.";
                }
    
                choice pbit {
                  mandatory true;
                  description
                    "Selects how the p-bits are to be written.";
                  case write-pbit-0 {
                    description
                      "Tagged and priority-tagged frames contain p-bits. Untagged
    frames do not contain p-bits.
    
    Provides a simple method to identify what p-bits MUST be
    inserted in the output frame that can be applied to all
    frame types. More advanced methods can be provided via
    other cases of the choice 'pbit'.";
                    leaf write-pbit-0 {
                      type empty;
                      description
                        "Push p-bits=000 in the tag.";
                    }
                  }  // case write-pbit-0
    
                  case copy-pbit-from-input-or-0 {
                    description
                      "Copy from the specified input tag, or write p-bits=000 if
    the input tag does not exist.";
                    leaf pbit-from-tag-index {
                      type bbf-fpt:tag-index;
                      description
                        "Specifies from which tag the p-bits MUST be copied.";
                    }
                  }  // case copy-pbit-from-input-or-0
    
                  case write-pbit-value {
                    if-feature bbf-subif-tag:write-pbit-value-in-vlan-tag;
                    description
                      "Write a value of the p-bits into the tag.";
                    leaf write-pbit {
                      type bbf-dot1qt:pbit;
                      description
                        "Specified value of the p-bits to write into the tag.";
                    }
                  }  // case write-pbit-value
    
                  case generate-pbit-from-marking-list-or-0 {
                    description
                      "The p-bits field in the VLAN tag is generated from the
    frame's p-bit marking list.
    
    If there are no p-bits in the p-bit marking list, then
    p-bits=000 is pushed in the VLAN tag of the frame.";
                    leaf pbit-marking-index {
                      type bbf-fpt:qos-pbit-marking-index;
                      description
                        "This leaf provides the index in the p-bit marking list
    from which the value of the p-bits shall be taken to put
    in the VLAN tag.";
                    }
                  }  // case generate-pbit-from-marking-list-or-0
                }  // choice pbit
    
                choice dei {
                  mandatory true;
                  description
                    "Selects how the DEI bit is to be written.";
                  case write-dei-0 {
                    description
                      "Tagged and priority-tagged frames contain a DEI bit.
    Untagged frames do not contain a DEI bit.
    
    Leaf 'write-dei-0' provides a simple method to identify
    what DEI MUST be inserted in the output frame that can be
    applied to all frame types. More advanced methods can be
    provided via other cases of the choice 'dei'.";
                    leaf write-dei-0 {
                      type empty;
                      description
                        "Write the value 0 for DEI in the tag.";
                    }
                  }  // case write-dei-0
    
                  case copy-dei-from-input-or-0 {
                    description
                      "Copy DEI from the specified input tag, or write DEI=0 if
    the input tag does not exist.";
                    leaf dei-from-tag-index {
                      type bbf-fpt:tag-index;
                      description
                        "Specifies from which tag the DEI bit MUST be copied.";
                    }
                  }  // case copy-dei-from-input-or-0
    
                  case write-dei-1 {
                    description
                      "Tagged and priority-tagged frames contain a DEI bit.
    Untagged frames do not contain a DEI bit.
    
    Leaf 'write-dei-1' provides a simple method to identify
    what DEI MUST be inserted in the output frame that can be
    applied to all frame types. More advanced methods can be
    provided via other cases of the choice 'dei'.";
                    leaf write-dei-1 {
                      type empty;
                      description
                        "Write the value 1 for DEI in the tag.";
                    }
                  }  // case write-dei-1
    
                  case generate-dei-from-marking-list-or-0 {
                    description
                      "The DEI field in the VLAN tag is generated from the frame's
    DEI marking list.
    
    If there is no DEI bit in the DEI marking list, then the
    DEI value 0 is written in the VLAN tag of the frame.";
                    leaf dei-marking-index {
                      type bbf-fpt:qos-dei-marking-index;
                      description
                        "This leaf provides the index in the DEI marking list from
    which the DEI value shall be taken to put in the VLAN
    tag.";
                    }
                  }  // case generate-dei-from-marking-list-or-0
                }  // choice dei
    
                leaf tag-type {
                  type union {
                    type bbf-dot1qt:dot1q-tag-type;
                    type bbf-dot1qt:ether-type;
                    type bbf-dot1qt:ether-type-hex;
                    type enumeration {
                      enum "tag-type-from-match" {
                        value 0;
                        description
                          "The same value that is used in the
                           match-criteria tag's list element with the same
                           index is pushed into the frame.";
                      }
                    }
                  }
                  default "tag-type-from-match";
                  description "VLAN tag type.";
                }
    
                leaf vlan-id {
                  type union {
                    type bbf-dot1qt:vlan-id-or-0;
                    type enumeration {
                      enum "vlan-id-from-match" {
                        value 0;
                        description
                          "The same value that is used in the
                           match-criteria tag's list element with the same
                           index is pushed into the frame.";
                      }
                    }
                  }
                  default "vlan-id-from-match";
                  description
                    "The VLAN ID value to write in the sent frames'
    identified VLAN tag.";
                }
              }  // list push-tag
            }  // container egress-rewrite
          }  // list frame-processing-profile
        }  // container frame-processing-profiles
      }  // module bbf-frame-processing-profiles
    

© 2023 YumaWorks, Inc. All rights reserved.