2 * BFD daemon northbound implementation.
4 * Copyright (C) 2019 Network Device Education Foundation, Inc. ("NetDEF")
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
26 #include "lib/northbound.h"
30 /* clang-format off */
31 const struct frr_yang_module_info frr_bfdd_info
= {
35 .xpath
= "/frr-bfdd:bfdd/bfd",
37 .create
= bfdd_bfd_create
,
38 .destroy
= bfdd_bfd_destroy
,
39 .cli_show
= bfd_cli_show_header
,
40 .cli_show_end
= bfd_cli_show_header_end
,
44 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop",
46 .create
= bfdd_bfd_sessions_single_hop_create
,
47 .destroy
= bfdd_bfd_sessions_single_hop_destroy
,
48 .get_next
= bfdd_bfd_sessions_single_hop_get_next
,
49 .get_keys
= bfdd_bfd_sessions_single_hop_get_keys
,
50 .lookup_entry
= bfdd_bfd_sessions_single_hop_lookup_entry
,
51 .cli_show
= bfd_cli_show_single_hop_peer
,
52 .cli_show_end
= bfd_cli_show_peer_end
,
56 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/source-addr",
58 .modify
= bfdd_bfd_sessions_single_hop_source_addr_modify
,
59 .destroy
= bfdd_bfd_sessions_single_hop_source_addr_destroy
,
63 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/detection-multiplier",
65 .modify
= bfdd_bfd_sessions_single_hop_detection_multiplier_modify
,
66 .cli_show
= bfd_cli_show_mult
,
70 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/desired-transmission-interval",
72 .modify
= bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify
,
73 .cli_show
= bfd_cli_show_tx
,
77 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/required-receive-interval",
79 .modify
= bfdd_bfd_sessions_single_hop_required_receive_interval_modify
,
80 .cli_show
= bfd_cli_show_rx
,
84 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/administrative-down",
86 .modify
= bfdd_bfd_sessions_single_hop_administrative_down_modify
,
87 .cli_show
= bfd_cli_show_shutdown
,
91 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/echo-mode",
93 .modify
= bfdd_bfd_sessions_single_hop_echo_mode_modify
,
94 .cli_show
= bfd_cli_show_echo
,
98 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/desired-echo-transmission-interval",
100 .modify
= bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify
,
101 .cli_show
= bfd_cli_show_echo_interval
,
105 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-discriminator",
107 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_discriminator_get_elem
,
111 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-state",
113 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_state_get_elem
,
117 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-diagnostic",
119 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_diagnostic_get_elem
,
123 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-multiplier",
125 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_multiplier_get_elem
,
129 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-discriminator",
131 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_discriminator_get_elem
,
135 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-state",
137 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_state_get_elem
,
141 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-diagnostic",
143 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_diagnostic_get_elem
,
147 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-multiplier",
149 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_multiplier_get_elem
,
153 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/negotiated-transmission-interval",
155 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_transmission_interval_get_elem
,
159 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/negotiated-receive-interval",
161 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_receive_interval_get_elem
,
165 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/detection-mode",
167 .get_elem
= bfdd_bfd_sessions_single_hop_stats_detection_mode_get_elem
,
171 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/last-down-time",
173 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_down_time_get_elem
,
177 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/last-up-time",
179 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_up_time_get_elem
,
183 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/session-down-count",
185 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_down_count_get_elem
,
189 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/session-up-count",
191 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_up_count_get_elem
,
195 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/control-packet-input-count",
197 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_input_count_get_elem
,
201 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/control-packet-output-count",
203 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_output_count_get_elem
,
207 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/negotiated-echo-transmission-interval",
209 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_echo_transmission_interval_get_elem
,
213 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/echo-packet-input-count",
215 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_input_count_get_elem
,
219 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/echo-packet-output-count",
221 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_output_count_get_elem
,
225 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop",
227 .create
= bfdd_bfd_sessions_multi_hop_create
,
228 .destroy
= bfdd_bfd_sessions_multi_hop_destroy
,
229 .get_next
= bfdd_bfd_sessions_multi_hop_get_next
,
230 .get_keys
= bfdd_bfd_sessions_multi_hop_get_keys
,
231 .lookup_entry
= bfdd_bfd_sessions_multi_hop_lookup_entry
,
232 .cli_show
= bfd_cli_show_multi_hop_peer
,
233 .cli_show_end
= bfd_cli_show_peer_end
,
237 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/detection-multiplier",
239 .modify
= bfdd_bfd_sessions_single_hop_detection_multiplier_modify
,
240 .cli_show
= bfd_cli_show_mult
,
244 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/desired-transmission-interval",
246 .modify
= bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify
,
247 .cli_show
= bfd_cli_show_tx
,
251 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/required-receive-interval",
253 .modify
= bfdd_bfd_sessions_single_hop_required_receive_interval_modify
,
254 .cli_show
= bfd_cli_show_rx
,
258 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/administrative-down",
260 .modify
= bfdd_bfd_sessions_single_hop_administrative_down_modify
,
261 .cli_show
= bfd_cli_show_shutdown
,
265 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-discriminator",
267 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_discriminator_get_elem
,
271 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-state",
273 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_state_get_elem
,
277 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-diagnostic",
279 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_diagnostic_get_elem
,
283 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-multiplier",
285 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_multiplier_get_elem
,
289 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-discriminator",
291 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_discriminator_get_elem
,
295 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-state",
297 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_state_get_elem
,
301 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-diagnostic",
303 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_diagnostic_get_elem
,
307 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-multiplier",
309 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_multiplier_get_elem
,
313 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/negotiated-transmission-interval",
315 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_transmission_interval_get_elem
,
319 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/negotiated-receive-interval",
321 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_receive_interval_get_elem
,
325 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/detection-mode",
327 .get_elem
= bfdd_bfd_sessions_single_hop_stats_detection_mode_get_elem
,
331 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/last-down-time",
333 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_down_time_get_elem
,
337 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/last-up-time",
339 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_up_time_get_elem
,
343 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/session-down-count",
345 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_down_count_get_elem
,
349 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/session-up-count",
351 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_up_count_get_elem
,
355 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/control-packet-input-count",
357 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_input_count_get_elem
,
361 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/control-packet-output-count",
363 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_output_count_get_elem
,
367 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/negotiated-echo-transmission-interval",
369 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_echo_transmission_interval_get_elem
,
373 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/echo-packet-input-count",
375 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_input_count_get_elem
,
379 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/echo-packet-output-count",
381 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_output_count_get_elem
,