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";
157 choice standard-value {
158 description "Source value to match";
161 description "Host to match";
162 type inet:ipv4-address;
167 description "Network address part.";
168 type inet:ipv4-address;
172 description "Network mask/wildcard part.";
173 type inet:ipv4-address;
178 * Was `any`, however it conflicts with `any` leaf
179 * outside this choice.
181 description "Match any";
186 choice extended-value {
187 description "Destination value to match";
189 leaf destination-host {
190 description "Host to match";
191 type inet:ipv4-address;
193 container destination-network {
196 description "Network address part.";
197 type inet:ipv4-address;
201 description "Network mask/wildcard part.";
202 type inet:ipv4-address;
205 leaf destination-any {
206 description "Match any";
214 when "../type = 'ipv6'";
217 description "Configure IPv6 prefix to match";
218 type inet:ipv6-prefix;
221 leaf ipv6-exact-match {
222 description "Exact match of prefix";
228 when "../type = 'mac'";
231 description "Configure MAC address to match";
232 type yang:mac-address;
237 description "Match anything";
246 description "Prefix list instance";
251 description "Prefix list type";
254 description "Internet Protocol address version 4";
258 description "Internet Protocol address version 6";
265 description "Prefix list name";
266 type access-list-name;
270 description "Prefix list user description";
275 description "Prefix list entry";
280 description "Access list sequence value";
281 type access-list-sequence;
285 description "Prefix list action on match";
286 type access-list-action;
291 description "Prefix list value to match";
295 when "../type = 'ipv4'";
298 description "Configure IPv4 prefix to match";
299 type inet:ipv4-prefix;
302 leaf ipv4-prefix-length-greater-or-equal {
304 "Specifies if matching prefixes with length greater than
311 leaf ipv4-prefix-length-lesser-or-equal {
313 "Specifies if matching prefixes with length lesser than
321 when "../type = 'ipv6'";
324 description "Configure IPv6 prefix to match";
325 type inet:ipv6-prefix;
328 leaf ipv6-prefix-length-greater-or-equal {
330 "Specifies if matching prefixes with length greater than
337 leaf ipv6-prefix-length-lesser-or-equal {
339 "Specifies if matching prefixes with length lesser than
348 description "Match anything";