]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-gmp.yang
Merge pull request #10566 from whichbug/master
[mirror_frr.git] / yang / frr-gmp.yang
1 module frr-gmp {
2 yang-version "1.1";
3 namespace "http://frrouting.org/yang/gmp";
4
5 prefix frr-gmp;
6
7 import frr-routing {
8 prefix "frr-rt";
9 }
10
11 import ietf-routing-types {
12 prefix "rt-types";
13 }
14
15 import ietf-inet-types {
16 prefix "inet";
17 }
18
19 import frr-interface {
20 prefix frr-interface;
21 }
22
23 organization
24 "FRRouting";
25
26 contact
27 "FRR Users List: <mailto:frog@lists.frrouting.org>
28 FRR Development List: <mailto:dev@lists.frrouting.org>";
29
30 description
31 "This module defines a model for managing FRR pimd daemon.
32
33 Copyright 2020 FRRouting
34
35 Redistribution and use in source and binary forms, with or without
36 modification, are permitted provided that the following conditions
37 are met:
38
39 1. Redistributions of source code must retain the above copyright notice,
40 this list of conditions and the following disclaimer.
41
42 2. Redistributions in binary form must reproduce the above copyright
43 notice, this list of conditions and the following disclaimer in the
44 documentation and/or other materials provided with the distribution.
45
46 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
47 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
48 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
49 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
50 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
51 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
52 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
53 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
54 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
55 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
56 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
57
58 revision 2021-11-22 {
59 description
60 "Initial revision.";
61 reference
62 "RFC 2236: IGMP v2.
63 RFC 3376: IGMP v3.
64 RFC 2710: MLD.
65 RFC 3810: MLD v2.";
66 }
67
68 grouping interface-config-attributes {
69 description
70 "Configuration IGMP/MLD attributes applied to the interface level.";
71
72 leaf enable {
73 type boolean;
74 default "false";
75 description
76 "Enable IGMP/MLD flag on the interface.";
77 }
78
79 leaf igmp-version {
80 when "../frr-gmp:address-family = 'frr-rt:ipv4'" {
81 description
82 "Only applicable to IPv4 address family.";
83 }
84 type uint8 {
85 range "2..3";
86 }
87 description
88 "IGMP version.";
89 }
90
91 leaf mld-version {
92 when "../frr-gmp:address-family = 'frr-rt:ipv6'" {
93 description
94 "Only applicable to IPv6 address family.";
95 }
96 type uint8 {
97 range "1..2";
98 }
99 description
100 "MLD version.";
101 }
102
103 leaf query-interval {
104 type uint16 {
105 range "1..max";
106 }
107 units seconds;
108 must ". * 10 >= ../query-max-response-time";
109 default "125";
110 description
111 "The Query Interval is the interval between General Queries
112 sent by the Querier.";
113 }
114
115 leaf query-max-response-time {
116 type uint16 {
117 range "1..max";
118 }
119 units deciseconds;
120 must ". <= ../query-interval * 10";
121 default "100";
122 description
123 "Query maximum response time specifies the maximum time
124 allowed before sending a responding report.";
125 }
126
127 leaf last-member-query-interval {
128 type uint16 {
129 range "1..max";
130 }
131 units deciseconds;
132 default "10";
133 description
134 "Last Member Query Interval, which may be tuned to modify
135 the leave latency of the network.";
136 }
137
138 leaf robustness-variable {
139 type uint8 {
140 range "1..max";
141 }
142 default "2";
143 description
144 "Querier's Robustness Variable allows tuning for the
145 expected packet loss on a network.";
146 }
147
148 list static-group {
149 key "group-addr source-addr";
150 description
151 "A static multicast route, (*,G) or (S,G).
152 The version of IGMP must be 3 to support (S,G).";
153
154 leaf group-addr {
155 type rt-types:ip-multicast-group-address;
156 description
157 "Multicast group address.";
158 }
159 leaf source-addr {
160 type inet:ip-address;
161 description
162 "Multicast source address.";
163 }
164 }
165 } // interface-config-attributes
166
167 /*
168 * Per-interface configuration data
169 */
170 augment "/frr-interface:lib/frr-interface:interface" {
171 container gmp {
172 list address-family {
173 key "address-family";
174 description
175 "Each list entry for one address family.";
176 uses frr-rt:address-family;
177 uses interface-config-attributes;
178 } //address-family
179 }
180 }
181 }