]> git.proxmox.com Git - mirror_frr.git/blob - yang/frr-nexthop.yang
Merge pull request #5644 from donaldsharp/more_pim_doc
[mirror_frr.git] / yang / frr-nexthop.yang
1 module frr-nexthop {
2 yang-version 1.1;
3 namespace "http://frrouting.org/yang/nexthop";
4 prefix frr-nexthop;
5
6 import ietf-inet-types {
7 prefix inet;
8 }
9
10 import ietf-routing-types {
11 prefix rt-types;
12 }
13 import frr-interface {
14 prefix frr-interface;
15 }
16
17 organization
18 "Free Range Routing";
19 contact
20 "FRR Users List: <mailto:frog@lists.frrouting.org>
21 FRR Development List: <mailto:dev@lists.frrouting.org>";
22 description
23 "This module defines a model for managing FRR nexthop information.";
24
25 revision 2019-08-15 {
26 description
27 "Initial revision.";
28 }
29
30 typedef gateway-address {
31 type inet:ip-address;
32 }
33
34 typedef nexthop-type {
35 type enumeration {
36 enum "ifindex" {
37 value 1;
38 description
39 "Specific interface.";
40 }
41 enum "ip4" {
42 value 2;
43 description
44 "IPv4 address.";
45 }
46 enum "ip4-ifindex" {
47 value 3;
48 description
49 "IPv4 address and interface.";
50 }
51 enum "ip6" {
52 value 4;
53 description
54 "IPv6 address.";
55 }
56 enum "ip6-ifindex" {
57 value 5;
58 description
59 "IPv6 address and interface.";
60 }
61 enum "blackhole" {
62 value 6;
63 description
64 "Unreachable or prohibited.";
65 }
66 }
67 description
68 "Nexthop types.";
69 }
70
71 typedef blackhole-type {
72 type enumeration {
73 enum "unspec" {
74 value 0;
75 description
76 "Generic unreachable.";
77 }
78 enum "null" {
79 value 1;
80 description
81 "Null type.";
82 }
83 enum "reject" {
84 value 2;
85 description
86 "ICMP unreachable.";
87 }
88 enum "prohibited" {
89 value 3;
90 description
91 "ICMP admin-prohibited.";
92 }
93 }
94 default "null";
95 description
96 "Nexthop blackhole types.";
97 }
98
99 /*
100 * Nexthop object
101 */
102
103 grouping frr-nexthop {
104 leaf nh-type {
105 type nexthop-type;
106 mandatory true;
107 description
108 "The nexthop type.";
109 }
110
111 leaf gateway {
112 type gateway-address;
113 description
114 "The nexthop gateway address.";
115 }
116
117 leaf vrf {
118 type string {
119 length "1..36";
120 }
121 description
122 "The nexthop vrf name, if different from the route.";
123 }
124
125 leaf interface {
126 type frr-interface:interface-ref;
127 description
128 "The nexthop egress interface.";
129 }
130
131 leaf bh-type {
132 type blackhole-type;
133 description
134 "A blackhole sub-type, if the nexthop is a blackhole type.";
135 }
136
137 leaf flags {
138 type uint32;
139 description
140 "The nexthop's raw flags value.";
141 }
142
143 leaf is-duplicate {
144 type empty;
145 description
146 "Duplicate nexthop; will be ignored.";
147 }
148
149 leaf is-recursive {
150 type empty;
151 description
152 "Nexthop must be resolved through another gateway.";
153 }
154
155 leaf is-onlink {
156 type empty;
157 description
158 "Nexthop is directly connected.";
159 }
160
161 leaf is-active {
162 type empty;
163 description
164 "Nexthop is active.";
165 }
166
167 uses rt-types:mpls-label-stack {
168 description
169 "Nexthop's MPLS label stack.";
170 }
171
172 leaf mtu {
173 type uint32;
174 description
175 "The nexthop's specific MTU.";
176 }
177 }
178
179 // End of nexthop
180 /*
181 * Nexthop-group container
182 */
183
184 grouping frr-nexthop-group {
185 description
186 "A nexthop-group, represented as a list of nexthop objects.";
187 leaf name {
188 type string;
189 description
190 "The nexthop-group name.";
191 }
192
193 list entry {
194 key "id";
195 description
196 "A list of nexthop objects.";
197 leaf id {
198 type uint32;
199 description
200 "Identifies a nexthop within a nexthop group; the entries
201 are ordered by id value, and the value has no other meaning.";
202 }
203
204 uses frr-nexthop;
205 }
206 }
207
208 // End of frr-nexthop-group
209 }