]> git.proxmox.com Git - mirror_frr.git/blob - ripngd/ripng_nb.c
Merge pull request #5196 from kuldeepkash/testcases
[mirror_frr.git] / ripngd / ripng_nb.c
1 /*
2 * Copyright (C) 2018 NetDEF, Inc.
3 * Renato Westphal
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #include <zebra.h>
21
22 #include "northbound.h"
23 #include "libfrr.h"
24
25 #include "ripngd/ripng_nb.h"
26
27 /* clang-format off */
28 const struct frr_yang_module_info frr_ripngd_info = {
29 .name = "frr-ripngd",
30 .nodes = {
31 {
32 .xpath = "/frr-ripngd:ripngd/instance",
33 .cbs = {
34 .cli_show = cli_show_router_ripng,
35 .create = ripngd_instance_create,
36 .destroy = ripngd_instance_destroy,
37 .get_keys = ripngd_instance_get_keys,
38 .get_next = ripngd_instance_get_next,
39 .lookup_entry = ripngd_instance_lookup_entry,
40 },
41 },
42 {
43 .xpath = "/frr-ripngd:ripngd/instance/allow-ecmp",
44 .cbs = {
45 .cli_show = cli_show_ripng_allow_ecmp,
46 .modify = ripngd_instance_allow_ecmp_modify,
47 },
48 },
49 {
50 .xpath = "/frr-ripngd:ripngd/instance/default-information-originate",
51 .cbs = {
52 .cli_show = cli_show_ripng_default_information_originate,
53 .modify = ripngd_instance_default_information_originate_modify,
54 },
55 },
56 {
57 .xpath = "/frr-ripngd:ripngd/instance/default-metric",
58 .cbs = {
59 .cli_show = cli_show_ripng_default_metric,
60 .modify = ripngd_instance_default_metric_modify,
61 },
62 },
63 {
64 .xpath = "/frr-ripngd:ripngd/instance/network",
65 .cbs = {
66 .cli_show = cli_show_ripng_network_prefix,
67 .create = ripngd_instance_network_create,
68 .destroy = ripngd_instance_network_destroy,
69 },
70 },
71 {
72 .xpath = "/frr-ripngd:ripngd/instance/interface",
73 .cbs = {
74 .cli_show = cli_show_ripng_network_interface,
75 .create = ripngd_instance_interface_create,
76 .destroy = ripngd_instance_interface_destroy,
77 },
78 },
79 {
80 .xpath = "/frr-ripngd:ripngd/instance/offset-list",
81 .cbs = {
82 .cli_show = cli_show_ripng_offset_list,
83 .create = ripngd_instance_offset_list_create,
84 .destroy = ripngd_instance_offset_list_destroy,
85 },
86 },
87 {
88 .xpath = "/frr-ripngd:ripngd/instance/offset-list/access-list",
89 .cbs = {
90 .modify = ripngd_instance_offset_list_access_list_modify,
91 },
92 },
93 {
94 .xpath = "/frr-ripngd:ripngd/instance/offset-list/metric",
95 .cbs = {
96 .modify = ripngd_instance_offset_list_metric_modify,
97 },
98 },
99 {
100 .xpath = "/frr-ripngd:ripngd/instance/passive-interface",
101 .cbs = {
102 .cli_show = cli_show_ripng_passive_interface,
103 .create = ripngd_instance_passive_interface_create,
104 .destroy = ripngd_instance_passive_interface_destroy,
105 },
106 },
107 {
108 .xpath = "/frr-ripngd:ripngd/instance/redistribute",
109 .cbs = {
110 .apply_finish = ripngd_instance_redistribute_apply_finish,
111 .cli_show = cli_show_ripng_redistribute,
112 .create = ripngd_instance_redistribute_create,
113 .destroy = ripngd_instance_redistribute_destroy,
114 },
115 },
116 {
117 .xpath = "/frr-ripngd:ripngd/instance/redistribute/route-map",
118 .cbs = {
119 .destroy = ripngd_instance_redistribute_route_map_destroy,
120 .modify = ripngd_instance_redistribute_route_map_modify,
121 },
122 },
123 {
124 .xpath = "/frr-ripngd:ripngd/instance/redistribute/metric",
125 .cbs = {
126 .destroy = ripngd_instance_redistribute_metric_destroy,
127 .modify = ripngd_instance_redistribute_metric_modify,
128 },
129 },
130 {
131 .xpath = "/frr-ripngd:ripngd/instance/static-route",
132 .cbs = {
133 .cli_show = cli_show_ripng_route,
134 .create = ripngd_instance_static_route_create,
135 .destroy = ripngd_instance_static_route_destroy,
136 },
137 },
138 {
139 .xpath = "/frr-ripngd:ripngd/instance/aggregate-address",
140 .cbs = {
141 .cli_show = cli_show_ripng_aggregate_address,
142 .create = ripngd_instance_aggregate_address_create,
143 .destroy = ripngd_instance_aggregate_address_destroy,
144 },
145 },
146 {
147 .xpath = "/frr-ripngd:ripngd/instance/timers",
148 .cbs = {
149 .apply_finish = ripngd_instance_timers_apply_finish,
150 .cli_show = cli_show_ripng_timers,
151 },
152 },
153 {
154 .xpath = "/frr-ripngd:ripngd/instance/timers/flush-interval",
155 .cbs = {
156 .modify = ripngd_instance_timers_flush_interval_modify,
157 },
158 },
159 {
160 .xpath = "/frr-ripngd:ripngd/instance/timers/holddown-interval",
161 .cbs = {
162 .modify = ripngd_instance_timers_holddown_interval_modify,
163 },
164 },
165 {
166 .xpath = "/frr-ripngd:ripngd/instance/timers/update-interval",
167 .cbs = {
168 .modify = ripngd_instance_timers_update_interval_modify,
169 },
170 },
171 {
172 .xpath = "/frr-ripngd:ripngd/instance/state/neighbors/neighbor",
173 .cbs = {
174 .get_keys = ripngd_instance_state_neighbors_neighbor_get_keys,
175 .get_next = ripngd_instance_state_neighbors_neighbor_get_next,
176 .lookup_entry = ripngd_instance_state_neighbors_neighbor_lookup_entry,
177 },
178 },
179 {
180 .xpath = "/frr-ripngd:ripngd/instance/state/neighbors/neighbor/address",
181 .cbs = {
182 .get_elem = ripngd_instance_state_neighbors_neighbor_address_get_elem,
183 },
184 },
185 {
186 .xpath = "/frr-ripngd:ripngd/instance/state/neighbors/neighbor/last-update",
187 .cbs = {
188 .get_elem = ripngd_instance_state_neighbors_neighbor_last_update_get_elem,
189 },
190 },
191 {
192 .xpath = "/frr-ripngd:ripngd/instance/state/neighbors/neighbor/bad-packets-rcvd",
193 .cbs = {
194 .get_elem = ripngd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem,
195 },
196 },
197 {
198 .xpath = "/frr-ripngd:ripngd/instance/state/neighbors/neighbor/bad-routes-rcvd",
199 .cbs = {
200 .get_elem = ripngd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem,
201 },
202 },
203 {
204 .xpath = "/frr-ripngd:ripngd/instance/state/routes/route",
205 .cbs = {
206 .get_keys = ripngd_instance_state_routes_route_get_keys,
207 .get_next = ripngd_instance_state_routes_route_get_next,
208 .lookup_entry = ripngd_instance_state_routes_route_lookup_entry,
209 },
210 },
211 {
212 .xpath = "/frr-ripngd:ripngd/instance/state/routes/route/prefix",
213 .cbs = {
214 .get_elem = ripngd_instance_state_routes_route_prefix_get_elem,
215 },
216 },
217 {
218 .xpath = "/frr-ripngd:ripngd/instance/state/routes/route/next-hop",
219 .cbs = {
220 .get_elem = ripngd_instance_state_routes_route_next_hop_get_elem,
221 },
222 },
223 {
224 .xpath = "/frr-ripngd:ripngd/instance/state/routes/route/interface",
225 .cbs = {
226 .get_elem = ripngd_instance_state_routes_route_interface_get_elem,
227 },
228 },
229 {
230 .xpath = "/frr-ripngd:ripngd/instance/state/routes/route/metric",
231 .cbs = {
232 .get_elem = ripngd_instance_state_routes_route_metric_get_elem,
233 },
234 },
235 {
236 .xpath = "/frr-ripngd:clear-ripng-route",
237 .cbs = {
238 .rpc = clear_ripng_route_rpc,
239 },
240 },
241 {
242 .xpath = "/frr-interface:lib/interface/frr-ripngd:ripng/split-horizon",
243 .cbs = {
244 .cli_show = cli_show_ipv6_ripng_split_horizon,
245 .modify = lib_interface_ripng_split_horizon_modify,
246 },
247 },
248 {
249 .xpath = NULL,
250 },
251 }
252 };