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(struct nb_cb_create_args *args); 27 int ripd_instance_destroy(struct nb_cb_destroy_args *args); 28 const void *ripd_instance_get_next(struct nb_cb_get_next_args *args); 29 int ripd_instance_get_keys(struct nb_cb_get_keys_args *args); 30 const void *ripd_instance_lookup_entry(struct nb_cb_lookup_entry_args *args); 31 int ripd_instance_allow_ecmp_modify(struct nb_cb_modify_args *args); 32 int ripd_instance_default_information_originate_modify( 33 struct nb_cb_modify_args *args); 34 int ripd_instance_default_metric_modify(struct nb_cb_modify_args *args); 35 int ripd_instance_distance_default_modify(struct nb_cb_modify_args *args); 36 int ripd_instance_distance_source_create(struct nb_cb_create_args *args); 37 int ripd_instance_distance_source_destroy(struct nb_cb_destroy_args *args); 38 int ripd_instance_distance_source_distance_modify( 39 struct nb_cb_modify_args *args); 40 int ripd_instance_distance_source_access_list_modify( 41 struct nb_cb_modify_args *args); 42 int ripd_instance_distance_source_access_list_destroy( 43 struct nb_cb_destroy_args *args); 44 int ripd_instance_explicit_neighbor_create(struct nb_cb_create_args *args); 45 int ripd_instance_explicit_neighbor_destroy(struct nb_cb_destroy_args *args); 46 int ripd_instance_network_create(struct nb_cb_create_args *args); 47 int ripd_instance_network_destroy(struct nb_cb_destroy_args *args); 48 int ripd_instance_interface_create(struct nb_cb_create_args *args); 49 int ripd_instance_interface_destroy(struct nb_cb_destroy_args *args); 50 int ripd_instance_offset_list_create(struct nb_cb_create_args *args); 51 int ripd_instance_offset_list_destroy(struct nb_cb_destroy_args *args); 52 int ripd_instance_offset_list_access_list_modify( 53 struct nb_cb_modify_args *args); 54 int ripd_instance_offset_list_metric_modify(struct nb_cb_modify_args *args); 55 int ripd_instance_passive_default_modify(struct nb_cb_modify_args *args); 56 int ripd_instance_passive_interface_create(struct nb_cb_create_args *args); 57 int ripd_instance_passive_interface_destroy(struct nb_cb_destroy_args *args); 58 int ripd_instance_non_passive_interface_create(struct nb_cb_create_args *args); 59 int ripd_instance_non_passive_interface_destroy( 60 struct nb_cb_destroy_args *args); 61 int ripd_instance_redistribute_create(struct nb_cb_create_args *args); 62 int ripd_instance_redistribute_destroy(struct nb_cb_destroy_args *args); 63 int ripd_instance_redistribute_route_map_modify(struct nb_cb_modify_args *args); 64 int ripd_instance_redistribute_route_map_destroy( 65 struct nb_cb_destroy_args *args); 66 int ripd_instance_redistribute_metric_modify(struct nb_cb_modify_args *args); 67 int ripd_instance_redistribute_metric_destroy(struct nb_cb_destroy_args *args); 68 int ripd_instance_static_route_create(struct nb_cb_create_args *args); 69 int ripd_instance_static_route_destroy(struct nb_cb_destroy_args *args); 70 int ripd_instance_timers_flush_interval_modify(struct nb_cb_modify_args *args); 71 int ripd_instance_timers_holddown_interval_modify( 72 struct nb_cb_modify_args *args); 73 int ripd_instance_timers_update_interval_modify(struct nb_cb_modify_args *args); 74 int ripd_instance_version_receive_modify(struct nb_cb_modify_args *args); 75 int ripd_instance_version_send_modify(struct nb_cb_modify_args *args); 76 const void *ripd_instance_state_neighbors_neighbor_get_next( 77 struct nb_cb_get_next_args *args); 78 int ripd_instance_state_neighbors_neighbor_get_keys( 79 struct nb_cb_get_keys_args *args); 80 const void *ripd_instance_state_neighbors_neighbor_lookup_entry( 81 struct nb_cb_lookup_entry_args *args); 82 struct yang_data *ripd_instance_state_neighbors_neighbor_address_get_elem( 83 struct nb_cb_get_elem_args *args); 84 struct yang_data *ripd_instance_state_neighbors_neighbor_last_update_get_elem( 85 struct nb_cb_get_elem_args *args); 86 struct yang_data * 87 ripd_instance_state_neighbors_neighbor_bad_packets_rcvd_get_elem( 88 struct nb_cb_get_elem_args *args); 89 struct yang_data * 90 ripd_instance_state_neighbors_neighbor_bad_routes_rcvd_get_elem( 91 struct nb_cb_get_elem_args *args); 92 const void * 93 ripd_instance_state_routes_route_get_next(struct nb_cb_get_next_args *args); 94 int ripd_instance_state_routes_route_get_keys(struct nb_cb_get_keys_args *args); 95 const void *ripd_instance_state_routes_route_lookup_entry( 96 struct nb_cb_lookup_entry_args *args); 97 struct yang_data *ripd_instance_state_routes_route_prefix_get_elem( 98 struct nb_cb_get_elem_args *args); 99 struct yang_data *ripd_instance_state_routes_route_next_hop_get_elem( 100 struct nb_cb_get_elem_args *args); 101 struct yang_data *ripd_instance_state_routes_route_interface_get_elem( 102 struct nb_cb_get_elem_args *args); 103 struct yang_data *ripd_instance_state_routes_route_metric_get_elem( 104 struct nb_cb_get_elem_args *args); 105 int clear_rip_route_rpc(struct nb_cb_rpc_args *args); 106 int lib_interface_rip_split_horizon_modify(struct nb_cb_modify_args *args); 107 int lib_interface_rip_v2_broadcast_modify(struct nb_cb_modify_args *args); 108 int lib_interface_rip_version_receive_modify(struct nb_cb_modify_args *args); 109 int lib_interface_rip_version_send_modify(struct nb_cb_modify_args *args); 110 int lib_interface_rip_authentication_scheme_mode_modify( 111 struct nb_cb_modify_args *args); 112 int lib_interface_rip_authentication_scheme_md5_auth_length_modify( 113 struct nb_cb_modify_args *args); 114 int lib_interface_rip_authentication_scheme_md5_auth_length_destroy( 115 struct nb_cb_destroy_args *args); 116 int lib_interface_rip_authentication_password_modify( 117 struct nb_cb_modify_args *args); 118 int lib_interface_rip_authentication_password_destroy( 119 struct nb_cb_destroy_args *args); 120 int lib_interface_rip_authentication_key_chain_modify( 121 struct nb_cb_modify_args *args); 122 int lib_interface_rip_authentication_key_chain_destroy( 123 struct nb_cb_destroy_args *args); 124 125 /* Optional 'apply_finish' callbacks. */ 126 void ripd_instance_redistribute_apply_finish( 127 struct nb_cb_apply_finish_args *args); 128 void ripd_instance_timers_apply_finish(struct nb_cb_apply_finish_args *args); 129 130 /* Optional 'cli_show' callbacks. */ 131 void cli_show_router_rip(struct vty *vty, struct lyd_node *dnode, 132 bool show_defaults); 133 void cli_show_rip_allow_ecmp(struct vty *vty, struct lyd_node *dnode, 134 bool show_defaults); 135 void cli_show_rip_default_information_originate(struct vty *vty, 136 struct lyd_node *dnode, 137 bool show_defaults); 138 void cli_show_rip_default_metric(struct vty *vty, struct lyd_node *dnode, 139 bool show_defaults); 140 void cli_show_rip_distance(struct vty *vty, struct lyd_node *dnode, 141 bool show_defaults); 142 void cli_show_rip_distance_source(struct vty *vty, struct lyd_node *dnode, 143 bool show_defaults); 144 void cli_show_rip_neighbor(struct vty *vty, struct lyd_node *dnode, 145 bool show_defaults); 146 void cli_show_rip_network_prefix(struct vty *vty, struct lyd_node *dnode, 147 bool show_defaults); 148 void cli_show_rip_network_interface(struct vty *vty, struct lyd_node *dnode, 149 bool show_defaults); 150 void cli_show_rip_offset_list(struct vty *vty, struct lyd_node *dnode, 151 bool show_defaults); 152 void cli_show_rip_passive_default(struct vty *vty, struct lyd_node *dnode, 153 bool show_defaults); 154 void cli_show_rip_passive_interface(struct vty *vty, struct lyd_node *dnode, 155 bool show_defaults); 156 void cli_show_rip_non_passive_interface(struct vty *vty, struct lyd_node *dnode, 157 bool show_defaults); 158 void cli_show_rip_redistribute(struct vty *vty, struct lyd_node *dnode, 159 bool show_defaults); 160 void cli_show_rip_route(struct vty *vty, struct lyd_node *dnode, 161 bool show_defaults); 162 void cli_show_rip_timers(struct vty *vty, struct lyd_node *dnode, 163 bool show_defaults); 164 void cli_show_rip_version(struct vty *vty, struct lyd_node *dnode, 165 bool show_defaults); 166 void cli_show_ip_rip_split_horizon(struct vty *vty, struct lyd_node *dnode, 167 bool show_defaults); 168 void cli_show_ip_rip_v2_broadcast(struct vty *vty, struct lyd_node *dnode, 169 bool show_defaults); 170 void cli_show_ip_rip_receive_version(struct vty *vty, struct lyd_node *dnode, 171 bool show_defaults); 172 void cli_show_ip_rip_send_version(struct vty *vty, struct lyd_node *dnode, 173 bool show_defaults); 174 void cli_show_ip_rip_authentication_scheme(struct vty *vty, 175 struct lyd_node *dnode, 176 bool show_defaults); 177 void cli_show_ip_rip_authentication_string(struct vty *vty, 178 struct lyd_node *dnode, 179 bool show_defaults); 180 void cli_show_ip_rip_authentication_key_chain(struct vty *vty, 181 struct lyd_node *dnode, 182 bool show_defaults); 183 184 /* Notifications. */ 185 extern void ripd_notif_send_auth_type_failure(const char *ifname); 186 extern void ripd_notif_send_auth_failure(const char *ifname); 187 188 #endif /* _FRR_RIP_NB_H_ */ 189