1 // SPDX-License-Identifier: BSD-2-Clause
2 module frr-route-types {
4 namespace "http://frrouting.org/yang/route-types";
5 prefix frr-route-types;
7 import ietf-inet-types {
14 "FRR Users List: <mailto:frog@lists.frrouting.org>
15 FRR Development List: <mailto:dev@lists.frrouting.org>";
17 "This module defines typedefs for route types.
19 Copyright 2020 FRRouting
21 Redistribution and use in source and binary forms, with or without
22 modification, are permitted provided that the following conditions
25 1. Redistributions of source code must retain the above copyright notice,
26 this list of conditions and the following disclaimer.
28 2. Redistributions in binary form must reproduce the above copyright
29 notice, this list of conditions and the following disclaimer in the
30 documentation and/or other materials provided with the distribution.
32 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
35 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
37 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
38 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
39 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
40 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
41 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
42 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
49 typedef frr-route-types-v4 {
99 typedef frr-route-types-v6 {
146 typedef frr-route-types {
147 description "Route types as enumerated in `lib/route_types.txt`";
149 type frr-route-types-v4;
150 type frr-route-types-v6;
154 typedef ipv4-multicast-group-prefix {
155 type inet:ipv4-prefix {
156 pattern '(2((2[4-9])|(3[0-9]))\.)(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(/(([4-9])|([1-2][0-9])|(3[0-2])))';
159 "This type represents an IPv4 multicast group prefix,
160 which is in the range from 224.0.0.0 to 239.255.255.255.";
163 typedef ipv6-multicast-group-prefix {
164 type inet:ipv6-prefix {
166 '(([fF]{2}[0-9a-fA-F]{2}):).*';
169 "This type represents an IPv6 multicast group prefix,
170 which is in the range of FF00::/8.";
173 typedef ip-multicast-group-prefix {
174 description "The IP-Multicast-Group-Address-Prefix type represents an IP multicast address
175 prefix and is IP version neutral. The format of the textual representations implies the IP
176 version. It includes a prefix-length, separated by a '/' sign.";
178 type ipv4-multicast-group-prefix;
179 type ipv6-multicast-group-prefix;