1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * BFD daemon northbound implementation.
5 * Copyright (C) 2019 Network Device Education Foundation, Inc. ("NetDEF")
9 #ifndef _FRR_BFDD_NB_H_
10 #define _FRR_BFDD_NB_H_
12 extern const struct frr_yang_module_info frr_bfdd_info
;
14 /* Mandatory callbacks. */
15 int bfdd_bfd_create(struct nb_cb_create_args
*args
);
16 int bfdd_bfd_destroy(struct nb_cb_destroy_args
*args
);
17 int bfdd_bfd_profile_create(struct nb_cb_create_args
*args
);
18 int bfdd_bfd_profile_destroy(struct nb_cb_destroy_args
*args
);
19 int bfdd_bfd_profile_detection_multiplier_modify(
20 struct nb_cb_modify_args
*args
);
21 int bfdd_bfd_profile_desired_transmission_interval_modify(
22 struct nb_cb_modify_args
*args
);
23 int bfdd_bfd_profile_required_receive_interval_modify(
24 struct nb_cb_modify_args
*args
);
25 int bfdd_bfd_profile_administrative_down_modify(struct nb_cb_modify_args
*args
);
26 int bfdd_bfd_profile_passive_mode_modify(struct nb_cb_modify_args
*args
);
27 int bfdd_bfd_profile_minimum_ttl_modify(struct nb_cb_modify_args
*args
);
28 int bfdd_bfd_profile_minimum_ttl_destroy(struct nb_cb_destroy_args
*args
);
29 int bfdd_bfd_profile_echo_mode_modify(struct nb_cb_modify_args
*args
);
30 int bfdd_bfd_profile_desired_echo_transmission_interval_modify(
31 struct nb_cb_modify_args
*args
);
32 int bfdd_bfd_profile_required_echo_receive_interval_modify(
33 struct nb_cb_modify_args
*args
);
34 int bfdd_bfd_sessions_single_hop_create(struct nb_cb_create_args
*args
);
35 int bfdd_bfd_sessions_single_hop_destroy(struct nb_cb_destroy_args
*args
);
37 bfdd_bfd_sessions_single_hop_get_next(struct nb_cb_get_next_args
*args
);
38 int bfdd_bfd_sessions_single_hop_get_keys(struct nb_cb_get_keys_args
*args
);
40 bfdd_bfd_sessions_single_hop_lookup_entry(struct nb_cb_lookup_entry_args
*args
);
41 int bfdd_bfd_sessions_single_hop_source_addr_modify(
42 struct nb_cb_modify_args
*args
);
43 int bfdd_bfd_sessions_single_hop_source_addr_destroy(
44 struct nb_cb_destroy_args
*args
);
45 int bfdd_bfd_sessions_single_hop_profile_modify(struct nb_cb_modify_args
*args
);
46 int bfdd_bfd_sessions_single_hop_profile_destroy(
47 struct nb_cb_destroy_args
*args
);
48 int bfdd_bfd_sessions_single_hop_detection_multiplier_modify(
49 struct nb_cb_modify_args
*args
);
50 int bfdd_bfd_sessions_single_hop_desired_transmission_interval_modify(
51 struct nb_cb_modify_args
*args
);
52 int bfdd_bfd_sessions_single_hop_required_receive_interval_modify(
53 struct nb_cb_modify_args
*args
);
54 int bfdd_bfd_sessions_single_hop_administrative_down_modify(
55 struct nb_cb_modify_args
*args
);
56 int bfdd_bfd_sessions_single_hop_passive_mode_modify(
57 struct nb_cb_modify_args
*args
);
58 int bfdd_bfd_sessions_single_hop_echo_mode_modify(
59 struct nb_cb_modify_args
*args
);
60 int bfdd_bfd_sessions_single_hop_desired_echo_transmission_interval_modify(
61 struct nb_cb_modify_args
*args
);
62 int bfdd_bfd_sessions_single_hop_required_echo_receive_interval_modify(
63 struct nb_cb_modify_args
*args
);
65 bfdd_bfd_sessions_single_hop_stats_local_discriminator_get_elem(
66 struct nb_cb_get_elem_args
*args
);
67 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_local_state_get_elem(
68 struct nb_cb_get_elem_args
*args
);
69 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_local_diagnostic_get_elem(
70 struct nb_cb_get_elem_args
*args
);
71 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_local_multiplier_get_elem(
72 struct nb_cb_get_elem_args
*args
);
74 bfdd_bfd_sessions_single_hop_stats_remote_discriminator_get_elem(
75 struct nb_cb_get_elem_args
*args
);
76 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_remote_state_get_elem(
77 struct nb_cb_get_elem_args
*args
);
78 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_remote_diagnostic_get_elem(
79 struct nb_cb_get_elem_args
*args
);
80 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_remote_multiplier_get_elem(
81 struct nb_cb_get_elem_args
*args
);
83 bfdd_bfd_sessions_single_hop_stats_negotiated_transmission_interval_get_elem(
84 struct nb_cb_get_elem_args
*args
);
86 bfdd_bfd_sessions_single_hop_stats_negotiated_receive_interval_get_elem(
87 struct nb_cb_get_elem_args
*args
);
88 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_detection_mode_get_elem(
89 struct nb_cb_get_elem_args
*args
);
90 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_last_down_time_get_elem(
91 struct nb_cb_get_elem_args
*args
);
92 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_last_up_time_get_elem(
93 struct nb_cb_get_elem_args
*args
);
95 bfdd_bfd_sessions_single_hop_stats_session_down_count_get_elem(
96 struct nb_cb_get_elem_args
*args
);
97 struct yang_data
*bfdd_bfd_sessions_single_hop_stats_session_up_count_get_elem(
98 struct nb_cb_get_elem_args
*args
);
100 bfdd_bfd_sessions_single_hop_stats_control_packet_input_count_get_elem(
101 struct nb_cb_get_elem_args
*args
);
103 bfdd_bfd_sessions_single_hop_stats_control_packet_output_count_get_elem(
104 struct nb_cb_get_elem_args
*args
);
106 bfdd_bfd_sessions_single_hop_stats_negotiated_echo_transmission_interval_get_elem(
107 struct nb_cb_get_elem_args
*args
);
109 bfdd_bfd_sessions_single_hop_stats_echo_packet_input_count_get_elem(
110 struct nb_cb_get_elem_args
*args
);
112 bfdd_bfd_sessions_single_hop_stats_echo_packet_output_count_get_elem(
113 struct nb_cb_get_elem_args
*args
);
114 int bfdd_bfd_sessions_multi_hop_create(struct nb_cb_create_args
*args
);
115 int bfdd_bfd_sessions_multi_hop_destroy(struct nb_cb_destroy_args
*args
);
117 bfdd_bfd_sessions_multi_hop_get_next(struct nb_cb_get_next_args
*args
);
118 int bfdd_bfd_sessions_multi_hop_get_keys(struct nb_cb_get_keys_args
*args
);
120 bfdd_bfd_sessions_multi_hop_lookup_entry(struct nb_cb_lookup_entry_args
*args
);
121 int bfdd_bfd_sessions_multi_hop_detection_multiplier_modify(
122 struct nb_cb_modify_args
*args
);
123 int bfdd_bfd_sessions_multi_hop_desired_transmission_interval_modify(
124 struct nb_cb_modify_args
*args
);
125 int bfdd_bfd_sessions_multi_hop_required_receive_interval_modify(
126 struct nb_cb_modify_args
*args
);
127 int bfdd_bfd_sessions_multi_hop_administrative_down_modify(
128 struct nb_cb_modify_args
*args
);
129 int bfdd_bfd_sessions_multi_hop_minimum_ttl_modify(
130 struct nb_cb_modify_args
*args
);
131 int bfdd_bfd_sessions_multi_hop_minimum_ttl_destroy(
132 struct nb_cb_destroy_args
*args
);
134 bfdd_bfd_sessions_multi_hop_stats_local_discriminator_get_elem(
135 struct nb_cb_get_elem_args
*args
);
136 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_local_state_get_elem(
137 struct nb_cb_get_elem_args
*args
);
138 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_local_diagnostic_get_elem(
139 struct nb_cb_get_elem_args
*args
);
140 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_local_multiplier_get_elem(
141 struct nb_cb_get_elem_args
*args
);
143 bfdd_bfd_sessions_multi_hop_stats_remote_discriminator_get_elem(
144 struct nb_cb_get_elem_args
*args
);
145 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_remote_state_get_elem(
146 struct nb_cb_get_elem_args
*args
);
147 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_remote_diagnostic_get_elem(
148 struct nb_cb_get_elem_args
*args
);
149 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_remote_multiplier_get_elem(
150 struct nb_cb_get_elem_args
*args
);
152 bfdd_bfd_sessions_multi_hop_stats_negotiated_transmission_interval_get_elem(
153 struct nb_cb_get_elem_args
*args
);
155 bfdd_bfd_sessions_multi_hop_stats_negotiated_receive_interval_get_elem(
156 struct nb_cb_get_elem_args
*args
);
157 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_detection_mode_get_elem(
158 struct nb_cb_get_elem_args
*args
);
159 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_last_down_time_get_elem(
160 struct nb_cb_get_elem_args
*args
);
161 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_last_up_time_get_elem(
162 struct nb_cb_get_elem_args
*args
);
163 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_session_down_count_get_elem(
164 struct nb_cb_get_elem_args
*args
);
165 struct yang_data
*bfdd_bfd_sessions_multi_hop_stats_session_up_count_get_elem(
166 struct nb_cb_get_elem_args
*args
);
168 bfdd_bfd_sessions_multi_hop_stats_control_packet_input_count_get_elem(
169 struct nb_cb_get_elem_args
*args
);
171 bfdd_bfd_sessions_multi_hop_stats_control_packet_output_count_get_elem(
172 struct nb_cb_get_elem_args
*args
);
174 bfdd_bfd_sessions_multi_hop_stats_negotiated_echo_transmission_interval_get_elem(
175 struct nb_cb_get_elem_args
*args
);
177 bfdd_bfd_sessions_multi_hop_stats_echo_packet_input_count_get_elem(
178 struct nb_cb_get_elem_args
*args
);
180 bfdd_bfd_sessions_multi_hop_stats_echo_packet_output_count_get_elem(
181 struct nb_cb_get_elem_args
*args
);
183 /* Optional 'cli_show' callbacks. */
184 void bfd_cli_show_header(struct vty
*vty
, const struct lyd_node
*dnode
,
186 void bfd_cli_show_header_end(struct vty
*vty
, const struct lyd_node
*dnode
);
187 void bfd_cli_show_single_hop_peer(struct vty
*vty
, const struct lyd_node
*dnode
,
189 void bfd_cli_show_multi_hop_peer(struct vty
*vty
, const struct lyd_node
*dnode
,
191 void bfd_cli_show_peer_end(struct vty
*vty
, const struct lyd_node
*dnode
);
192 void bfd_cli_show_mult(struct vty
*vty
, const struct lyd_node
*dnode
,
194 void bfd_cli_show_tx(struct vty
*vty
, const struct lyd_node
*dnode
,
196 void bfd_cli_show_rx(struct vty
*vty
, const struct lyd_node
*dnode
,
198 void bfd_cli_show_shutdown(struct vty
*vty
, const struct lyd_node
*dnode
,
200 void bfd_cli_show_echo(struct vty
*vty
, const struct lyd_node
*dnode
,
202 void bfd_cli_show_desired_echo_transmission_interval(
203 struct vty
*vty
, const struct lyd_node
*dnode
, bool show_defaults
);
204 void bfd_cli_show_required_echo_receive_interval(struct vty
*vty
,
205 const struct lyd_node
*dnode
,
207 void bfd_cli_show_profile(struct vty
*vty
, const struct lyd_node
*dnode
,
209 void bfd_cli_peer_profile_show(struct vty
*vty
, const struct lyd_node
*dnode
,
211 void bfd_cli_show_passive(struct vty
*vty
, const struct lyd_node
*dnode
,
213 void bfd_cli_show_minimum_ttl(struct vty
*vty
, const struct lyd_node
*dnode
,
216 #endif /* _FRR_BFDD_NB_H_ */