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-ripd:ripd/instance/default-bfd-profile",
245 .modify
= ripd_instance_default_bfd_profile_modify
,
246 .destroy
= ripd_instance_default_bfd_profile_destroy
,
247 .cli_show
= cli_show_ripd_instance_default_bfd_profile
,
251 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/split-horizon",
253 .cli_show
= cli_show_ip_rip_split_horizon
,
254 .modify
= lib_interface_rip_split_horizon_modify
,
258 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/v2-broadcast",
260 .cli_show
= cli_show_ip_rip_v2_broadcast
,
261 .modify
= lib_interface_rip_v2_broadcast_modify
,
265 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-receive",
267 .cli_show
= cli_show_ip_rip_receive_version
,
268 .modify
= lib_interface_rip_version_receive_modify
,
272 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-send",
274 .cli_show
= cli_show_ip_rip_send_version
,
275 .modify
= lib_interface_rip_version_send_modify
,
279 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme",
281 .cli_show
= cli_show_ip_rip_authentication_scheme
,
285 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/mode",
287 .modify
= lib_interface_rip_authentication_scheme_mode_modify
,
291 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/md5-auth-length",
293 .destroy
= lib_interface_rip_authentication_scheme_md5_auth_length_destroy
,
294 .modify
= lib_interface_rip_authentication_scheme_md5_auth_length_modify
,
298 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-password",
300 .cli_show
= cli_show_ip_rip_authentication_string
,
301 .destroy
= lib_interface_rip_authentication_password_destroy
,
302 .modify
= lib_interface_rip_authentication_password_modify
,
306 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-key-chain",
308 .cli_show
= cli_show_ip_rip_authentication_key_chain
,
309 .destroy
= lib_interface_rip_authentication_key_chain_destroy
,
310 .modify
= lib_interface_rip_authentication_key_chain_modify
,
314 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/bfd-monitoring",
316 .create
= lib_interface_rip_bfd_create
,
317 .destroy
= lib_interface_rip_bfd_destroy
,
321 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/bfd-monitoring/enable",
323 .cli_show
= cli_show_ip_rip_bfd_enable
,
324 .modify
= lib_interface_rip_bfd_enable_modify
,
328 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/bfd-monitoring/profile",
330 .cli_show
= cli_show_ip_rip_bfd_profile
,
331 .modify
= lib_interface_rip_bfd_profile_modify
,
332 .destroy
= lib_interface_rip_bfd_profile_destroy
,
336 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor",
338 .get_keys
= ripd_instance_state_neighbors_neighbor_get_keys
,
339 .get_next
= ripd_instance_state_neighbors_neighbor_get_next
,
340 .lookup_entry
= ripd_instance_state_neighbors_neighbor_lookup_entry
,
344 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/address",
346 .get_elem
= ripd_instance_state_neighbors_neighbor_address_get_elem
,
350 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/last-update",
352 .get_elem
= ripd_instance_state_neighbors_neighbor_last_update_get_elem
,
356 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-packets-rcvd",
358 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem
,
362 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-routes-rcvd",
364 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem
,
368 .xpath
= "/frr-ripd:ripd/instance/state/routes/route",
370 .get_keys
= ripd_instance_state_routes_route_get_keys
,
371 .get_next
= ripd_instance_state_routes_route_get_next
,
372 .lookup_entry
= ripd_instance_state_routes_route_lookup_entry
,
376 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/prefix",
378 .get_elem
= ripd_instance_state_routes_route_prefix_get_elem
,
382 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/next-hop",
384 .get_elem
= ripd_instance_state_routes_route_next_hop_get_elem
,
388 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/interface",
390 .get_elem
= ripd_instance_state_routes_route_interface_get_elem
,
394 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop",
396 .get_next
= ripd_instance_state_routes_route_nexthops_nexthop_get_next
,
400 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/nh-type",
402 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_nh_type_get_elem
,
406 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/protocol",
408 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_protocol_get_elem
,
412 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/rip-type",
414 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_rip_type_get_elem
,
418 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/gateway",
420 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_gateway_get_elem
,
424 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/interface",
426 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_interface_get_elem
,
430 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/from",
432 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_from_get_elem
,
436 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/tag",
438 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_tag_get_elem
,
442 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/external-metric",
444 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_external_metric_get_elem
,
448 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/expire-time",
450 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_expire_time_get_elem
,
454 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/metric",
456 .get_elem
= ripd_instance_state_routes_route_metric_get_elem
,
460 .xpath
= "/frr-ripd:clear-rip-route",
462 .rpc
= clear_rip_route_rpc
,