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"
13 #include "lib/if_rmap.h"
15 /* clang-format off */
16 const struct frr_yang_module_info frr_ripd_info
= {
20 .xpath
= "/frr-ripd:ripd/instance",
22 .cli_show
= cli_show_router_rip
,
23 .create
= ripd_instance_create
,
24 .destroy
= ripd_instance_destroy
,
25 .get_keys
= ripd_instance_get_keys
,
26 .get_next
= ripd_instance_get_next
,
27 .lookup_entry
= ripd_instance_lookup_entry
,
31 .xpath
= "/frr-ripd:ripd/instance/allow-ecmp",
33 .cli_show
= cli_show_rip_allow_ecmp
,
34 .modify
= ripd_instance_allow_ecmp_modify
,
38 .xpath
= "/frr-ripd:ripd/instance/default-information-originate",
40 .cli_show
= cli_show_rip_default_information_originate
,
41 .modify
= ripd_instance_default_information_originate_modify
,
45 .xpath
= "/frr-ripd:ripd/instance/default-metric",
47 .cli_show
= cli_show_rip_default_metric
,
48 .modify
= ripd_instance_default_metric_modify
,
52 .xpath
= "/frr-ripd:ripd/instance/distance/default",
54 .cli_show
= cli_show_rip_distance
,
55 .modify
= ripd_instance_distance_default_modify
,
59 .xpath
= "/frr-ripd:ripd/instance/distance/source",
61 .cli_show
= cli_show_rip_distance_source
,
62 .create
= ripd_instance_distance_source_create
,
63 .destroy
= ripd_instance_distance_source_destroy
,
67 .xpath
= "/frr-ripd:ripd/instance/distance/source/distance",
69 .modify
= ripd_instance_distance_source_distance_modify
,
73 .xpath
= "/frr-ripd:ripd/instance/distance/source/access-list",
75 .destroy
= ripd_instance_distance_source_access_list_destroy
,
76 .modify
= ripd_instance_distance_source_access_list_modify
,
80 .xpath
= "/frr-ripd:ripd/instance/explicit-neighbor",
82 .cli_show
= cli_show_rip_neighbor
,
83 .create
= ripd_instance_explicit_neighbor_create
,
84 .destroy
= ripd_instance_explicit_neighbor_destroy
,
88 .xpath
= "/frr-ripd:ripd/instance/network",
90 .cli_show
= cli_show_rip_network_prefix
,
91 .create
= ripd_instance_network_create
,
92 .destroy
= ripd_instance_network_destroy
,
96 .xpath
= "/frr-ripd:ripd/instance/interface",
98 .cli_show
= cli_show_rip_network_interface
,
99 .create
= ripd_instance_interface_create
,
100 .destroy
= ripd_instance_interface_destroy
,
104 .xpath
= "/frr-ripd:ripd/instance/offset-list",
106 .cli_show
= cli_show_rip_offset_list
,
107 .create
= ripd_instance_offset_list_create
,
108 .destroy
= ripd_instance_offset_list_destroy
,
112 .xpath
= "/frr-ripd:ripd/instance/offset-list/access-list",
114 .modify
= ripd_instance_offset_list_access_list_modify
,
118 .xpath
= "/frr-ripd:ripd/instance/offset-list/metric",
120 .modify
= ripd_instance_offset_list_metric_modify
,
124 .xpath
= "/frr-ripd:ripd/instance/passive-default",
126 .cli_show
= cli_show_rip_passive_default
,
127 .modify
= ripd_instance_passive_default_modify
,
131 .xpath
= "/frr-ripd:ripd/instance/passive-interface",
133 .cli_show
= cli_show_rip_passive_interface
,
134 .create
= ripd_instance_passive_interface_create
,
135 .destroy
= ripd_instance_passive_interface_destroy
,
139 .xpath
= "/frr-ripd:ripd/instance/non-passive-interface",
141 .cli_show
= cli_show_rip_non_passive_interface
,
142 .create
= ripd_instance_non_passive_interface_create
,
143 .destroy
= ripd_instance_non_passive_interface_destroy
,
147 .xpath
= "/frr-ripd:ripd/instance/redistribute",
149 .apply_finish
= ripd_instance_redistribute_apply_finish
,
150 .cli_show
= cli_show_rip_redistribute
,
151 .create
= ripd_instance_redistribute_create
,
152 .destroy
= ripd_instance_redistribute_destroy
,
156 .xpath
= "/frr-ripd:ripd/instance/redistribute/route-map",
158 .destroy
= ripd_instance_redistribute_route_map_destroy
,
159 .modify
= ripd_instance_redistribute_route_map_modify
,
163 .xpath
= "/frr-ripd:ripd/instance/redistribute/metric",
165 .destroy
= ripd_instance_redistribute_metric_destroy
,
166 .modify
= ripd_instance_redistribute_metric_modify
,
170 .xpath
= "/frr-ripd:ripd/instance/if-route-maps/if-route-map",
172 .create
= ripd_instance_if_route_maps_if_route_map_create
,
173 .destroy
= ripd_instance_if_route_maps_if_route_map_destroy
,
174 .cli_show
= cli_show_if_route_map
,
178 .xpath
= "/frr-ripd:ripd/instance/if-route-maps/if-route-map/in-route-map",
180 .modify
= ripd_instance_if_route_maps_if_route_map_in_route_map_modify
,
181 .destroy
= ripd_instance_if_route_maps_if_route_map_in_route_map_destroy
,
185 .xpath
= "/frr-ripd:ripd/instance/if-route-maps/if-route-map/out-route-map",
187 .modify
= ripd_instance_if_route_maps_if_route_map_out_route_map_modify
,
188 .destroy
= ripd_instance_if_route_maps_if_route_map_out_route_map_destroy
,
192 .xpath
= "/frr-ripd:ripd/instance/static-route",
194 .cli_show
= cli_show_rip_route
,
195 .create
= ripd_instance_static_route_create
,
196 .destroy
= ripd_instance_static_route_destroy
,
200 .xpath
= "/frr-ripd:ripd/instance/timers",
202 .apply_finish
= ripd_instance_timers_apply_finish
,
203 .cli_show
= cli_show_rip_timers
,
207 .xpath
= "/frr-ripd:ripd/instance/timers/flush-interval",
209 .modify
= ripd_instance_timers_flush_interval_modify
,
213 .xpath
= "/frr-ripd:ripd/instance/timers/holddown-interval",
215 .modify
= ripd_instance_timers_holddown_interval_modify
,
219 .xpath
= "/frr-ripd:ripd/instance/timers/update-interval",
221 .modify
= ripd_instance_timers_update_interval_modify
,
225 .xpath
= "/frr-ripd:ripd/instance/version",
227 .cli_show
= cli_show_rip_version
,
231 .xpath
= "/frr-ripd:ripd/instance/version/receive",
233 .modify
= ripd_instance_version_receive_modify
,
237 .xpath
= "/frr-ripd:ripd/instance/version/send",
239 .modify
= ripd_instance_version_send_modify
,
243 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/split-horizon",
245 .cli_show
= cli_show_ip_rip_split_horizon
,
246 .modify
= lib_interface_rip_split_horizon_modify
,
250 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/v2-broadcast",
252 .cli_show
= cli_show_ip_rip_v2_broadcast
,
253 .modify
= lib_interface_rip_v2_broadcast_modify
,
257 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-receive",
259 .cli_show
= cli_show_ip_rip_receive_version
,
260 .modify
= lib_interface_rip_version_receive_modify
,
264 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-send",
266 .cli_show
= cli_show_ip_rip_send_version
,
267 .modify
= lib_interface_rip_version_send_modify
,
271 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme",
273 .cli_show
= cli_show_ip_rip_authentication_scheme
,
277 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/mode",
279 .modify
= lib_interface_rip_authentication_scheme_mode_modify
,
283 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/md5-auth-length",
285 .destroy
= lib_interface_rip_authentication_scheme_md5_auth_length_destroy
,
286 .modify
= lib_interface_rip_authentication_scheme_md5_auth_length_modify
,
290 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-password",
292 .cli_show
= cli_show_ip_rip_authentication_string
,
293 .destroy
= lib_interface_rip_authentication_password_destroy
,
294 .modify
= lib_interface_rip_authentication_password_modify
,
298 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-key-chain",
300 .cli_show
= cli_show_ip_rip_authentication_key_chain
,
301 .destroy
= lib_interface_rip_authentication_key_chain_destroy
,
302 .modify
= lib_interface_rip_authentication_key_chain_modify
,
306 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor",
308 .get_keys
= ripd_instance_state_neighbors_neighbor_get_keys
,
309 .get_next
= ripd_instance_state_neighbors_neighbor_get_next
,
310 .lookup_entry
= ripd_instance_state_neighbors_neighbor_lookup_entry
,
314 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/address",
316 .get_elem
= ripd_instance_state_neighbors_neighbor_address_get_elem
,
320 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/last-update",
322 .get_elem
= ripd_instance_state_neighbors_neighbor_last_update_get_elem
,
326 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-packets-rcvd",
328 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem
,
332 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-routes-rcvd",
334 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem
,
338 .xpath
= "/frr-ripd:ripd/instance/state/routes/route",
340 .get_keys
= ripd_instance_state_routes_route_get_keys
,
341 .get_next
= ripd_instance_state_routes_route_get_next
,
342 .lookup_entry
= ripd_instance_state_routes_route_lookup_entry
,
346 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/prefix",
348 .get_elem
= ripd_instance_state_routes_route_prefix_get_elem
,
352 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/next-hop",
354 .get_elem
= ripd_instance_state_routes_route_next_hop_get_elem
,
358 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/interface",
360 .get_elem
= ripd_instance_state_routes_route_interface_get_elem
,
364 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop",
366 .get_next
= ripd_instance_state_routes_route_nexthops_nexthop_get_next
,
370 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/nh-type",
372 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_nh_type_get_elem
,
376 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/protocol",
378 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_protocol_get_elem
,
382 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/rip-type",
384 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_rip_type_get_elem
,
388 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/gateway",
390 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_gateway_get_elem
,
394 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/interface",
396 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_interface_get_elem
,
400 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/from",
402 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_from_get_elem
,
406 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/tag",
408 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_tag_get_elem
,
412 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/external-metric",
414 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_external_metric_get_elem
,
418 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/expire-time",
420 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_expire_time_get_elem
,
424 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/metric",
426 .get_elem
= ripd_instance_state_routes_route_metric_get_elem
,
430 .xpath
= "/frr-ripd:clear-rip-route",
432 .rpc
= clear_rip_route_rpc
,