]> git.proxmox.com Git - mirror_frr.git/blob - ripd/rip_nb.h
Merge pull request #5288 from SumitAgarwal123/bfd_docs
[mirror_frr.git] / ripd / rip_nb.h
1 /*
2 * Copyright (C) 2018 NetDEF, Inc.
3 * Renato Westphal
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the Free
7 * Software Foundation; either version 2 of the License, or (at your option)
8 * any later version.
9 *
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; see the file COPYING; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20 #ifndef _FRR_RIP_NB_H_
21 #define _FRR_RIP_NB_H_
22
23 extern const struct frr_yang_module_info frr_ripd_info;
24
25 /* Mandatory callbacks. */
26 int ripd_instance_create(enum nb_event event, const struct lyd_node *dnode,
27 union nb_resource *resource);
28 int ripd_instance_destroy(enum nb_event event, const struct lyd_node *dnode);
29 const void *ripd_instance_get_next(const void *parent_list_entry,
30 const void *list_entry);
31 int ripd_instance_get_keys(const void *list_entry, struct yang_list_keys *keys);
32 const void *ripd_instance_lookup_entry(const void *parent_list_entry,
33 const struct yang_list_keys *keys);
34 int ripd_instance_allow_ecmp_modify(enum nb_event event,
35 const struct lyd_node *dnode,
36 union nb_resource *resource);
37 int ripd_instance_default_information_originate_modify(
38 enum nb_event event, const struct lyd_node *dnode,
39 union nb_resource *resource);
40 int ripd_instance_default_metric_modify(enum nb_event event,
41 const struct lyd_node *dnode,
42 union nb_resource *resource);
43 int ripd_instance_distance_default_modify(enum nb_event event,
44 const struct lyd_node *dnode,
45 union nb_resource *resource);
46 int ripd_instance_distance_source_create(enum nb_event event,
47 const struct lyd_node *dnode,
48 union nb_resource *resource);
49 int ripd_instance_distance_source_destroy(enum nb_event event,
50 const struct lyd_node *dnode);
51 int ripd_instance_distance_source_distance_modify(enum nb_event event,
52 const struct lyd_node *dnode,
53 union nb_resource *resource);
54 int ripd_instance_distance_source_access_list_modify(
55 enum nb_event event, const struct lyd_node *dnode,
56 union nb_resource *resource);
57 int ripd_instance_distance_source_access_list_destroy(
58 enum nb_event event, const struct lyd_node *dnode);
59 int ripd_instance_explicit_neighbor_create(enum nb_event event,
60 const struct lyd_node *dnode,
61 union nb_resource *resource);
62 int ripd_instance_explicit_neighbor_destroy(enum nb_event event,
63 const struct lyd_node *dnode);
64 int ripd_instance_network_create(enum nb_event event,
65 const struct lyd_node *dnode,
66 union nb_resource *resource);
67 int ripd_instance_network_destroy(enum nb_event event,
68 const struct lyd_node *dnode);
69 int ripd_instance_interface_create(enum nb_event event,
70 const struct lyd_node *dnode,
71 union nb_resource *resource);
72 int ripd_instance_interface_destroy(enum nb_event event,
73 const struct lyd_node *dnode);
74 int ripd_instance_offset_list_create(enum nb_event event,
75 const struct lyd_node *dnode,
76 union nb_resource *resource);
77 int ripd_instance_offset_list_destroy(enum nb_event event,
78 const struct lyd_node *dnode);
79 int ripd_instance_offset_list_access_list_modify(enum nb_event event,
80 const struct lyd_node *dnode,
81 union nb_resource *resource);
82 int ripd_instance_offset_list_metric_modify(enum nb_event event,
83 const struct lyd_node *dnode,
84 union nb_resource *resource);
85 int ripd_instance_passive_default_modify(enum nb_event event,
86 const struct lyd_node *dnode,
87 union nb_resource *resource);
88 int ripd_instance_passive_interface_create(enum nb_event event,
89 const struct lyd_node *dnode,
90 union nb_resource *resource);
91 int ripd_instance_passive_interface_destroy(enum nb_event event,
92 const struct lyd_node *dnode);
93 int ripd_instance_non_passive_interface_create(enum nb_event event,
94 const struct lyd_node *dnode,
95 union nb_resource *resource);
96 int ripd_instance_non_passive_interface_destroy(enum nb_event event,
97 const struct lyd_node *dnode);
98 int ripd_instance_redistribute_create(enum nb_event event,
99 const struct lyd_node *dnode,
100 union nb_resource *resource);
101 int ripd_instance_redistribute_destroy(enum nb_event event,
102 const struct lyd_node *dnode);
103 int ripd_instance_redistribute_route_map_modify(enum nb_event event,
104 const struct lyd_node *dnode,
105 union nb_resource *resource);
106 int ripd_instance_redistribute_route_map_destroy(enum nb_event event,
107 const struct lyd_node *dnode);
108 int ripd_instance_redistribute_metric_modify(enum nb_event event,
109 const struct lyd_node *dnode,
110 union nb_resource *resource);
111 int ripd_instance_redistribute_metric_destroy(enum nb_event event,
112 const struct lyd_node *dnode);
113 int ripd_instance_static_route_create(enum nb_event event,
114 const struct lyd_node *dnode,
115 union nb_resource *resource);
116 int ripd_instance_static_route_destroy(enum nb_event event,
117 const struct lyd_node *dnode);
118 int ripd_instance_timers_flush_interval_modify(enum nb_event event,
119 const struct lyd_node *dnode,
120 union nb_resource *resource);
121 int ripd_instance_timers_holddown_interval_modify(enum nb_event event,
122 const struct lyd_node *dnode,
123 union nb_resource *resource);
124 int ripd_instance_timers_update_interval_modify(enum nb_event event,
125 const struct lyd_node *dnode,
126 union nb_resource *resource);
127 int ripd_instance_version_receive_modify(enum nb_event event,
128 const struct lyd_node *dnode,
129 union nb_resource *resource);
130 int ripd_instance_version_send_modify(enum nb_event event,
131 const struct lyd_node *dnode,
132 union nb_resource *resource);
133 const void *
134 ripd_instance_state_neighbors_neighbor_get_next(const void *parent_list_entry,
135 const void *list_entry);
136 int ripd_instance_state_neighbors_neighbor_get_keys(
137 const void *list_entry, struct yang_list_keys *keys);
138 const void *ripd_instance_state_neighbors_neighbor_lookup_entry(
139 const void *parent_list_entry, const struct yang_list_keys *keys);
140 struct yang_data *
141 ripd_instance_state_neighbors_neighbor_address_get_elem(const char *xpath,
142 const void *list_entry);
143 struct yang_data *ripd_instance_state_neighbors_neighbor_last_update_get_elem(
144 const char *xpath, const void *list_entry);
145 struct yang_data *
146 ripd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem(
147 const char *xpath, const void *list_entry);
148 struct yang_data *
149 ripd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem(
150 const char *xpath, const void *list_entry);
151 const void *
152 ripd_instance_state_routes_route_get_next(const void *parent_list_entry,
153 const void *list_entry);
154 int ripd_instance_state_routes_route_get_keys(const void *list_entry,
155 struct yang_list_keys *keys);
156 const void *ripd_instance_state_routes_route_lookup_entry(
157 const void *parent_list_entry, const struct yang_list_keys *keys);
158 struct yang_data *
159 ripd_instance_state_routes_route_prefix_get_elem(const char *xpath,
160 const void *list_entry);
161 struct yang_data *
162 ripd_instance_state_routes_route_next_hop_get_elem(const char *xpath,
163 const void *list_entry);
164 struct yang_data *
165 ripd_instance_state_routes_route_interface_get_elem(const char *xpath,
166 const void *list_entry);
167 struct yang_data *
168 ripd_instance_state_routes_route_metric_get_elem(const char *xpath,
169 const void *list_entry);
170 int clear_rip_route_rpc(const char *xpath, const struct list *input,
171 struct list *output);
172 int lib_interface_rip_split_horizon_modify(enum nb_event event,
173 const struct lyd_node *dnode,
174 union nb_resource *resource);
175 int lib_interface_rip_v2_broadcast_modify(enum nb_event event,
176 const struct lyd_node *dnode,
177 union nb_resource *resource);
178 int lib_interface_rip_version_receive_modify(enum nb_event event,
179 const struct lyd_node *dnode,
180 union nb_resource *resource);
181 int lib_interface_rip_version_send_modify(enum nb_event event,
182 const struct lyd_node *dnode,
183 union nb_resource *resource);
184 int lib_interface_rip_authentication_scheme_mode_modify(
185 enum nb_event event, const struct lyd_node *dnode,
186 union nb_resource *resource);
187 int lib_interface_rip_authentication_scheme_md5_auth_length_modify(
188 enum nb_event event, const struct lyd_node *dnode,
189 union nb_resource *resource);
190 int lib_interface_rip_authentication_scheme_md5_auth_length_destroy(
191 enum nb_event event, const struct lyd_node *dnode);
192 int lib_interface_rip_authentication_password_modify(
193 enum nb_event event, const struct lyd_node *dnode,
194 union nb_resource *resource);
195 int lib_interface_rip_authentication_password_destroy(
196 enum nb_event event, const struct lyd_node *dnode);
197 int lib_interface_rip_authentication_key_chain_modify(
198 enum nb_event event, const struct lyd_node *dnode,
199 union nb_resource *resource);
200 int lib_interface_rip_authentication_key_chain_destroy(
201 enum nb_event event, const struct lyd_node *dnode);
202
203 /* Optional 'apply_finish' callbacks. */
204 void ripd_instance_redistribute_apply_finish(const struct lyd_node *dnode);
205 void ripd_instance_timers_apply_finish(const struct lyd_node *dnode);
206
207 /* Optional 'cli_show' callbacks. */
208 void cli_show_router_rip(struct vty *vty, struct lyd_node *dnode,
209 bool show_defaults);
210 void cli_show_rip_allow_ecmp(struct vty *vty, struct lyd_node *dnode,
211 bool show_defaults);
212 void cli_show_rip_default_information_originate(struct vty *vty,
213 struct lyd_node *dnode,
214 bool show_defaults);
215 void cli_show_rip_default_metric(struct vty *vty, struct lyd_node *dnode,
216 bool show_defaults);
217 void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode,
218 bool show_defaults);
219 void cli_show_rip_distance_source(struct vty *vty, struct lyd_node *dnode,
220 bool show_defaults);
221 void cli_show_rip_neighbor(struct vty *vty, struct lyd_node *dnode,
222 bool show_defaults);
223 void cli_show_rip_network_prefix(struct vty *vty, struct lyd_node *dnode,
224 bool show_defaults);
225 void cli_show_rip_network_interface(struct vty *vty, struct lyd_node *dnode,
226 bool show_defaults);
227 void cli_show_rip_offset_list(struct vty *vty, struct lyd_node *dnode,
228 bool show_defaults);
229 void cli_show_rip_passive_default(struct vty *vty, struct lyd_node *dnode,
230 bool show_defaults);
231 void cli_show_rip_passive_interface(struct vty *vty, struct lyd_node *dnode,
232 bool show_defaults);
233 void cli_show_rip_non_passive_interface(struct vty *vty, struct lyd_node *dnode,
234 bool show_defaults);
235 void cli_show_rip_redistribute(struct vty *vty, struct lyd_node *dnode,
236 bool show_defaults);
237 void cli_show_rip_route(struct vty *vty, struct lyd_node *dnode,
238 bool show_defaults);
239 void cli_show_rip_timers(struct vty *vty, struct lyd_node *dnode,
240 bool show_defaults);
241 void cli_show_rip_version(struct vty *vty, struct lyd_node *dnode,
242 bool show_defaults);
243 void cli_show_ip_rip_split_horizon(struct vty *vty, struct lyd_node *dnode,
244 bool show_defaults);
245 void cli_show_ip_rip_v2_broadcast(struct vty *vty, struct lyd_node *dnode,
246 bool show_defaults);
247 void cli_show_ip_rip_receive_version(struct vty *vty, struct lyd_node *dnode,
248 bool show_defaults);
249 void cli_show_ip_rip_send_version(struct vty *vty, struct lyd_node *dnode,
250 bool show_defaults);
251 void cli_show_ip_rip_authentication_scheme(struct vty *vty,
252 struct lyd_node *dnode,
253 bool show_defaults);
254 void cli_show_ip_rip_authentication_string(struct vty *vty,
255 struct lyd_node *dnode,
256 bool show_defaults);
257 void cli_show_ip_rip_authentication_key_chain(struct vty *vty,
258 struct lyd_node *dnode,
259 bool show_defaults);
260
261 /* Notifications. */
262 extern void ripd_notif_send_auth_type_failure(const char *ifname);
263 extern void ripd_notif_send_auth_failure(const char *ifname);
264
265 #endif /* _FRR_RIP_NB_H_ */