1 module ietf-packet-fields {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields";
5 import ietf-inet-types {
8 import ietf-yang-types {
11 organization "IETF NETMOD (NETCONF Data Modeling Language) Working
14 "WG Web: http://tools.ietf.org/wg/netmod/
15 WG List: netmod@ietf.org
16 WG Chair: Juergen Schoenwaelder
17 j.schoenwaelder@jacobs-university.de
19 tnadeau@lucidvision.com
20 Editor: Dean Bogdanovic
22 Editor: Kiran Agrahara Sreenivasa
29 "This YANG module defines groupings that are used by
30 ietf-access-control-list YANG module. Their usage is not
31 limited to ietf-access-control-list and can be
32 used anywhere as applicable.
33 Copyright (c) 2015 IETF Trust and the persons identified as
34 the document authors. All rights reserved.
35 Redistribution and use in source and binary forms, with or
36 without modification, is permitted pursuant to, and subject
37 to the license terms contained in, the Simplified BSD
38 License set forth in Section 4.c of the IETF Trust's Legal
39 Provisions Relating to IETF Documents
40 (http://trustee.ietf.org/license-info).
41 This version of this YANG module is part of RFC XXXX; see
42 the RFC itself for full legal notices.";
45 "Initial version of packet fields used by
46 ietf-access-control-list";
48 "RFC XXXX: Network Access Control List (ACL)
51 grouping acl-transport-header-fields {
53 "Transport header fields";
54 container source-port-range {
55 presence "Enables setting source port range";
57 "Inclusive range representing source ports to be used.
58 When only lower-port is present, it represents a single port.";
60 type inet:port-number;
63 "Lower boundary for port.";
66 type inet:port-number;
67 must ". >= ../lower-port" {
69 "The upper-port must be greater than or equal to lower-port";
72 "Upper boundary for port . If existing, the upper port
73 must be greater or equal to lower-port.";
76 container destination-port-range {
77 presence "Enables setting destination port range";
79 "Inclusive range representing destination ports to be used. When
80 only lower-port is present, it represents a single port.";
82 type inet:port-number;
85 "Lower boundary for port.";
88 type inet:port-number;
89 must ". >= ../lower-port" {
91 "The upper-port must be greater than or equal to lower-port";
95 "Upper boundary for port. If existing, the upper port must
96 be greater or equal to lower-port";
100 grouping acl-ip-header-fields {
102 "IP header fields common to ipv4 and ipv6";
111 "Internet Protocol number.";
113 uses acl-transport-header-fields;
115 grouping acl-ipv4-header-fields {
117 "Fields in IPv4 header.";
118 leaf destination-ipv4-network {
119 type inet:ipv4-prefix;
121 "Destination IPv4 address prefix.";
123 leaf source-ipv4-network {
124 type inet:ipv4-prefix;
126 "Source IPv4 address prefix.";
129 grouping acl-ipv6-header-fields {
131 "Fields in IPv6 header";
132 leaf destination-ipv6-network {
133 type inet:ipv6-prefix;
135 "Destination IPv6 address prefix.";
137 leaf source-ipv6-network {
138 type inet:ipv6-prefix;
140 "Source IPv6 address prefix.";
143 type inet:ipv6-flow-label;
148 "RFC 4291: IP Version 6 Addressing Architecture
149 RFC 4007: IPv6 Scoped Address Architecture
150 RFC 5952: A Recommendation for IPv6 Address Text Representation";
152 grouping acl-eth-header-fields {
154 "Fields in Ethernet header.";
155 leaf destination-mac-address {
156 type yang:mac-address;
158 "Destination IEEE 802 MAC address.";
160 leaf destination-mac-address-mask {
161 type yang:mac-address;
163 "Destination IEEE 802 MAC address mask.";
165 leaf source-mac-address {
166 type yang:mac-address;
168 "Source IEEE 802 MAC address.";
170 leaf source-mac-address-mask {
171 type yang:mac-address;
173 "Source IEEE 802 MAC address mask.";
176 "IEEE 802: IEEE Standard for Local and Metropolitan Area
177 Networks: Overview and Architecture.";