1 module ietf-packet-fields {
3 namespace "urn:ietf:params:xml:ns:yang:ietf-packet-fields";
5 import ietf-inet-types {
6 prefix inet; revision-date 2013-07-15;
8 import ietf-yang-types {
9 prefix yang; revision-date 2013-07-15;
11 import ietf-interfaces {
12 prefix if; revision-date 2014-05-08;
14 organization "IETF NETMOD (NETCONF Data Modeling Language) Working
17 "WG Web: http://tools.ietf.org/wg/netmod/
18 WG List: netmod@ietf.org
19 WG Chair: Juergen Schoenwaelder
20 j.schoenwaelder@jacobs-university.de
22 tnadeau@lucidvision.com
23 Editor: Dean Bogdanovic
25 Editor: Kiran Agrahara Sreenivasa
32 "This YANG module defines groupings that are used by
33 ietf-access-control-list YANG module. Their usage is not
34 limited to ietf-access-control-list and can be
35 used anywhere as applicable.
36 Copyright (c) 2016 IETF Trust and the persons identified as
37 the document authors. All rights reserved.
38 Redistribution and use in source and binary forms, with or
39 without modification, is permitted pursuant to, and subject
40 to the license terms contained in, the Simplified BSD
41 License set forth in Section 4.c of the IETF Trust's Legal
42 Provisions Relating to IETF Documents
43 (http://trustee.ietf.org/license-info).
44 This version of this YANG module is part of RFC XXXX; see
45 the RFC itself for full legal notices.";
48 "Initial version of packet fields used by
49 ietf-access-control-list";
51 "RFC XXXX: Network Access Control List (ACL)
54 grouping acl-transport-header-fields {
56 "Transport header fields";
57 container source-port-range {
58 presence "Enables setting source port range";
60 "Inclusive range representing source ports to be used.
61 When only lower-port is present, it represents a single port.";
63 type inet:port-number;
66 "Lower boundary for port.";
69 type inet:port-number;
70 must ". >= ../lower-port" {
72 "The upper-port must be greater than or equal to lower-port";
75 "Upper boundary for port . If existing, the upper port
76 must be greater or equal to lower-port.";
79 container destination-port-range {
80 presence "Enables setting destination port range";
82 "Inclusive range representing destination ports to be used. When
83 only lower-port is present, it represents a single port.";
85 type inet:port-number;
88 "Lower boundary for port.";
91 type inet:port-number;
92 must ". >= ../lower-port" {
94 "The upper-port must be greater than or equal to lower-port";
98 "Upper boundary for port. If existing, the upper port must
99 be greater or equal to lower-port";
103 grouping acl-ip-header-fields {
105 "IP header fields common to ipv4 and ipv6";
114 "Internet Protocol number.";
116 uses acl-transport-header-fields;
118 grouping acl-ipv4-header-fields {
120 "Fields in IPv4 header.";
121 leaf destination-ipv4-network {
122 type inet:ipv4-prefix;
124 "Destination IPv4 address prefix.";
126 leaf source-ipv4-network {
127 type inet:ipv4-prefix;
129 "Source IPv4 address prefix.";
132 grouping acl-ipv6-header-fields {
134 "Fields in IPv6 header";
135 leaf destination-ipv6-network {
136 type inet:ipv6-prefix;
138 "Destination IPv6 address prefix.";
140 leaf source-ipv6-network {
141 type inet:ipv6-prefix;
143 "Source IPv6 address prefix.";
146 type inet:ipv6-flow-label;
151 "RFC 4291: IP Version 6 Addressing Architecture
152 RFC 4007: IPv6 Scoped Address Architecture
153 RFC 5952: A Recommendation for IPv6 Address Text Representation";
155 grouping acl-eth-header-fields {
157 "Fields in Ethernet header.";
158 leaf destination-mac-address {
159 type yang:mac-address;
161 "Destination IEEE 802 MAC address.";
163 leaf destination-mac-address-mask {
164 type yang:mac-address;
166 "Destination IEEE 802 MAC address mask.";
168 leaf source-mac-address {
169 type yang:mac-address;
171 "Source IEEE 802 MAC address.";
173 leaf source-mac-address-mask {
174 type yang:mac-address;
176 "Source IEEE 802 MAC address mask.";
179 "IEEE 802: IEEE Standard for Local and Metropolitan Area
180 Networks: Overview and Architecture.";
185 "Fields associated with a packet whick are not in
187 leaf input-interface {
188 type if:interface-ref {
189 require-instance false;
192 "Packet was received on this interface.";