module ietf-diam-trafficclassifier {
yang-version 1.1;
namespace
"urn:ietf:params:xml:ns:yang:ietf-diam-trafficclassifier";
prefix "diamclassifier";
import ietf-inet-types {
prefix inet;
revision-date 2013-07-15;
}
import ietf-yang-types { prefix yang-types; }
organization "IETF Distributed Mobility Management (DMM)
Working Group";
contact
"WG Web:
WG List:
WG Chair: Dapeng Liu
WG Chair: Sri Gundavelli
Editor: Satoru Matsushima
Editor: Lyle Bertz
";
description
"This module contains a collection of YANG definitions for
traffic classification and QoS Attributes for Diameter.
Copyright (c) 2018 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with
respect to this document. Code Components extracted from this
document must include Simplified BSD License text as described
in Section 4.e of the Trust Legal Provisions and are provided
without warranty as described in the Simplified BSD License.";
revision 2018-02-28 {
description
"Initial";
reference
"RFC 5777: Traffic Classification and Quality of Service (QoS)
Attributes for Diameter";
}
typedef eui64-address-type {
type string {
length "6";
}
description
"specifies a single layer 2 address in EUI-64 format.
The value is an 8-octet encoding of the address as
it would appear in the frame header.";
}
typedef direction-type {
type enumeration {
enum IN {
value 0;
description
"Applies to flows from the managed terminal.";
}
enum OUT {
value 1;
description
"Applies to flows to the managed terminal.";
}
enum BOTH {
value 2;
description
"Applies to flows both to and from the managed
terminal.";
}
}
description
"Specifies in which direction to apply the classifier.";
}
typedef negated-flag-type {
type enumeration {
enum False { value 0;
description "false"; }
enum True { value 1;
description "True"; }
}
description
"When set to True, the meaning of the match is
inverted and the classifier will match addresses
other than those specified by the From-Spec or
To-Spec AVP.
Note that the negation does not impact the port
comparisons.";
}
grouping index {
leaf index {
type uint16;
mandatory true;
description "Identifier used for referencing";
}
description "Index Value";
}
grouping to-from-spec-value {
leaf-list ip-address {
type inet:ip-address;
description "IP address";
}
list ip-address-range {
key index;
uses diamclassifier:index;
leaf ip-address-start {
type inet:ip-address;
description "IP Address Start";
}
leaf ip-address-end {
type inet:ip-address;
description "IP Address End";
}
description "IP Address Range";
}
leaf-list ip-address-mask {
type inet:ip-prefix;
description "IP Address Mask";
}
leaf-list mac-address {
type yang-types:mac-address;
description "MAC address";
}
list mac-address-mask {
key mac-address;
leaf mac-address {
type yang-types:mac-address;
mandatory true;
description "MAC address";
}
leaf macaddress-mask-pattern {
type yang-types:mac-address;
mandatory true;
description
"The value specifies the bit positions of a
MAC address that are taken for matching.";
}
description "MAC Address Mask";
}
leaf-list eui64-address {
type diamclassifier:eui64-address-type;
description "EUI64 Address";
}
list eui64-address-mask {
key eui64-address;
leaf eui64-address {
type diamclassifier:eui64-address-type;
mandatory true;
description "eui64 address";
}
leaf eui64-address-mask-pattern {
type diamclassifier:eui64-address-type;
mandatory true;
description
"The value is 8 octets specifying the bit
positions of a EUI64 address that are taken
for matching.";
}
description "EUI64 Address Mask";
}
leaf-list port {
type inet:port-number;
description "Port Number";
}
list port-range {
key index;
uses diamclassifier:index;
leaf ip-address-start {
type inet:port-number;
description "Port Start";
}
leaf ip-address-end {
type inet:port-number;
description "Port End";
}
description "Port Range";
}
leaf negated {
type diamclassifier:negated-flag-type;
description "Negated";
}
leaf use-assigned-address {
type boolean;
description "Use Assigned Address";
}
description
"Basic traffic description value";
}
grouping option-type-group {
leaf option-type {
type uint8;
mandatory true;
description "Option Type";
}
leaf-list ip-option-value {
type string;
description "Option Value";
}
leaf negated {
type diamclassifier:negated-flag-type;
description "Negated";
}
description "Common X Option Pattern";
}
typedef vlan-id {
type uint32 {
range "0..4095";
}
description "VLAN ID";
}
grouping classifier {
leaf protocol {
type uint8;
description "Protocol";
}
leaf direction {
type diamclassifier:direction-type;
description "Direction";
}
list from-spec {
key index;
uses diamclassifier:index;
uses diamclassifier:to-from-spec-value;
description "from specification";
}
list to-spec {
key index;
uses diamclassifier:index;
uses diamclassifier:to-from-spec-value;
description "to specification";
}
leaf-list disffserv-code-point {
type inet:dscp;
description "DSCP";
}
leaf fragmentation-flag {
type enumeration {
enum DF {
value 0;
description "Don't Fragment";
}
enum MF {
value 1;
description "More Fragments";
}
}
description "Fragmenttation Flag";
}
list ip-option {
key option-type;
uses diamclassifier:option-type-group;
description "IP Option Value";
}
list tcp-option {
key option-type;
uses diamclassifier:option-type-group;
description "TCP Option Value";
}
list tcp-flag {
key tcp-flag-type;
leaf tcp-flag-type {
type uint32;
mandatory true;
description "TCP Flag Type";
}
leaf negated {
type diamclassifier:negated-flag-type;
description "Negated";
}
description "TCP Flags";
}
list icmp-option {
key option-type;
uses diamclassifier:option-type-group;
description "ICMP Option Value";
}
list eth-option {
key index;
uses diamclassifier:index;
container eth-proto-type {
leaf-list eth-ether-type {
type string {
length "2";
}
description "value of ethertype field";
}
leaf-list eth-sap {
type string {
length "2";
}
description "802.2 SAP";
}
description "Ether Proto Type";
}
list vlan-id-range {
key index;
uses diamclassifier:index;
leaf-list s-vlan-id-start {
type diamclassifier:vlan-id;
description "S-VID VLAN ID Start";
}
leaf-list s-vlan-id-end {
type diamclassifier:vlan-id;
description "S-VID VLAN ID End";
}
leaf-list c-vlan-id-start {
type diamclassifier:vlan-id;
description "C-VID VLAN ID Start";
}
leaf-list c-vlan-id-end {
type diamclassifier:vlan-id;
description "C-VID VLAN ID End";
}
description "VLAN ID Range";
}
list user-priority-range {
key index;
uses diamclassifier:index;
leaf-list low-user-priority {
type uint32 {
range "0..7";
}
description "Low User Priority";
}
leaf-list high-user-priority {
type uint32 {
range "0..7";
}
description "High User Priority";
}
description "User priority range";
}
description "Ether Option";
}
description "RFC 5777 Classifier";
}
}