Coverage Report

Created: 2025-07-14 06:48

/src/frr/yang/frr-zebra-route-map.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
  "module frr-zebra-route-map {\n"
8
  "  yang-version 1.1;\n"
9
  "  namespace \"http://frrouting.org/yang/zebra-route-map\";\n"
10
  "  prefix frr-zebra-route-map;\n"
11
  "\n"
12
  "  import ietf-inet-types {\n"
13
  "    prefix inet;\n"
14
  "  }\n"
15
  "\n"
16
  "  import frr-route-map {\n"
17
  "    prefix frr-route-map;\n"
18
  "  }\n"
19
  "\n"
20
  "  import frr-route-types {\n"
21
  "    prefix frr-route-types;\n"
22
  "  }\n"
23
  "\n"
24
  "  organization\n"
25
  "    \"Free Range Routing\";\n"
26
  "  contact\n"
27
  "    \"FRR Users List:       <mailto:frog@lists.frrouting.org>\n"
28
  "     FRR Development List: <mailto:dev@lists.frrouting.org>\";\n"
29
  "  description\n"
30
  "    \"This module defines zebra route map settings\";\n"
31
  "\n"
32
  "  revision 2020-01-02 {\n"
33
  "    description\n"
34
  "      \"Initial revision\";\n"
35
  "  }\n"
36
  "\n"
37
  "  identity ipv4-prefix-length {\n"
38
  "    base frr-route-map:rmap-match-type;\n"
39
  "    description\n"
40
  "      \"Match IPv4 address prefix length\";\n"
41
  "  }\n"
42
  "\n"
43
  "  identity ipv4-next-hop-prefix-length {\n"
44
  "    base frr-route-map:rmap-match-type;\n"
45
  "    description\n"
46
  "      \"Match IPv4 next-hop address prefix length\";\n"
47
  "  }\n"
48
  "\n"
49
  "  identity ipv6-prefix-length {\n"
50
  "    base frr-route-map:rmap-match-type;\n"
51
  "    description\n"
52
  "      \"Match IPv6 address prefix length\";\n"
53
  "  }\n"
54
  "\n"
55
  "  identity source-instance {\n"
56
  "    base frr-route-map:rmap-match-type;\n"
57
  "    description\n"
58
  "      \"Match the protocol\'s instance number\";\n"
59
  "  }\n"
60
  "\n"
61
  "  identity source-protocol {\n"
62
  "    base frr-route-map:rmap-match-type;\n"
63
  "    description\n"
64
  "      \"Match protocol via which the route was learnt\";\n"
65
  "  }\n"
66
  "\n"
67
  "  identity src-address {\n"
68
  "    base frr-route-map:rmap-set-type;\n"
69
  "    description\n"
70
  "      \"Set IPv4/IPv6 source address for route\";\n"
71
  "  }\n"
72
  "\n"
73
  "  augment \"/frr-route-map:lib\"\n"
74
  "    + \"/frr-route-map:route-map\"\n"
75
  "    + \"/frr-route-map:entry\"\n"
76
  "    + \"/frr-route-map:match-condition\"\n"
77
  "    + \"/frr-route-map:rmap-match-condition\"\n"
78
  "    + \"/frr-route-map:match-condition\" {\n"
79
  "    case ipv4-prefix-length {\n"
80
  "      when \"derived-from-or-self(../frr-route-map:condition, \'frr-zebra-route-map:ipv4-prefix-length\') or \"\n"
81
  "         + \"derived-from-or-self(../frr-route-map:condition, \'frr-zebra-route-map:ipv4-next-hop-prefix-length\')\";\n"
82
  "      leaf ipv4-prefix-length {\n"
83
  "        type uint8 {\n"
84
  "          range \"0..32\";\n"
85
  "        }\n"
86
  "      }\n"
87
  "    }\n"
88
  "\n"
89
  "    case ipv6-prefix-length {\n"
90
  "      when \"derived-from-or-self(../frr-route-map:condition, \'frr-zebra-route-map:ipv6-prefix-length\')\";\n"
91
  "      leaf ipv6-prefix-length {\n"
92
  "        type uint8 {\n"
93
  "          range \"0..128\";\n"
94
  "        }\n"
95
  "      }\n"
96
  "    }\n"
97
  "\n"
98
  "    case source-instance {\n"
99
  "      when \"derived-from-or-self(../frr-route-map:condition, \'frr-zebra-route-map:source-instance\')\";\n"
100
  "      leaf source-instance {\n"
101
  "        type uint8 {\n"
102
  "          range \"0..255\";\n"
103
  "        }\n"
104
  "      }\n"
105
  "    }\n"
106
  "\n"
107
  "    case source-protocol {\n"
108
  "      when \"derived-from-or-self(../frr-route-map:condition, \'frr-zebra-route-map:source-protocol\')\";\n"
109
  "      leaf source-protocol {\n"
110
  "        type frr-route-types:frr-route-types;\n"
111
  "      }\n"
112
  "    }\n"
113
  "  }\n"
114
  "\n"
115
  "  augment \"/frr-route-map:lib\"\n"
116
  "    + \"/frr-route-map:route-map\"\n"
117
  "    + \"/frr-route-map:entry\"\n"
118
  "    + \"/frr-route-map:set-action\"\n"
119
  "    + \"/frr-route-map:rmap-set-action\"\n"
120
  "    + \"/frr-route-map:set-action\" {\n"
121
  "    case src-address {\n"
122
  "      when \"derived-from-or-self(../frr-route-map:action, \'frr-zebra-route-map:src-address\')\";\n"
123
  "      choice src-address {\n"
124
  "        description\n"
125
  "          \"Value of the source address\";\n"
126
  "        case ipv4-src-address {\n"
127
  "          leaf ipv4-src-address {\n"
128
  "            type inet:ipv4-address;\n"
129
  "            mandatory true;\n"
130
  "          }\n"
131
  "        }\n"
132
  "\n"
133
  "        case ipv6-src-address {\n"
134
  "          leaf ipv6-src-address {\n"
135
  "            type inet:ipv6-address;\n"
136
  "            mandatory true;\n"
137
  "          }\n"
138
  "        }\n"
139
  "      }\n"
140
  "    }\n"
141
  "  }\n"
142
  "}\n"
143
  "";
144
145
static struct yang_module_embed embed = {
146
  .mod_name = "frr-zebra-route-map",
147
  .mod_rev = "2020-01-02",
148
  .sub_mod_name = "",
149
  .sub_mod_rev = "",
150
  .data = model,
151
  .format = LYS_IN_YANG,
152
};
153
154
static void embed_register(void) __attribute__((_CONSTRUCTOR(2000)));
155
static void embed_register(void)
156
2
{
157
2
  yang_module_embed(&embed);
158
2
}