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