]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-gmp.yang
Merge pull request #12798 from donaldsharp/rib_match_multicast
[mirror_frr.git] / yang / frr-gmp.yang
1 // SPDX-License-Identifier: BSD-2-Clause
2 module frr-gmp {
3 yang-version "1.1";
4 namespace "http://frrouting.org/yang/gmp";
5
6 prefix frr-gmp;
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
25 "FRRouting";
26
27 contact
28 "FRR Users List: <mailto:frog@lists.frrouting.org>
29 FRR Development List: <mailto:dev@lists.frrouting.org>";
30
31 description
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.";
58
59 revision 2021-11-22 {
60 description
61 "Initial revision.";
62 reference
63 "RFC 2236: IGMP v2.
64 RFC 3376: IGMP v3.
65 RFC 2710: MLD.
66 RFC 3810: MLD v2.";
67 }
68
69 grouping interface-config-attributes {
70 description
71 "Configuration IGMP/MLD attributes applied to the interface level.";
72
73 leaf enable {
74 type boolean;
75 default "false";
76 description
77 "Enable IGMP/MLD flag on the interface.";
78 }
79
80 leaf igmp-version {
81 when "../frr-gmp:address-family = 'frr-rt:ipv4'" {
82 description
83 "Only applicable to IPv4 address family.";
84 }
85 type uint8 {
86 range "2..3";
87 }
88 description
89 "IGMP version.";
90 }
91
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 }
100 default "2";
101 description
102 "MLD version.";
103 }
104
105 leaf query-interval {
106 type uint16 {
107 range "1..max";
108 }
109 units seconds;
110 must ". * 10 >= ../query-max-response-time";
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 {
118 type uint16 {
119 range "1..max";
120 }
121 units deciseconds;
122 must ". <= ../query-interval * 10";
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 {
130 type uint16 {
131 range "1..max";
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 {
142 range "1..max";
143 }
144 default "2";
145 description
146 "Querier's Robustness Variable allows tuning for the
147 expected packet loss on a network.";
148 }
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 }
167 } // interface-config-attributes
168
169 /*
170 * Per-interface configuration data
171 */
172 augment "/frr-interface:lib/frr-interface:interface" {
173 container gmp {
174 list address-family {
175 key "address-family";
176 description
177 "Each list entry for one address family.";
178 uses frr-rt:address-family;
179 uses interface-config-attributes;
180 } //address-family
181 }
182 }
183 }