]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-route-types.yang
doc: Add `show ipv6 rpf X:X::X:X` command to docs
[mirror_frr.git] / yang / frr-route-types.yang
1 module frr-route-types {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/route-types";
4 prefix frr-route-types;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9
10 organization
11 "FRRouting";
12 contact
13 "FRR Users List: <mailto:frog@lists.frrouting.org>
14 FRR Development List: <mailto:dev@lists.frrouting.org>";
15 description
16 "This module defines typedefs for route types.
17
18 Copyright 2020 FRRouting
19
20 Redistribution and use in source and binary forms, with or without
21 modification, are permitted provided that the following conditions
22 are met:
23
24 1. Redistributions of source code must retain the above copyright notice,
25 this list of conditions and the following disclaimer.
26
27 2. Redistributions in binary form must reproduce the above copyright
28 notice, this list of conditions and the following disclaimer in the
29 documentation and/or other materials provided with the distribution.
30
31 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
36 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
37 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
38 DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
39 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
40 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
41 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.";
42
43 revision 2018-03-28 {
44 description
45 "Initial revision.";
46 }
47
48 typedef frr-route-types-v4 {
49 type enumeration {
50 enum kernel {
51 value 1;
52 }
53 enum connected {
54 value 2;
55 }
56 enum static {
57 value 3;
58 }
59 enum rip {
60 value 4;
61 }
62 enum ospf {
63 value 6;
64 }
65 enum isis {
66 value 8;
67 }
68 enum bgp {
69 value 9;
70 }
71 enum eigrp {
72 value 11;
73 }
74 enum nhrp {
75 value 12;
76 }
77 enum table {
78 value 15;
79 }
80 enum vnc {
81 value 17;
82 }
83 enum vnc-direct {
84 value 18;
85 }
86 enum babel {
87 value 22;
88 }
89 enum sharp {
90 value 23;
91 }
92 enum openfabric {
93 value 26;
94 }
95 }
96 }
97
98 typedef frr-route-types-v6 {
99 type enumeration {
100 enum kernel {
101 value 1;
102 }
103 enum connected {
104 value 2;
105 }
106 enum static {
107 value 3;
108 }
109 enum ripng {
110 value 5;
111 }
112 enum ospf6 {
113 value 7;
114 }
115 enum isis {
116 value 8;
117 }
118 enum bgp {
119 value 9;
120 }
121 enum nhrp {
122 value 12;
123 }
124 enum table {
125 value 15;
126 }
127 enum vnc {
128 value 17;
129 }
130 enum vnc-direct {
131 value 18;
132 }
133 enum babel {
134 value 22;
135 }
136 enum sharp {
137 value 23;
138 }
139 enum openfabric {
140 value 26;
141 }
142 }
143 }
144
145 typedef frr-route-types {
146 description "Route types as enumerated in `lib/route_types.txt`";
147 type union {
148 type frr-route-types-v4;
149 type frr-route-types-v6;
150 }
151 }
152
153 typedef ipv4-multicast-group-prefix {
154 type inet:ipv4-prefix {
155 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])))';
156 }
157 description
158 "This type represents an IPv4 multicast group prefix,
159 which is in the range from 224.0.0.0 to 239.255.255.255.";
160 }
161
162 typedef ipv6-multicast-group-prefix {
163 type inet:ipv6-prefix {
164 pattern
165 '(([fF]{2}[0-9a-fA-F]{2}):).*';
166 }
167 description
168 "This type represents an IPv6 multicast group prefix,
169 which is in the range of FF00::/8.";
170 }
171
172 typedef ip-multicast-group-prefix {
173 description "The IP-Multicast-Group-Address-Prefix type represents an IP multicast address
174 prefix and is IP version neutral. The format of the textual representations implies the IP
175 version. It includes a prefix-length, separated by a '/' sign.";
176 type union {
177 type ipv4-multicast-group-prefix;
178 type ipv6-multicast-group-prefix;
179 }
180 }
181 }