1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2018 NetDEF, Inc.
9 #include "northbound.h"
12 #include "ripd/rip_nb.h"
14 /* clang-format off */
15 const struct frr_yang_module_info frr_ripd_info
= {
19 .xpath
= "/frr-ripd:ripd/instance",
21 .cli_show
= cli_show_router_rip
,
22 .create
= ripd_instance_create
,
23 .destroy
= ripd_instance_destroy
,
24 .get_keys
= ripd_instance_get_keys
,
25 .get_next
= ripd_instance_get_next
,
26 .lookup_entry
= ripd_instance_lookup_entry
,
30 .xpath
= "/frr-ripd:ripd/instance/allow-ecmp",
32 .cli_show
= cli_show_rip_allow_ecmp
,
33 .modify
= ripd_instance_allow_ecmp_modify
,
37 .xpath
= "/frr-ripd:ripd/instance/default-information-originate",
39 .cli_show
= cli_show_rip_default_information_originate
,
40 .modify
= ripd_instance_default_information_originate_modify
,
44 .xpath
= "/frr-ripd:ripd/instance/default-metric",
46 .cli_show
= cli_show_rip_default_metric
,
47 .modify
= ripd_instance_default_metric_modify
,
51 .xpath
= "/frr-ripd:ripd/instance/distance/default",
53 .cli_show
= cli_show_rip_distance
,
54 .modify
= ripd_instance_distance_default_modify
,
58 .xpath
= "/frr-ripd:ripd/instance/distance/source",
60 .cli_show
= cli_show_rip_distance_source
,
61 .create
= ripd_instance_distance_source_create
,
62 .destroy
= ripd_instance_distance_source_destroy
,
66 .xpath
= "/frr-ripd:ripd/instance/distance/source/distance",
68 .modify
= ripd_instance_distance_source_distance_modify
,
72 .xpath
= "/frr-ripd:ripd/instance/distance/source/access-list",
74 .destroy
= ripd_instance_distance_source_access_list_destroy
,
75 .modify
= ripd_instance_distance_source_access_list_modify
,
79 .xpath
= "/frr-ripd:ripd/instance/explicit-neighbor",
81 .cli_show
= cli_show_rip_neighbor
,
82 .create
= ripd_instance_explicit_neighbor_create
,
83 .destroy
= ripd_instance_explicit_neighbor_destroy
,
87 .xpath
= "/frr-ripd:ripd/instance/network",
89 .cli_show
= cli_show_rip_network_prefix
,
90 .create
= ripd_instance_network_create
,
91 .destroy
= ripd_instance_network_destroy
,
95 .xpath
= "/frr-ripd:ripd/instance/interface",
97 .cli_show
= cli_show_rip_network_interface
,
98 .create
= ripd_instance_interface_create
,
99 .destroy
= ripd_instance_interface_destroy
,
103 .xpath
= "/frr-ripd:ripd/instance/offset-list",
105 .cli_show
= cli_show_rip_offset_list
,
106 .create
= ripd_instance_offset_list_create
,
107 .destroy
= ripd_instance_offset_list_destroy
,
111 .xpath
= "/frr-ripd:ripd/instance/offset-list/access-list",
113 .modify
= ripd_instance_offset_list_access_list_modify
,
117 .xpath
= "/frr-ripd:ripd/instance/offset-list/metric",
119 .modify
= ripd_instance_offset_list_metric_modify
,
123 .xpath
= "/frr-ripd:ripd/instance/passive-default",
125 .cli_show
= cli_show_rip_passive_default
,
126 .modify
= ripd_instance_passive_default_modify
,
130 .xpath
= "/frr-ripd:ripd/instance/passive-interface",
132 .cli_show
= cli_show_rip_passive_interface
,
133 .create
= ripd_instance_passive_interface_create
,
134 .destroy
= ripd_instance_passive_interface_destroy
,
138 .xpath
= "/frr-ripd:ripd/instance/non-passive-interface",
140 .cli_show
= cli_show_rip_non_passive_interface
,
141 .create
= ripd_instance_non_passive_interface_create
,
142 .destroy
= ripd_instance_non_passive_interface_destroy
,
146 .xpath
= "/frr-ripd:ripd/instance/redistribute",
148 .apply_finish
= ripd_instance_redistribute_apply_finish
,
149 .cli_show
= cli_show_rip_redistribute
,
150 .create
= ripd_instance_redistribute_create
,
151 .destroy
= ripd_instance_redistribute_destroy
,
155 .xpath
= "/frr-ripd:ripd/instance/redistribute/route-map",
157 .destroy
= ripd_instance_redistribute_route_map_destroy
,
158 .modify
= ripd_instance_redistribute_route_map_modify
,
162 .xpath
= "/frr-ripd:ripd/instance/redistribute/metric",
164 .destroy
= ripd_instance_redistribute_metric_destroy
,
165 .modify
= ripd_instance_redistribute_metric_modify
,
169 .xpath
= "/frr-ripd:ripd/instance/if-route-maps/if-route-map",
171 .create
= ripd_instance_if_route_maps_if_route_map_create
,
172 .destroy
= ripd_instance_if_route_maps_if_route_map_destroy
,
176 .xpath
= "/frr-ripd:ripd/instance/if-route-maps/if-route-map/in-route-map",
178 .modify
= ripd_instance_if_route_maps_if_route_map_in_route_map_modify
,
179 .destroy
= ripd_instance_if_route_maps_if_route_map_in_route_map_destroy
,
183 .xpath
= "/frr-ripd:ripd/instance/if-route-maps/if-route-map/out-route-map",
185 .modify
= ripd_instance_if_route_maps_if_route_map_out_route_map_modify
,
186 .destroy
= ripd_instance_if_route_maps_if_route_map_out_route_map_destroy
,
190 .xpath
= "/frr-ripd:ripd/instance/static-route",
192 .cli_show
= cli_show_rip_route
,
193 .create
= ripd_instance_static_route_create
,
194 .destroy
= ripd_instance_static_route_destroy
,
198 .xpath
= "/frr-ripd:ripd/instance/timers",
200 .apply_finish
= ripd_instance_timers_apply_finish
,
201 .cli_show
= cli_show_rip_timers
,
205 .xpath
= "/frr-ripd:ripd/instance/timers/flush-interval",
207 .modify
= ripd_instance_timers_flush_interval_modify
,
211 .xpath
= "/frr-ripd:ripd/instance/timers/holddown-interval",
213 .modify
= ripd_instance_timers_holddown_interval_modify
,
217 .xpath
= "/frr-ripd:ripd/instance/timers/update-interval",
219 .modify
= ripd_instance_timers_update_interval_modify
,
223 .xpath
= "/frr-ripd:ripd/instance/version",
225 .cli_show
= cli_show_rip_version
,
229 .xpath
= "/frr-ripd:ripd/instance/version/receive",
231 .modify
= ripd_instance_version_receive_modify
,
235 .xpath
= "/frr-ripd:ripd/instance/version/send",
237 .modify
= ripd_instance_version_send_modify
,
241 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/split-horizon",
243 .cli_show
= cli_show_ip_rip_split_horizon
,
244 .modify
= lib_interface_rip_split_horizon_modify
,
248 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/v2-broadcast",
250 .cli_show
= cli_show_ip_rip_v2_broadcast
,
251 .modify
= lib_interface_rip_v2_broadcast_modify
,
255 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-receive",
257 .cli_show
= cli_show_ip_rip_receive_version
,
258 .modify
= lib_interface_rip_version_receive_modify
,
262 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-send",
264 .cli_show
= cli_show_ip_rip_send_version
,
265 .modify
= lib_interface_rip_version_send_modify
,
269 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme",
271 .cli_show
= cli_show_ip_rip_authentication_scheme
,
275 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/mode",
277 .modify
= lib_interface_rip_authentication_scheme_mode_modify
,
281 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/md5-auth-length",
283 .destroy
= lib_interface_rip_authentication_scheme_md5_auth_length_destroy
,
284 .modify
= lib_interface_rip_authentication_scheme_md5_auth_length_modify
,
288 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-password",
290 .cli_show
= cli_show_ip_rip_authentication_string
,
291 .destroy
= lib_interface_rip_authentication_password_destroy
,
292 .modify
= lib_interface_rip_authentication_password_modify
,
296 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-key-chain",
298 .cli_show
= cli_show_ip_rip_authentication_key_chain
,
299 .destroy
= lib_interface_rip_authentication_key_chain_destroy
,
300 .modify
= lib_interface_rip_authentication_key_chain_modify
,
304 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor",
306 .get_keys
= ripd_instance_state_neighbors_neighbor_get_keys
,
307 .get_next
= ripd_instance_state_neighbors_neighbor_get_next
,
308 .lookup_entry
= ripd_instance_state_neighbors_neighbor_lookup_entry
,
312 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/address",
314 .get_elem
= ripd_instance_state_neighbors_neighbor_address_get_elem
,
318 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/last-update",
320 .get_elem
= ripd_instance_state_neighbors_neighbor_last_update_get_elem
,
324 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-packets-rcvd",
326 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem
,
330 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-routes-rcvd",
332 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem
,
336 .xpath
= "/frr-ripd:ripd/instance/state/routes/route",
338 .get_keys
= ripd_instance_state_routes_route_get_keys
,
339 .get_next
= ripd_instance_state_routes_route_get_next
,
340 .lookup_entry
= ripd_instance_state_routes_route_lookup_entry
,
344 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/prefix",
346 .get_elem
= ripd_instance_state_routes_route_prefix_get_elem
,
350 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/next-hop",
352 .get_elem
= ripd_instance_state_routes_route_next_hop_get_elem
,
356 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/interface",
358 .get_elem
= ripd_instance_state_routes_route_interface_get_elem
,
362 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop",
364 .get_next
= ripd_instance_state_routes_route_nexthops_nexthop_get_next
,
368 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/nh-type",
370 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_nh_type_get_elem
,
374 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/protocol",
376 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_protocol_get_elem
,
380 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/rip-type",
382 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_rip_type_get_elem
,
386 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/gateway",
388 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_gateway_get_elem
,
392 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/interface",
394 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_interface_get_elem
,
398 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/from",
400 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_from_get_elem
,
404 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/tag",
406 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_tag_get_elem
,
410 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/external-metric",
412 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_external_metric_get_elem
,
416 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/expire-time",
418 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_expire_time_get_elem
,
422 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/metric",
424 .get_elem
= ripd_instance_state_routes_route_metric_get_elem
,
428 .xpath
= "/frr-ripd:clear-rip-route",
430 .rpc
= clear_rip_route_rpc
,