/src/frr/yang/frr-pim.yang.c
Line | Count | Source |
1 | | /* autogenerated by embedmodel.py. DO NOT EDIT */ |
2 | | |
3 | | #include <zebra.h> |
4 | | #include "yang.h" |
5 | | |
6 | | static const char model[] = |
7 | | "// SPDX-License-Identifier: BSD-2-Clause\n" |
8 | | "module frr-pim {\n" |
9 | | " yang-version \"1.1\";\n" |
10 | | " namespace \"http://frrouting.org/yang/pim\";\n" |
11 | | "\n" |
12 | | " prefix frr-pim;\n" |
13 | | "\n" |
14 | | " import frr-interface {\n" |
15 | | " prefix frr-interface;\n" |
16 | | " }\n" |
17 | | "\n" |
18 | | " import frr-routing {\n" |
19 | | " prefix \"frr-rt\";\n" |
20 | | " }\n" |
21 | | "\n" |
22 | | " import ietf-routing-types {\n" |
23 | | " prefix \"rt-types\";\n" |
24 | | " }\n" |
25 | | "\n" |
26 | | " import ietf-inet-types {\n" |
27 | | " prefix \"inet\";\n" |
28 | | " }\n" |
29 | | "\n" |
30 | | " organization\n" |
31 | | " \"FRRouting\";\n" |
32 | | "\n" |
33 | | " contact\n" |
34 | | " \"FRR Users List: <mailto:frog@lists.frrouting.org>\n" |
35 | | " FRR Development List: <mailto:dev@lists.frrouting.org>\";\n" |
36 | | "\n" |
37 | | " description\n" |
38 | | " \"The module defines a collection of YANG definitions common for\n" |
39 | | " PIM (Protocol Independent Multicast) model.\n" |
40 | | "\n" |
41 | | " Copyright 2020 FRRouting\n" |
42 | | "\n" |
43 | | " Redistribution and use in source and binary forms, with or without\n" |
44 | | " modification, are permitted provided that the following conditions\n" |
45 | | " are met:\n" |
46 | | "\n" |
47 | | " 1. Redistributions of source code must retain the above copyright notice,\n" |
48 | | " this list of conditions and the following disclaimer.\n" |
49 | | "\n" |
50 | | " 2. Redistributions in binary form must reproduce the above copyright\n" |
51 | | " notice, this list of conditions and the following disclaimer in the\n" |
52 | | " documentation and/or other materials provided with the distribution.\n" |
53 | | "\n" |
54 | | " THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n" |
55 | | " \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n" |
56 | | " LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n" |
57 | | " A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n" |
58 | | " HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n" |
59 | | " SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n" |
60 | | " LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n" |
61 | | " DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n" |
62 | | " THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n" |
63 | | " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n" |
64 | | " OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\";\n" |
65 | | "\n" |
66 | | " revision 2021-11-22 {\n" |
67 | | " description\n" |
68 | | " \"Initial revision.\";\n" |
69 | | " reference\n" |
70 | | " \"RFC XXXX: A YANG Data Model for PIM\";\n" |
71 | | " }\n" |
72 | | "\n" |
73 | | " identity pimd {\n" |
74 | | " base frr-rt:routing-protocol;\n" |
75 | | " description\n" |
76 | | " \"\'Pim\' routing pseudo-protocol.\";\n" |
77 | | " }\n" |
78 | | "\n" |
79 | | " typedef plist-ref {\n" |
80 | | " type string;\n" |
81 | | " }\n" |
82 | | "\n" |
83 | | " /*\n" |
84 | | " * Groupings\n" |
85 | | " */\n" |
86 | | "\n" |
87 | | " grouping msdp-timers {\n" |
88 | | " leaf hold-time {\n" |
89 | | " type uint16 {\n" |
90 | | " range \"1..max\";\n" |
91 | | " }\n" |
92 | | " units seconds;\n" |
93 | | " default 75;\n" |
94 | | " description\n" |
95 | | " \"Hold period is started at the MSDP peer connection establishment\n" |
96 | | " and is reset every new message. When the period expires the\n" |
97 | | " connection is closed. This value should be greater than the\n" |
98 | | " remote keep-alive time.\";\n" |
99 | | " }\n" |
100 | | "\n" |
101 | | " leaf keep-alive {\n" |
102 | | " type uint16 {\n" |
103 | | " range \"1..max\";\n" |
104 | | " }\n" |
105 | | " units seconds;\n" |
106 | | " default 60;\n" |
107 | | " description\n" |
108 | | " \"To maintain a connection established it is necessary to send\n" |
109 | | " keep alive messages in a certain frequency and this allows its\n" |
110 | | " configuration. This value should be less than the remote\n" |
111 | | " hold time.\";\n" |
112 | | " }\n" |
113 | | "\n" |
114 | | " leaf connection-retry {\n" |
115 | | " type uint16 {\n" |
116 | | " range \"1..max\";\n" |
117 | | " }\n" |
118 | | " units seconds;\n" |
119 | | " default 30;\n" |
120 | | " description\n" |
121 | | " \"This period is used in the MSDP peer with the highest IP value\n" |
122 | | " in the pair and configures the interval between TCP connection\n" |
123 | | " attempts.\";\n" |
124 | | " }\n" |
125 | | " }\n" |
126 | | "\n" |
127 | | " grouping global-pim-config-attributes {\n" |
128 | | " description\n" |
129 | | " \"A grouping defining per address family pim global attributes\";\n" |
130 | | "\n" |
131 | | " leaf ecmp {\n" |
132 | | " type boolean;\n" |
133 | | " default \"false\";\n" |
134 | | " description\n" |
135 | | " \"Enable PIM ECMP.\";\n" |
136 | | " }\n" |
137 | | " \n" |
138 | | " leaf ecmp-rebalance {\n" |
139 | | " type boolean;\n" |
140 | | " default \"false\";\n" |
141 | | " description\n" |
142 | | " \"Enable PIM ECMP Rebalance.\";\n" |
143 | | " }\n" |
144 | | " \n" |
145 | | " leaf keep-alive-timer {\n" |
146 | | " type uint16 {\n" |
147 | | " range \"1..max\";\n" |
148 | | " }\n" |
149 | | " default \"210\";\n" |
150 | | " description\n" |
151 | | " \"Keep alive Timer in seconds.\";\n" |
152 | | " }\n" |
153 | | " \n" |
154 | | " leaf rp-keep-alive-timer {\n" |
155 | | " type uint16 {\n" |
156 | | " range \"1..max\";\n" |
157 | | " }\n" |
158 | | " default \"210\";\n" |
159 | | " description\n" |
160 | | " \"RP keep alive Timer in seconds.\";\n" |
161 | | " }\n" |
162 | | "\n" |
163 | | " leaf send-v6-secondary {\n" |
164 | | " when \"../frr-pim:address-family = \'frr-rt:ipv4\'\" {\n" |
165 | | " description\n" |
166 | | " \"Only applicable to IPv4 address family.\";\n" |
167 | | " }\n" |
168 | | " type boolean;\n" |
169 | | " default \"true\";\n" |
170 | | " description\n" |
171 | | " \"Send v6 secondary addresses.\";\n" |
172 | | " }\n" |
173 | | "\n" |
174 | | " container spt-switchover {\n" |
175 | | " description\n" |
176 | | " \"SPT-Switchover.\";\n" |
177 | | "\n" |
178 | | " leaf spt-action {\n" |
179 | | " type enumeration {\n" |
180 | | " enum \"PIM_SPT_IMMEDIATE\" {\n" |
181 | | " value 0;\n" |
182 | | " description\n" |
183 | | " \"Immediate switch to SPT Tree.\";\n" |
184 | | " }\n" |
185 | | " enum \"PIM_SPT_INFINITY\" {\n" |
186 | | " value 1;\n" |
187 | | " description\n" |
188 | | " \"Never switch to SPT Tree.\";\n" |
189 | | " }\n" |
190 | | " }\n" |
191 | | " default \"PIM_SPT_IMMEDIATE\";\n" |
192 | | " description\n" |
193 | | " \"SPT-Switchover action\";\n" |
194 | | " }\n" |
195 | | "\n" |
196 | | " leaf spt-infinity-prefix-list {\n" |
197 | | " when \"../spt-action = \'PIM_SPT_INFINITY\'\" {\n" |
198 | | " description\n" |
199 | | " \"This leaf is only valid when the spt action\n" |
200 | | " is PIM_SPT_INFINITY.\";\n" |
201 | | " }\n" |
202 | | " type plist-ref;\n" |
203 | | " description\n" |
204 | | " \"Prefix-List to control which groups to switch.\";\n" |
205 | | " }\n" |
206 | | " }\n" |
207 | | "\n" |
208 | | " leaf ssm-prefix-list {\n" |
209 | | " type plist-ref;\n" |
210 | | " description\n" |
211 | | " \"Prefix-list used to define Source-Specific Multicast address range.\";\n" |
212 | | " }\n" |
213 | | "\n" |
214 | | " leaf-list ssm-pingd-source-ip {\n" |
215 | | " type inet:ip-address;\n" |
216 | | " description\n" |
217 | | " \"Enable ssmpingd operation.\";\n" |
218 | | " }\n" |
219 | | "\n" |
220 | | " /* Global timers configuration. */\n" |
221 | | " container msdp {\n" |
222 | | " description \"Global MSDP configuration.\";\n" |
223 | | " uses msdp-timers;\n" |
224 | | " }\n" |
225 | | "\n" |
226 | | " list msdp-mesh-groups {\n" |
227 | | " key \"name\";\n" |
228 | | " description\n" |
229 | | " \"RFC 3618 Section 10.2. MSDP mesh-group semantics\n" |
230 | | "\n" |
231 | | " Groups multiple MSDP peers to reduce SA flooding typically used\n" |
232 | | " in intra-domain settings.\";\n" |
233 | | "\n" |
234 | | " leaf name {\n" |
235 | | " type string {\n" |
236 | | " length 1..64;\n" |
237 | | " }\n" |
238 | | " description\n" |
239 | | " \"The mesh group name.\";\n" |
240 | | " }\n" |
241 | | "\n" |
242 | | " leaf source {\n" |
243 | | " type inet:ip-address;\n" |
244 | | " description\n" |
245 | | " \"Source IP address for the TCP connections.\";\n" |
246 | | " }\n" |
247 | | "\n" |
248 | | " list members {\n" |
249 | | " key \"address\";\n" |
250 | | "\n" |
251 | | " leaf address {\n" |
252 | | " type inet:ip-address;\n" |
253 | | " description\n" |
254 | | " \"Peer member IP address.\";\n" |
255 | | " }\n" |
256 | | " }\n" |
257 | | " }\n" |
258 | | "\n" |
259 | | " list msdp-peer {\n" |
260 | | " key \"peer-ip\";\n" |
261 | | " description\n" |
262 | | " \"Configure MSDP peer.\";\n" |
263 | | "\n" |
264 | | " leaf peer-ip {\n" |
265 | | " type inet:ip-address;\n" |
266 | | " description\n" |
267 | | " \"MSDP peer IP address.\";\n" |
268 | | " }\n" |
269 | | "\n" |
270 | | " leaf source-ip {\n" |
271 | | " mandatory true;\n" |
272 | | " type inet:ip-address;\n" |
273 | | " description\n" |
274 | | " \"MSDP source IP address.\";\n" |
275 | | " }\n" |
276 | | " }\n" |
277 | | "\n" |
278 | | " container mlag {\n" |
279 | | " presence\n" |
280 | | " \"Multi-chassis link aggregation.\";\n" |
281 | | "\n" |
282 | | " leaf peerlink-rif {\n" |
283 | | " type frr-interface:interface-ref;\n" |
284 | | " description\n" |
285 | | " \"Outgoing interface name.\";\n" |
286 | | " }\n" |
287 | | "\n" |
288 | | " leaf reg-address {\n" |
289 | | " type inet:ip-address;\n" |
290 | | " description\n" |
291 | | " \"reg address.\";\n" |
292 | | " }\n" |
293 | | "\n" |
294 | | " leaf my-role {\n" |
295 | | " type enumeration {\n" |
296 | | " enum \"MLAG_ROLE_NONE\" {\n" |
297 | | " value 0;\n" |
298 | | " description\n" |
299 | | " \"MLAG role none.\";\n" |
300 | | " }\n" |
301 | | " enum \"MLAG_ROLE_PRIMARY\" {\n" |
302 | | " value 1;\n" |
303 | | " description\n" |
304 | | " \"MLAG role primary.\";\n" |
305 | | " }\n" |
306 | | "\n" |
307 | | " enum \"MLAG_ROLE_SECONDARY\" {\n" |
308 | | " value 2;\n" |
309 | | " description\n" |
310 | | " \"MLAG role secondary.\";\n" |
311 | | " }\n" |
312 | | " }\n" |
313 | | " default \"MLAG_ROLE_NONE\";\n" |
314 | | " description\n" |
315 | | " \"Mlag role.\";\n" |
316 | | " }\n" |
317 | | "\n" |
318 | | " leaf peer-state {\n" |
319 | | " type boolean;\n" |
320 | | " default \"false\";\n" |
321 | | " description\n" |
322 | | " \"Peer state\";\n" |
323 | | " }\n" |
324 | | " }\n" |
325 | | "\n" |
326 | | " leaf register-accept-list {\n" |
327 | | " type plist-ref;\n" |
328 | | " description\n" |
329 | | " \"Only accept registers from a specific source prefix list.\";\n" |
330 | | " }\n" |
331 | | " } // global-pim-config-attributes\n" |
332 | | "\n" |
333 | | " grouping interface-pim-config-attributes {\n" |
334 | | " description\n" |
335 | | " \"A grouping defining pim interface attributes per address family.\";\n" |
336 | | "\n" |
337 | | " leaf pim-enable {\n" |
338 | | " type boolean;\n" |
339 | | " default \"false\";\n" |
340 | | " description\n" |
341 | | " \"Enable PIM flag on the interface.\";\n" |
342 | | " }\n" |
343 | | "\n" |
344 | | " leaf pim-passive-enable {\n" |
345 | | " type boolean;\n" |
346 | | " default \"false\";\n" |
347 | | " description\n" |
348 | | " \"Disable exchange of protocol packets.\";\n" |
349 | | " }\n" |
350 | | "\n" |
351 | | " leaf hello-interval {\n" |
352 | | " type uint8 {\n" |
353 | | " range \"1..max\";\n" |
354 | | " }\n" |
355 | | " default \"30\";\n" |
356 | | " description\n" |
357 | | " \"Hello interval\";\n" |
358 | | " }\n" |
359 | | "\n" |
360 | | " leaf hello-holdtime {\n" |
361 | | " type uint16 {\n" |
362 | | " range \"1..max\";\n" |
363 | | " }\n" |
364 | | " must \". > ./../hello-interval\" {\n" |
365 | | " error-message \"HoldTime must be greater than Hello\";\n" |
366 | | " }\n" |
367 | | " description\n" |
368 | | " \"Hello holdtime\";\n" |
369 | | " }\n" |
370 | | "\n" |
371 | | " container bfd {\n" |
372 | | " presence\n" |
373 | | " \"Enable BFD support on the interface.\";\n" |
374 | | "\n" |
375 | | " leaf min-rx-interval {\n" |
376 | | " type uint16 {\n" |
377 | | " range \"1..max\";\n" |
378 | | " }\n" |
379 | | " default \"300\";\n" |
380 | | " description\n" |
381 | | " \"Required min receive interval\";\n" |
382 | | " }\n" |
383 | | "\n" |
384 | | " leaf min-tx-interval {\n" |
385 | | " type uint16 {\n" |
386 | | " range \"1..max\";\n" |
387 | | " }\n" |
388 | | " default \"300\";\n" |
389 | | " description\n" |
390 | | " \"Desired min transmit interval\";\n" |
391 | | " }\n" |
392 | | "\n" |
393 | | " leaf detect_mult {\n" |
394 | | " type uint8 {\n" |
395 | | " range \"2..255\";\n" |
396 | | " }\n" |
397 | | " default \"3\";\n" |
398 | | " description\n" |
399 | | " \"Detect Multiplier\";\n" |
400 | | " }\n" |
401 | | "\n" |
402 | | " leaf profile {\n" |
403 | | " type string;\n" |
404 | | " description\n" |
405 | | " \"Use a preconfigure BFD profile.\";\n" |
406 | | " }\n" |
407 | | " }\n" |
408 | | "\n" |
409 | | " leaf bsm {\n" |
410 | | " type boolean;\n" |
411 | | " default \"true\";\n" |
412 | | " description\n" |
413 | | " \"Enables BSM support on the interface.\";\n" |
414 | | " }\n" |
415 | | "\n" |
416 | | " leaf unicast-bsm {\n" |
417 | | " type boolean;\n" |
418 | | " default \"true\";\n" |
419 | | " description\n" |
420 | | " \"Accept/Send unicast BSM on the interface.\";\n" |
421 | | " }\n" |
422 | | "\n" |
423 | | " leaf active-active {\n" |
424 | | " type boolean;\n" |
425 | | " default \"false\";\n" |
426 | | " description\n" |
427 | | " \"Mark interface as Active-Active for MLAG operations.\";\n" |
428 | | " }\n" |
429 | | "\n" |
430 | | " leaf dr-priority {\n" |
431 | | " type uint32 {\n" |
432 | | " range \"1..max\";\n" |
433 | | " }\n" |
434 | | " default 1;\n" |
435 | | " description\n" |
436 | | " \"DR (Designated Router) priority\";\n" |
437 | | " }\n" |
438 | | "\n" |
439 | | " leaf use-source {\n" |
440 | | " type inet:ip-address;\n" |
441 | | " description\n" |
442 | | " \"Primary address of the interface set by user.\";\n" |
443 | | " }\n" |
444 | | "\n" |
445 | | " leaf multicast-boundary-oil {\n" |
446 | | " type plist-ref;\n" |
447 | | " description\n" |
448 | | " \"Prefix-List to define multicast boundary\";\n" |
449 | | " }\n" |
450 | | "\n" |
451 | | " list mroute {\n" |
452 | | " key \"source-addr group-addr\";\n" |
453 | | " description\n" |
454 | | " \"Add multicast route.\";\n" |
455 | | "\n" |
456 | | " leaf oif {\n" |
457 | | " type frr-interface:interface-ref;\n" |
458 | | " description\n" |
459 | | " \"Outgoing interface name.\";\n" |
460 | | " }\n" |
461 | | "\n" |
462 | | " leaf source-addr {\n" |
463 | | " type inet:ip-address;\n" |
464 | | " description\n" |
465 | | " \"Multicast source address.\";\n" |
466 | | " }\n" |
467 | | "\n" |
468 | | " leaf group-addr {\n" |
469 | | " type rt-types:ip-multicast-group-address;\n" |
470 | | " description\n" |
471 | | " \"Multicast group address.\";\n" |
472 | | " }\n" |
473 | | " }\n" |
474 | | " } // interface-pim-config-attributes\n" |
475 | | "\n" |
476 | | " grouping router-pim-config-attributes {\n" |
477 | | " description\n" |
478 | | " \"A grouping defining pim router attributes per address family.\";\n" |
479 | | " leaf packets {\n" |
480 | | " type uint8 {\n" |
481 | | " range \"1..max\";\n" |
482 | | " }\n" |
483 | | " default \"3\";\n" |
484 | | " description\n" |
485 | | " \"Number of packets to process at one time per fd.\";\n" |
486 | | " }\n" |
487 | | " leaf join-prune-interval {\n" |
488 | | " type uint16 {\n" |
489 | | " range \"1..max\";\n" |
490 | | " }\n" |
491 | | " default \"60\";\n" |
492 | | " description\n" |
493 | | " \"Join Prune Send Interval in seconds.\";\n" |
494 | | " }\n" |
495 | | " leaf register-suppress-time {\n" |
496 | | " type uint16 {\n" |
497 | | " range \"1..max\";\n" |
498 | | " }\n" |
499 | | " default \"60\";\n" |
500 | | " description\n" |
501 | | " \"Register Suppress Timer.\";\n" |
502 | | " }\n" |
503 | | " }\n" |
504 | | "\n" |
505 | | " /*\n" |
506 | | " * Global Configuration data nodes\n" |
507 | | " */\n" |
508 | | " augment \"/frr-rt:routing/frr-rt:control-plane-protocols/\"\n" |
509 | | " + \"frr-rt:control-plane-protocol\" {\n" |
510 | | " container pim {\n" |
511 | | " when \"../frr-rt:type = \'frr-pim:pimd\'\" {\n" |
512 | | " description\n" |
513 | | " \"This container is only valid for the \'pim\' routing\n" |
514 | | " protocol.\";\n" |
515 | | " }\n" |
516 | | " description\n" |
517 | | " \"PIM configuration data.\";\n" |
518 | | " list address-family {\n" |
519 | | " key \"address-family\";\n" |
520 | | " description\n" |
521 | | " \"Each list entry for one address family.\";\n" |
522 | | " uses frr-rt:address-family;\n" |
523 | | " uses global-pim-config-attributes;\n" |
524 | | "\n" |
525 | | " } //address-family\n" |
526 | | " } // pim\n" |
527 | | " } // augment\n" |
528 | | "\n" |
529 | | " /*\n" |
530 | | " * Per-interface configuration data\n" |
531 | | " */\n" |
532 | | " augment \"/frr-interface:lib/frr-interface:interface\" {\n" |
533 | | " container pim {\n" |
534 | | " list address-family {\n" |
535 | | " key \"address-family\";\n" |
536 | | " description\n" |
537 | | " \"Each list entry for one address family.\";\n" |
538 | | " uses frr-rt:address-family;\n" |
539 | | " uses interface-pim-config-attributes;\n" |
540 | | " }\n" |
541 | | " }\n" |
542 | | " }\n" |
543 | | "\n" |
544 | | " /*\n" |
545 | | " * Router configuration data\n" |
546 | | " */\n" |
547 | | " container pim {\n" |
548 | | " description\n" |
549 | | " \"PIM router parameters.\";\n" |
550 | | " list address-family {\n" |
551 | | " key \"address-family\";\n" |
552 | | " description\n" |
553 | | " \"Each list entry for one address family.\";\n" |
554 | | " uses frr-rt:address-family;\n" |
555 | | " uses router-pim-config-attributes;\n" |
556 | | " }\n" |
557 | | " }\n" |
558 | | "}\n" |
559 | | ""; |
560 | | |
561 | | static struct yang_module_embed embed = { |
562 | | .mod_name = "frr-pim", |
563 | | .mod_rev = "2021-11-22", |
564 | | .sub_mod_name = "", |
565 | | .sub_mod_rev = "", |
566 | | .data = model, |
567 | | .format = LYS_IN_YANG, |
568 | | }; |
569 | | |
570 | | static void embed_register(void) __attribute__((_CONSTRUCTOR(2000))); |
571 | | static void embed_register(void) |
572 | 2 | { |
573 | 2 | yang_module_embed(&embed); |
574 | 2 | } |