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/profile",
46 .create
= bfdd_bfd_profile_create
,
47 .destroy
= bfdd_bfd_profile_destroy
,
48 .cli_show
= bfd_cli_show_profile
,
49 .cli_show_end
= bfd_cli_show_peer_end
,
53 .xpath
= "/frr-bfdd:bfdd/bfd/profile/detection-multiplier",
55 .modify
= bfdd_bfd_profile_detection_multiplier_modify
,
56 .cli_show
= bfd_cli_show_mult
,
60 .xpath
= "/frr-bfdd:bfdd/bfd/profile/desired-transmission-interval",
62 .modify
= bfdd_bfd_profile_desired_transmission_interval_modify
,
63 .cli_show
= bfd_cli_show_tx
,
67 .xpath
= "/frr-bfdd:bfdd/bfd/profile/required-receive-interval",
69 .modify
= bfdd_bfd_profile_required_receive_interval_modify
,
70 .cli_show
= bfd_cli_show_rx
,
74 .xpath
= "/frr-bfdd:bfdd/bfd/profile/administrative-down",
76 .modify
= bfdd_bfd_profile_administrative_down_modify
,
77 .cli_show
= bfd_cli_show_shutdown
,
81 .xpath
= "/frr-bfdd:bfdd/bfd/profile/passive-mode",
83 .modify
= bfdd_bfd_profile_passive_mode_modify
,
84 .cli_show
= bfd_cli_show_passive
,
88 .xpath
= "/frr-bfdd:bfdd/bfd/profile/minimum-ttl",
90 .modify
= bfdd_bfd_profile_minimum_ttl_modify
,
91 .destroy
= bfdd_bfd_profile_minimum_ttl_destroy
,
92 .cli_show
= bfd_cli_show_minimum_ttl
,
96 .xpath
= "/frr-bfdd:bfdd/bfd/profile/echo-mode",
98 .modify
= bfdd_bfd_profile_echo_mode_modify
,
99 .cli_show
= bfd_cli_show_echo
,
103 .xpath
= "/frr-bfdd:bfdd/bfd/profile/desired-echo-transmission-interval",
105 .modify
= bfdd_bfd_profile_desired_echo_transmission_interval_modify
,
106 .cli_show
= bfd_cli_show_echo_interval
,
110 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop",
112 .create
= bfdd_bfd_sessions_single_hop_create
,
113 .destroy
= bfdd_bfd_sessions_single_hop_destroy
,
114 .get_next
= bfdd_bfd_sessions_single_hop_get_next
,
115 .get_keys
= bfdd_bfd_sessions_single_hop_get_keys
,
116 .lookup_entry
= bfdd_bfd_sessions_single_hop_lookup_entry
,
117 .cli_show
= bfd_cli_show_single_hop_peer
,
118 .cli_show_end
= bfd_cli_show_peer_end
,
122 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/source-addr",
124 .modify
= bfdd_bfd_sessions_single_hop_source_addr_modify
,
125 .destroy
= bfdd_bfd_sessions_single_hop_source_addr_destroy
,
129 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/profile",
131 .modify
= bfdd_bfd_sessions_single_hop_profile_modify
,
132 .destroy
= bfdd_bfd_sessions_single_hop_profile_destroy
,
133 .cli_show
= bfd_cli_peer_profile_show
,
137 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/detection-multiplier",
139 .modify
= bfdd_bfd_sessions_single_hop_detection_multiplier_modify
,
140 .cli_show
= bfd_cli_show_mult
,
144 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/desired-transmission-interval",
146 .modify
= bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify
,
147 .cli_show
= bfd_cli_show_tx
,
151 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/required-receive-interval",
153 .modify
= bfdd_bfd_sessions_single_hop_required_receive_interval_modify
,
154 .cli_show
= bfd_cli_show_rx
,
158 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/administrative-down",
160 .modify
= bfdd_bfd_sessions_single_hop_administrative_down_modify
,
161 .cli_show
= bfd_cli_show_shutdown
,
165 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/passive-mode",
167 .modify
= bfdd_bfd_sessions_single_hop_passive_mode_modify
,
168 .cli_show
= bfd_cli_show_passive
,
172 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/echo-mode",
174 .modify
= bfdd_bfd_sessions_single_hop_echo_mode_modify
,
175 .cli_show
= bfd_cli_show_echo
,
179 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/desired-echo-transmission-interval",
181 .modify
= bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify
,
182 .cli_show
= bfd_cli_show_echo_interval
,
186 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-discriminator",
188 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_discriminator_get_elem
,
192 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-state",
194 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_state_get_elem
,
198 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-diagnostic",
200 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_diagnostic_get_elem
,
204 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/local-multiplier",
206 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_multiplier_get_elem
,
210 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-discriminator",
212 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_discriminator_get_elem
,
216 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-state",
218 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_state_get_elem
,
222 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-diagnostic",
224 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_diagnostic_get_elem
,
228 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/remote-multiplier",
230 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_multiplier_get_elem
,
234 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/negotiated-transmission-interval",
236 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_transmission_interval_get_elem
,
240 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/negotiated-receive-interval",
242 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_receive_interval_get_elem
,
246 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/detection-mode",
248 .get_elem
= bfdd_bfd_sessions_single_hop_stats_detection_mode_get_elem
,
252 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/last-down-time",
254 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_down_time_get_elem
,
258 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/last-up-time",
260 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_up_time_get_elem
,
264 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/session-down-count",
266 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_down_count_get_elem
,
270 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/session-up-count",
272 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_up_count_get_elem
,
276 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/control-packet-input-count",
278 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_input_count_get_elem
,
282 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/control-packet-output-count",
284 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_output_count_get_elem
,
288 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/negotiated-echo-transmission-interval",
290 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_echo_transmission_interval_get_elem
,
294 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/echo-packet-input-count",
296 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_input_count_get_elem
,
300 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/single-hop/stats/echo-packet-output-count",
302 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_output_count_get_elem
,
306 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop",
308 .create
= bfdd_bfd_sessions_multi_hop_create
,
309 .destroy
= bfdd_bfd_sessions_multi_hop_destroy
,
310 .get_next
= bfdd_bfd_sessions_multi_hop_get_next
,
311 .get_keys
= bfdd_bfd_sessions_multi_hop_get_keys
,
312 .lookup_entry
= bfdd_bfd_sessions_multi_hop_lookup_entry
,
313 .cli_show
= bfd_cli_show_multi_hop_peer
,
314 .cli_show_end
= bfd_cli_show_peer_end
,
318 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/profile",
320 .modify
= bfdd_bfd_sessions_single_hop_profile_modify
,
321 .destroy
= bfdd_bfd_sessions_single_hop_profile_destroy
,
322 .cli_show
= bfd_cli_peer_profile_show
,
326 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/detection-multiplier",
328 .modify
= bfdd_bfd_sessions_single_hop_detection_multiplier_modify
,
329 .cli_show
= bfd_cli_show_mult
,
333 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/desired-transmission-interval",
335 .modify
= bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify
,
336 .cli_show
= bfd_cli_show_tx
,
340 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/required-receive-interval",
342 .modify
= bfdd_bfd_sessions_single_hop_required_receive_interval_modify
,
343 .cli_show
= bfd_cli_show_rx
,
347 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/administrative-down",
349 .modify
= bfdd_bfd_sessions_single_hop_administrative_down_modify
,
350 .cli_show
= bfd_cli_show_shutdown
,
354 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/passive-mode",
356 .modify
= bfdd_bfd_sessions_single_hop_passive_mode_modify
,
357 .cli_show
= bfd_cli_show_passive
,
361 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/minimum-ttl",
363 .modify
= bfdd_bfd_sessions_multi_hop_minimum_ttl_modify
,
364 .destroy
= bfdd_bfd_sessions_multi_hop_minimum_ttl_destroy
,
365 .cli_show
= bfd_cli_show_minimum_ttl
,
369 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-discriminator",
371 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_discriminator_get_elem
,
375 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-state",
377 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_state_get_elem
,
381 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-diagnostic",
383 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_diagnostic_get_elem
,
387 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/local-multiplier",
389 .get_elem
= bfdd_bfd_sessions_single_hop_stats_local_multiplier_get_elem
,
393 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-discriminator",
395 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_discriminator_get_elem
,
399 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-state",
401 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_state_get_elem
,
405 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-diagnostic",
407 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_diagnostic_get_elem
,
411 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/remote-multiplier",
413 .get_elem
= bfdd_bfd_sessions_single_hop_stats_remote_multiplier_get_elem
,
417 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/negotiated-transmission-interval",
419 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_transmission_interval_get_elem
,
423 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/negotiated-receive-interval",
425 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_receive_interval_get_elem
,
429 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/detection-mode",
431 .get_elem
= bfdd_bfd_sessions_single_hop_stats_detection_mode_get_elem
,
435 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/last-down-time",
437 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_down_time_get_elem
,
441 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/last-up-time",
443 .get_elem
= bfdd_bfd_sessions_single_hop_stats_last_up_time_get_elem
,
447 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/session-down-count",
449 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_down_count_get_elem
,
453 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/session-up-count",
455 .get_elem
= bfdd_bfd_sessions_single_hop_stats_session_up_count_get_elem
,
459 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/control-packet-input-count",
461 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_input_count_get_elem
,
465 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/control-packet-output-count",
467 .get_elem
= bfdd_bfd_sessions_single_hop_stats_control_packet_output_count_get_elem
,
471 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/negotiated-echo-transmission-interval",
473 .get_elem
= bfdd_bfd_sessions_single_hop_stats_negotiated_echo_transmission_interval_get_elem
,
477 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/echo-packet-input-count",
479 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_input_count_get_elem
,
483 .xpath
= "/frr-bfdd:bfdd/bfd/sessions/multi-hop/stats/echo-packet-output-count",
485 .get_elem
= bfdd_bfd_sessions_single_hop_stats_echo_packet_output_count_get_elem
,