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/static-route",
171 .cli_show
= cli_show_rip_route
,
172 .create
= ripd_instance_static_route_create
,
173 .destroy
= ripd_instance_static_route_destroy
,
177 .xpath
= "/frr-ripd:ripd/instance/timers",
179 .apply_finish
= ripd_instance_timers_apply_finish
,
180 .cli_show
= cli_show_rip_timers
,
184 .xpath
= "/frr-ripd:ripd/instance/timers/flush-interval",
186 .modify
= ripd_instance_timers_flush_interval_modify
,
190 .xpath
= "/frr-ripd:ripd/instance/timers/holddown-interval",
192 .modify
= ripd_instance_timers_holddown_interval_modify
,
196 .xpath
= "/frr-ripd:ripd/instance/timers/update-interval",
198 .modify
= ripd_instance_timers_update_interval_modify
,
202 .xpath
= "/frr-ripd:ripd/instance/version",
204 .cli_show
= cli_show_rip_version
,
208 .xpath
= "/frr-ripd:ripd/instance/version/receive",
210 .modify
= ripd_instance_version_receive_modify
,
214 .xpath
= "/frr-ripd:ripd/instance/version/send",
216 .modify
= ripd_instance_version_send_modify
,
220 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/split-horizon",
222 .cli_show
= cli_show_ip_rip_split_horizon
,
223 .modify
= lib_interface_rip_split_horizon_modify
,
227 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/v2-broadcast",
229 .cli_show
= cli_show_ip_rip_v2_broadcast
,
230 .modify
= lib_interface_rip_v2_broadcast_modify
,
234 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-receive",
236 .cli_show
= cli_show_ip_rip_receive_version
,
237 .modify
= lib_interface_rip_version_receive_modify
,
241 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/version-send",
243 .cli_show
= cli_show_ip_rip_send_version
,
244 .modify
= lib_interface_rip_version_send_modify
,
248 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme",
250 .cli_show
= cli_show_ip_rip_authentication_scheme
,
254 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/mode",
256 .modify
= lib_interface_rip_authentication_scheme_mode_modify
,
260 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-scheme/md5-auth-length",
262 .destroy
= lib_interface_rip_authentication_scheme_md5_auth_length_destroy
,
263 .modify
= lib_interface_rip_authentication_scheme_md5_auth_length_modify
,
267 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-password",
269 .cli_show
= cli_show_ip_rip_authentication_string
,
270 .destroy
= lib_interface_rip_authentication_password_destroy
,
271 .modify
= lib_interface_rip_authentication_password_modify
,
275 .xpath
= "/frr-interface:lib/interface/frr-ripd:rip/authentication-key-chain",
277 .cli_show
= cli_show_ip_rip_authentication_key_chain
,
278 .destroy
= lib_interface_rip_authentication_key_chain_destroy
,
279 .modify
= lib_interface_rip_authentication_key_chain_modify
,
283 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor",
285 .get_keys
= ripd_instance_state_neighbors_neighbor_get_keys
,
286 .get_next
= ripd_instance_state_neighbors_neighbor_get_next
,
287 .lookup_entry
= ripd_instance_state_neighbors_neighbor_lookup_entry
,
291 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/address",
293 .get_elem
= ripd_instance_state_neighbors_neighbor_address_get_elem
,
297 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/last-update",
299 .get_elem
= ripd_instance_state_neighbors_neighbor_last_update_get_elem
,
303 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-packets-rcvd",
305 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem
,
309 .xpath
= "/frr-ripd:ripd/instance/state/neighbors/neighbor/bad-routes-rcvd",
311 .get_elem
= ripd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem
,
315 .xpath
= "/frr-ripd:ripd/instance/state/routes/route",
317 .get_keys
= ripd_instance_state_routes_route_get_keys
,
318 .get_next
= ripd_instance_state_routes_route_get_next
,
319 .lookup_entry
= ripd_instance_state_routes_route_lookup_entry
,
323 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/prefix",
325 .get_elem
= ripd_instance_state_routes_route_prefix_get_elem
,
329 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/next-hop",
331 .get_elem
= ripd_instance_state_routes_route_next_hop_get_elem
,
335 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/interface",
337 .get_elem
= ripd_instance_state_routes_route_interface_get_elem
,
341 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop",
343 .get_next
= ripd_instance_state_routes_route_nexthops_nexthop_get_next
,
347 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/nh-type",
349 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_nh_type_get_elem
,
353 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/protocol",
355 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_protocol_get_elem
,
359 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/rip-type",
361 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_rip_type_get_elem
,
365 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/gateway",
367 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_gateway_get_elem
,
371 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/interface",
373 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_interface_get_elem
,
377 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/from",
379 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_from_get_elem
,
383 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/tag",
385 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_tag_get_elem
,
389 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/external-metric",
391 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_external_metric_get_elem
,
395 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/nexthops/nexthop/expire-time",
397 .get_elem
= ripd_instance_state_routes_route_nexthops_nexthop_expire_time_get_elem
,
401 .xpath
= "/frr-ripd:ripd/instance/state/routes/route/metric",
403 .get_elem
= ripd_instance_state_routes_route_metric_get_elem
,
407 .xpath
= "/frr-ripd:clear-rip-route",
409 .rpc
= clear_rip_route_rpc
,