3 namespace "http://frrouting.org/yang/filter";
6 import ietf-inet-types {
9 import ietf-yang-types {
13 organization "Free Range Routing";
15 "FRR Users List: <mailto:frog@lists.frrouting.org>
16 FRR Development List: <mailto:dev@lists.frrouting.org>";
17 description "This module defines filter settings";
20 description "Initial revision";
26 typedef access-list-standard {
27 description "Standard IPv4 access list (any, host or a prefix)";
29 range "1..99 | 1300..1999";
33 typedef access-list-extended {
35 "Extended IPv4 access list (source / destination any, hosts or prefixes)";
37 range "100..199 | 2000..2699";
41 typedef access-list-legacy {
42 description "Standard/Extended IPv4 access list";
44 range "1..199 | 1300..2699";
48 typedef access-list-name {
49 description "Access list name formatting";
53 typedef access-list-sequence {
54 description "Access list sequence number";
56 range "1..4294967295";
60 typedef access-list-action {
61 description "Access list return action on match";
64 description "Deny an entry";
68 description "Accept an entry";
77 container filter-list {
78 list access-list-legacy {
79 description "Access list legacy instance";
81 key "number sequence";
84 description "Access list sequence value";
85 type access-list-legacy;
89 description "Access list sequence value";
90 type access-list-sequence;
94 description "Access list action on match";
95 type access-list-action;
100 description "Access list remark";
106 "Standard access list: value to match.
107 Extended access list: source value to match.";
111 description "Host to match";
112 type inet:ipv4-address;
115 description "Network to match";
116 type inet:ipv4-prefix;
119 description "Match any";
124 choice extended-value {
125 when "./sequence >= 100 and ./sequence <= 199 or
126 ./sequence >= 2000 and ./sequence <= 2699";
127 description "Destination value to match";
129 leaf destination-host {
130 description "Host to match";
131 type inet:ipv4-address;
133 leaf destination-network {
134 description "Network to match";
135 type inet:ipv4-prefix;
137 leaf destination-any {
138 description "Match any";
145 description "Access list instance";
147 key "type identifier sequence";
150 description "Access list content type";
153 description "Internet Protocol address version 4";
157 description "Internet Protocol address version 6";
161 description "Media Access Control address";
166 * Protocol YANG models should augment the parent node to
167 * contain the routing protocol specific value. The protocol
168 * must also augment `value` leaf to include its specific
169 * values or expand the `when` statement on the existing cases.
172 description "Custom data type";
179 description "Access list identifier";
180 type access-list-name;
184 description "Access list sequence value";
185 type access-list-sequence;
189 description "Access list action on match";
190 type access-list-action;
195 description "Access list remark";
200 description "Access list value to match";
204 when "./type = 'ipv4'";
207 description "Configure IPv4 prefix to match";
208 type inet:ipv4-prefix;
211 leaf ipv4-exact-match {
212 description "Exact match of prefix";
218 when "./type = 'ipv6'";
221 description "Configure IPv6 prefix to match";
222 type inet:ipv6-prefix;
225 leaf ipv6-exact-match {
226 description "Exact match of prefix";
232 when "./type = 'mac'";
235 description "Configure MAC address to match";
236 type yang:mac-address;
241 description "Match anything";
249 description "Prefix list instance";
251 key "type name sequence";
254 description "Prefix list type";
257 description "Internet Protocol address version 4";
261 description "Internet Protocol address version 6";
268 description "Prefix list name";
269 type access-list-name;
273 description "Access list sequence value";
274 type access-list-sequence;
278 description "Prefix list action on match";
279 type access-list-action;
284 description "Prefix list user description";
289 description "Prefix list value to match";
293 when "./type = 'ipv4'";
296 description "Configure IPv4 prefix to match";
297 type inet:ipv4-prefix;
300 leaf ipv4-prefix-length-greater-or-equal {
302 "Specifies if matching prefixes with length greater than
309 leaf ipv4-prefix-length-lesser-or-equal {
311 "Specifies if matching prefixes with length lesser than
319 when "./type = 'ipv6'";
322 description "Configure IPv6 prefix to match";
323 type inet:ipv6-prefix;
326 leaf ipv6-prefix-length-greater-or-equal {
328 "Specifies if matching prefixes with length greater than
335 leaf ipv6-prefix-length-lesser-or-equal {
337 "Specifies if matching prefixes with length lesser than
346 description "Match anything";