Coverage Report

Created: 2025-07-14 06:48

/src/frr/yang/frr-interface.yang.c
Line
Count
Source
1
/* autogenerated by embedmodel.py.  DO NOT EDIT */
2
3
#include <zebra.h>
4
#include "yang.h"
5
6
static const char model[] =
7
  "// SPDX-License-Identifier: BSD-2-Clause\n"
8
  "module frr-interface {\n"
9
  "  yang-version 1.1;\n"
10
  "  namespace \"http://frrouting.org/yang/interface\";\n"
11
  "  prefix frr-interface;\n"
12
  "\n"
13
  "  import frr-vrf {\n"
14
  "    prefix frr-vrf;\n"
15
  "  }\n"
16
  "\n"
17
  "  import ietf-interfaces {\n"
18
  "    prefix ietf-if;\n"
19
  "  }\n"
20
  "\n"
21
  "  import ietf-yang-types {\n"
22
  "    prefix yang;\n"
23
  "  }\n"
24
  "\n"
25
  "  organization\n"
26
  "    \"FRRouting\";\n"
27
  "  contact\n"
28
  "    \"FRR Users List:       <mailto:frog@lists.frrouting.org>\n"
29
  "     FRR Development List: <mailto:dev@lists.frrouting.org>\";\n"
30
  "  description\n"
31
  "    \"This module defines a model for managing FRR interfaces.\n"
32
  "\n"
33
  "     Copyright 2020 FRRouting\n"
34
  "\n"
35
  "     Redistribution and use in source and binary forms, with or without\n"
36
  "     modification, are permitted provided that the following conditions\n"
37
  "     are met:\n"
38
  "\n"
39
  "     1. Redistributions of source code must retain the above copyright notice,\n"
40
  "     this list of conditions and the following disclaimer.\n"
41
  "\n"
42
  "     2. Redistributions in binary form must reproduce the above copyright\n"
43
  "     notice, this list of conditions and the following disclaimer in the\n"
44
  "     documentation and/or other materials provided with the distribution.\n"
45
  "\n"
46
  "     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"
47
  "     \\\"AS IS\\\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n"
48
  "     LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n"
49
  "     A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n"
50
  "     HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n"
51
  "     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n"
52
  "     LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n"
53
  "     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n"
54
  "     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n"
55
  "     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n"
56
  "     OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\";\n"
57
  "\n"
58
  "  revision 2020-02-05 {\n"
59
  "    description\n"
60
  "      \"Added operational data\";\n"
61
  "  }\n"
62
  "  revision 2019-09-09 {\n"
63
  "    description\n"
64
  "      \"Added interface-ref typedef\";\n"
65
  "  }\n"
66
  "  revision 2018-03-28 {\n"
67
  "    description\n"
68
  "      \"Initial revision.\";\n"
69
  "  }\n"
70
  "\n"
71
  "  identity other {\n"
72
  "    base ietf-if:interface-type;\n"
73
  "    description\n"
74
  "      \"Other type\";\n"
75
  "  }\n"
76
  "\n"
77
  "  identity unknown {\n"
78
  "    base ietf-if:interface-type;\n"
79
  "    description\n"
80
  "      \"Unknown type\";\n"
81
  "  }\n"
82
  "\n"
83
  "  identity ethernet {\n"
84
  "    base ietf-if:interface-type;\n"
85
  "    description\n"
86
  "      \"Ethernet type\";\n"
87
  "  }\n"
88
  "\n"
89
  "  identity exper-ethernet {\n"
90
  "    base ietf-if:interface-type;\n"
91
  "    description\n"
92
  "      \"Experimental Ethernet type\";\n"
93
  "  }\n"
94
  "\n"
95
  "  identity loopback {\n"
96
  "    base ietf-if:interface-type;\n"
97
  "    description\n"
98
  "      \"Loopback type\";\n"
99
  "  }\n"
100
  "\n"
101
  "  identity pimreg {\n"
102
  "    base ietf-if:interface-type;\n"
103
  "    description\n"
104
  "      \"PIMSM Registration.\";\n"
105
  "  }\n"
106
  "\n"
107
  "  identity ipip {\n"
108
  "    base ietf-if:interface-type;\n"
109
  "    description\n"
110
  "      \"IPIP Tunnel.\";\n"
111
  "  }\n"
112
  "\n"
113
  "  identity ipip6 {\n"
114
  "    base ietf-if:interface-type;\n"
115
  "    description\n"
116
  "      \"IPIP6 Tunnel.\";\n"
117
  "  }\n"
118
  "\n"
119
  "  identity ipgre {\n"
120
  "    base ietf-if:interface-type;\n"
121
  "    description\n"
122
  "      \"GRE over IP.\";\n"
123
  "  }\n"
124
  "\n"
125
  "  typedef interface-ref {\n"
126
  "    type leafref {\n"
127
  "      path \"/frr-interface:lib/frr-interface:interface/frr-interface:name\";\n"
128
  "      require-instance false;\n"
129
  "    }\n"
130
  "    description\n"
131
  "      \"Reference to an interface\";\n"
132
  "  }\n"
133
  "\n"
134
  "  typedef if-flags-type {\n"
135
  "    type enumeration {\n"
136
  "      enum \"up\" {\n"
137
  "        value 1;\n"
138
  "        description\n"
139
  "          \"Active and ready to transfer packets.\";\n"
140
  "      }\n"
141
  "      enum \"broadcast\" {\n"
142
  "        value 2;\n"
143
  "        description\n"
144
  "          \"Broadcast enabled.\";\n"
145
  "      }\n"
146
  "      enum \"debug\" {\n"
147
  "        value 3;\n"
148
  "        description\n"
149
  "          \"Debug mode.\";\n"
150
  "      }\n"
151
  "      enum \"loopback\" {\n"
152
  "        value 4;\n"
153
  "        description\n"
154
  "          \"Loopback interface.\";\n"
155
  "      }\n"
156
  "      enum \"point-to-point\" {\n"
157
  "        value 5;\n"
158
  "        description\n"
159
  "          \"Point-to-Point link.\";\n"
160
  "      }\n"
161
  "      enum \"notrailers\" {\n"
162
  "        value 6;\n"
163
  "        description\n"
164
  "          \"This flag is unused in Linux, but it exists for BSD compatibility.\n"
165
  "          Avoid use of trailers\";\n"
166
  "      }\n"
167
  "      enum \"running\" {\n"
168
  "        value 7;\n"
169
  "        description\n"
170
  "          \"Up and Running.\";\n"
171
  "      }\n"
172
  "      enum \"noarp\" {\n"
173
  "        value 8;\n"
174
  "        description\n"
175
  "          \"Can\'t perform address resolution protocol.\";\n"
176
  "      }\n"
177
  "      enum \"promisc\" {\n"
178
  "        value 9;\n"
179
  "        description\n"
180
  "          \"Promiscuous mode. Receive all packets.\";\n"
181
  "      }\n"
182
  "      enum \"allmulti\" {\n"
183
  "        value 10;\n"
184
  "        description\n"
185
  "          \"Receive all multicast packets.\";\n"
186
  "      }\n"
187
  "      enum \"simplex\" {\n"
188
  "        value 11;\n"
189
  "        description\n"
190
  "          \"Does not Rx or Tx at the sametime.\";\n"
191
  "      }\n"
192
  "      enum \"link0\" {\n"
193
  "        value 12;\n"
194
  "        description\n"
195
  "          \"Link0.\";\n"
196
  "      }\n"
197
  "      enum \"link1\" {\n"
198
  "        value 13;\n"
199
  "        description\n"
200
  "          \"Link1.\";\n"
201
  "      }\n"
202
  "      enum \"link2\" {\n"
203
  "        value 14;\n"
204
  "        description\n"
205
  "          \"Link2.\";\n"
206
  "      }\n"
207
  "      enum \"multicast\" {\n"
208
  "        value 15;\n"
209
  "        description\n"
210
  "          \"Supports multicast transmission.\";\n"
211
  "      }\n"
212
  "      enum \"notransmit\" {\n"
213
  "        value 16;\n"
214
  "        description\n"
215
  "          \"Interface is no transmit mode.\";\n"
216
  "      }\n"
217
  "      enum \"nortexch\" {\n"
218
  "        value 17;\n"
219
  "        description\n"
220
  "          \"No routing info exchange.\";\n"
221
  "      }\n"
222
  "      enum \"virtual\" {\n"
223
  "        value 18;\n"
224
  "        description\n"
225
  "          \"Virtual interface.\";\n"
226
  "      }\n"
227
  "      enum \"ipv4\" {\n"
228
  "        value 19;\n"
229
  "        description\n"
230
  "          \"IPv4 enabled.\";\n"
231
  "      }\n"
232
  "      enum \"ipv6\" {\n"
233
  "        value 20;\n"
234
  "        description\n"
235
  "          \"IPv6 enabled.\";\n"
236
  "      }\n"
237
  "    }\n"
238
  "  }\n"
239
  "\n"
240
  "  grouping if-common-operational {\n"
241
  "    leaf if-index {\n"
242
  "      type int32 {\n"
243
  "        range \"0..2147483647\";\n"
244
  "      }\n"
245
  "      description\n"
246
  "        \"Interface index.\";\n"
247
  "    }\n"
248
  "\n"
249
  "    leaf mtu {\n"
250
  "      type uint16;\n"
251
  "      description\n"
252
  "        \"The size of the largest IPV4 packet that the interface\n"
253
  "         will send and receive.\";\n"
254
  "    }\n"
255
  "\n"
256
  "    leaf mtu6 {\n"
257
  "      type uint32;\n"
258
  "      description\n"
259
  "        \"The size of the largest IPV6 packet that the interface\n"
260
  "         will send and receive.\";\n"
261
  "    }\n"
262
  "\n"
263
  "    leaf speed {\n"
264
  "      type uint32;\n"
265
  "      description\n"
266
  "        \"Interface speed.\";\n"
267
  "    }\n"
268
  "\n"
269
  "    leaf metric {\n"
270
  "      type uint32;\n"
271
  "      description\n"
272
  "        \"Interface metric.\";\n"
273
  "    }\n"
274
  "\n"
275
  "    leaf flags {\n"
276
  "      type if-flags-type;\n"
277
  "      description\n"
278
  "        \"Interface flags.\";\n"
279
  "    }\n"
280
  "\n"
281
  "    leaf type {\n"
282
  "      type identityref {\n"
283
  "        base ietf-if:interface-type;\n"
284
  "      }\n"
285
  "      description\n"
286
  "        \"The link type of the interface.\";\n"
287
  "    }\n"
288
  "\n"
289
  "    leaf phy-address {\n"
290
  "      type yang:mac-address;\n"
291
  "      description\n"
292
  "        \"The interface\'s MAC address.\";\n"
293
  "    }\n"
294
  "  }\n"
295
  "\n"
296
  "  container lib {\n"
297
  "    list interface {\n"
298
  "      key \"name\";\n"
299
  "      description\n"
300
  "        \"Interface.\";\n"
301
  "      leaf name {\n"
302
  "        type string;\n"
303
  "        description\n"
304
  "          \"Interface name.\";\n"
305
  "      }\n"
306
  "\n"
307
  "      leaf vrf {\n"
308
  "        type frr-vrf:vrf-ref;\n"
309
  "        description\n"
310
  "          \"VRF this interface is associated with.\";\n"
311
  "        config false;\n"
312
  "      }\n"
313
  "\n"
314
  "      leaf description {\n"
315
  "        type string;\n"
316
  "        description\n"
317
  "          \"Interface description.\";\n"
318
  "      }\n"
319
  "\n"
320
  "      container state {\n"
321
  "        config false;\n"
322
  "        uses if-common-operational;\n"
323
  "      }\n"
324
  "    }\n"
325
  "  }\n"
326
  "}\n"
327
  "";
328
329
static struct yang_module_embed embed = {
330
  .mod_name = "frr-interface",
331
  .mod_rev = "2020-02-05",
332
  .sub_mod_name = "",
333
  .sub_mod_rev = "",
334
  .data = model,
335
  .format = LYS_IN_YANG,
336
};
337
338
static void embed_register(void) __attribute__((_CONSTRUCTOR(2000)));
339
static void embed_register(void)
340
7
{
341
7
  yang_module_embed(&embed);
342
7
}