module ietf-packet-fields { yang-version 1.1; namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields"; prefix packet-fields; import ietf-inet-types { prefix inet; } import ietf-yang-types { prefix yang; } organization "IETF NETMOD (NETCONF Data Modeling Language) Working Group"; contact "WG Web: http://tools.ietf.org/wg/netmod/ WG List: netmod@ietf.org WG Chair: Juergen Schoenwaelder j.schoenwaelder@jacobs-university.de WG Chair: Tom Nadeau tnadeau@lucidvision.com Editor: Dean Bogdanovic deanb@juniper.net Editor: Kiran Agrahara Sreenivasa kkoushik@cisco.com Editor: Lisa Huang lyihuang16@gmail.com Editor: Dana Blair dblair@cisco.com"; description "This YANG module defines groupings that are used by ietf-access-control-list YANG module. Their usage is not limited to ietf-access-control-list and can be used anywhere as applicable. Copyright (c) 2015 IETF Trust and the persons identified as the document authors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, is permitted pursuant to, and subject to the license terms contained in, the Simplified BSD License set forth in Section 4.c of the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info). This version of this YANG module is part of RFC XXXX; see the RFC itself for full legal notices."; revision 2016-07-08 { description "Initial version of packet fields used by ietf-access-control-list"; reference "RFC XXXX: Network Access Control List (ACL) YANG Data Model"; } grouping acl-transport-header-fields { description "Transport header fields"; container source-port-range { presence "Enables setting source port range"; description "Inclusive range representing source ports to be used. When only lower-port is present, it represents a single port."; leaf lower-port { type inet:port-number; mandatory true; description "Lower boundary for port."; } leaf upper-port { type inet:port-number; must ". >= ../lower-port" { error-message "The upper-port must be greater than or equal to lower-port"; } description "Upper boundary for port . If existing, the upper port must be greater or equal to lower-port."; } } container destination-port-range { presence "Enables setting destination port range"; description "Inclusive range representing destination ports to be used. When only lower-port is present, it represents a single port."; leaf lower-port { type inet:port-number; mandatory true; description "Lower boundary for port."; } leaf upper-port { type inet:port-number; must ". >= ../lower-port" { error-message "The upper-port must be greater than or equal to lower-port"; } description "Upper boundary for port. If existing, the upper port must be greater or equal to lower-port"; } } } grouping acl-ip-header-fields { description "IP header fields common to ipv4 and ipv6"; leaf dscp { type inet:dscp; description "Value of dscp."; } leaf protocol { type uint8; description "Internet Protocol number."; } uses acl-transport-header-fields; } grouping acl-ipv4-header-fields { description "Fields in IPv4 header."; leaf destination-ipv4-network { type inet:ipv4-prefix; description "Destination IPv4 address prefix."; } leaf source-ipv4-network { type inet:ipv4-prefix; description "Source IPv4 address prefix."; } } grouping acl-ipv6-header-fields { description "Fields in IPv6 header"; leaf destination-ipv6-network { type inet:ipv6-prefix; description "Destination IPv6 address prefix."; } leaf source-ipv6-network { type inet:ipv6-prefix; description "Source IPv6 address prefix."; } leaf flow-label { type inet:ipv6-flow-label; description "IPv6 Flow label."; } reference "RFC 4291: IP Version 6 Addressing Architecture RFC 4007: IPv6 Scoped Address Architecture RFC 5952: A Recommendation for IPv6 Address Text Representation"; } grouping acl-eth-header-fields { description "Fields in Ethernet header."; leaf destination-mac-address { type yang:mac-address; description "Destination IEEE 802 MAC address."; } leaf destination-mac-address-mask { type yang:mac-address; description "Destination IEEE 802 MAC address mask."; } leaf source-mac-address { type yang:mac-address; description "Source IEEE 802 MAC address."; } leaf source-mac-address-mask { type yang:mac-address; description "Source IEEE 802 MAC address mask."; } reference "IEEE 802: IEEE Standard for Local and Metropolitan Area Networks: Overview and Architecture."; } }