3 namespace "http://frrouting.org/yang/filter";
6 import ietf-inet-types {
9 import ietf-yang-types {
13 organization "FRRouting";
15 "FRR Users List: <mailto:frog@lists.frrouting.org>
16 FRR Development List: <mailto:dev@lists.frrouting.org>";
18 "This module defines filter settings
20 Copyright 2020 FRRouting
22 Redistribution and use in source and binary forms, with or without
23 modification, are permitted provided that the following conditions
26 1. Redistributions of source code must retain the above copyright notice,
27 this list of conditions and the following disclaimer.
29 2. Redistributions in binary form must reproduce the above copyright
30 notice, this list of conditions and the following disclaimer in the
31 documentation and/or other materials provided with the distribution.
33 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
34 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
35 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
36 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
37 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
38 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
39 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
40 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
41 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
43 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
46 description "Initial revision";
52 typedef access-list-name {
53 description "Access list name formatting";
59 typedef access-list-sequence {
60 description "Access list sequence number";
62 range "1..4294967295";
66 typedef access-list-action {
67 description "Access list return action on match";
70 description "Deny an entry";
74 description "Accept an entry";
85 description "Access list instance";
90 description "Access list content type";
93 description "Internet Protocol address version 4";
97 description "Internet Protocol address version 6";
101 description "Media Access Control address";
108 description "Access list name";
109 type access-list-name;
113 description "Access list remark";
118 description "Access list entry";
123 description "Access list sequence value";
124 type access-list-sequence;
128 description "Access list action on match";
129 type access-list-action;
134 description "Access list value to match";
138 when "../type = 'ipv4'";
141 description "Access list entry style selection: zebra or cisco.";
146 description "Configure IPv4 prefix to match";
147 type inet:ipv4-prefix;
150 leaf ipv4-exact-match {
151 description "Exact match of prefix";
158 description "Host to match";
159 type inet:ipv4-address;
162 description "Network to match";
163 type inet:ipv4-prefix;
167 * Was `any`, however it conflicts with `any` leaf
168 * outside this choice.
170 description "Match any";
174 choice extended-value {
175 description "Destination value to match";
177 leaf destination-host {
178 description "Host to match";
179 type inet:ipv4-address;
181 leaf destination-network {
182 description "Network to match";
183 type inet:ipv4-prefix;
185 leaf destination-any {
186 description "Match any";
194 when "../type = 'ipv6'";
197 description "Configure IPv6 prefix to match";
198 type inet:ipv6-prefix;
201 leaf ipv6-exact-match {
202 description "Exact match of prefix";
208 when "../type = 'mac'";
211 description "Configure MAC address to match";
212 type yang:mac-address;
217 description "Match anything";
226 description "Prefix list instance";
231 description "Prefix list type";
234 description "Internet Protocol address version 4";
238 description "Internet Protocol address version 6";
245 description "Prefix list name";
246 type access-list-name;
250 description "Prefix list user description";
255 description "Prefix list entry";
260 description "Access list sequence value";
261 type access-list-sequence;
265 description "Prefix list action on match";
266 type access-list-action;
271 description "Prefix list value to match";
275 when "../type = 'ipv4'";
278 description "Configure IPv4 prefix to match";
279 type inet:ipv4-prefix;
282 leaf ipv4-prefix-length-greater-or-equal {
284 "Specifies if matching prefixes with length greater than
291 leaf ipv4-prefix-length-lesser-or-equal {
293 "Specifies if matching prefixes with length lesser than
301 when "../type = 'ipv6'";
304 description "Configure IPv6 prefix to match";
305 type inet:ipv6-prefix;
308 leaf ipv6-prefix-length-greater-or-equal {
310 "Specifies if matching prefixes with length greater than
317 leaf ipv6-prefix-length-lesser-or-equal {
319 "Specifies if matching prefixes with length lesser than
328 description "Match anything";