#ifndef _ZEBRA_RIP_H
#define _ZEBRA_RIP_H
-#include "qobj.h"
#include "hook.h"
#include "nexthop.h"
#include "rip_memory.h"
#define INADDR_RIP_GROUP 0xe0000009 /* 224.0.0.9 */
#endif
-/* RIP timers */
-#define RIP_UPDATE_TIMER_DEFAULT 30
-#define RIP_TIMEOUT_TIMER_DEFAULT 180
-#define RIP_GARBAGE_TIMER_DEFAULT 120
-
/* RIP peer timeout value. */
#define RIP_PEER_TIMER_DEFAULT 180
/* RIP routing information base. */
struct route_table *table;
- /* RIP only static routing information. */
- struct route_table *route;
-
/* RIP neighbor. */
struct route_table *neighbor;
struct thread *t_triggered_interval;
/* RIP timer values. */
- unsigned long update_time;
- unsigned long timeout_time;
- unsigned long garbage_time;
+ uint32_t update_time;
+ uint32_t timeout_time;
+ uint32_t garbage_time;
/* RIP default metric. */
uint8_t default_metric;
struct {
char *name;
struct route_map *map;
- int metric_config;
- uint32_t metric;
+ bool metric_config;
+ uint8_t metric;
} route_map[ZEBRA_ROUTE_MAX];
-
- QOBJ_FIELDS
};
-DECLARE_QOBJ_TYPE(rip)
/* RIP routing table entry which belong to rip_packet. */
struct rte {
int ri_receive;
/* RIPv2 broadcast mode */
- int v2_broadcast;
+ bool v2_broadcast;
/* RIPv2 authentication type. */
int auth_type;
char *key_chain;
/* value to use for md5->auth_len */
- uint8_t md5_auth_len;
+ int md5_auth_len;
/* Split horizon flag. */
split_horizon_policy_t split_horizon;
- split_horizon_policy_t split_horizon_default;
/* For filter type slot. */
#define RIP_FILTER_IN 0
/* Prototypes. */
extern void rip_init(void);
-extern void rip_reset(void);
extern void rip_clean(void);
extern void rip_clean_network(void);
extern void rip_interfaces_clean(void);
-extern void rip_interfaces_reset(void);
extern int rip_passive_nondefault_set(const char *ifname);
extern int rip_passive_nondefault_unset(const char *ifname);
extern void rip_passive_nondefault_clean(void);
extern void rip_if_init(void);
extern void rip_if_down_all(void);
extern void rip_route_map_init(void);
-extern void rip_route_map_reset(void);
extern void rip_zclient_init(struct thread_master *);
extern void rip_zclient_stop(void);
-extern void rip_zclient_reset(void);
extern int if_check_address(struct in_addr addr);
extern int rip_create(int socket);
extern int rip_enable_if_add(const char *ifname);
extern int rip_enable_if_delete(const char *ifname);
+extern void rip_event(enum rip_event, int);
extern void rip_ecmp_disable(void);
extern int rip_create_socket(void);
extern int rip_redistribute_check(int);
+extern void rip_redistribute_conf_update(int type);
+extern void rip_redistribute_conf_delete(int type);
extern void rip_redistribute_add(int type, int sub_type, struct prefix_ipv4 *p,
struct nexthop *nh, unsigned int metric,
unsigned char distance, route_tag_t tag);
extern void rip_if_rmap_update_interface(struct interface *);
extern int rip_show_network_config(struct vty *);
-extern int config_write_rip_redistribute(struct vty *, int);
+extern void rip_show_redistribute_config(struct vty *);
extern void rip_peer_init(void);
extern void rip_peer_update(struct sockaddr_in *, uint8_t);
extern uint8_t rip_distance_apply(struct rip_info *);
extern void rip_redistribute_clean(void);
+extern int rip_route_rte(struct rip_info *rinfo);
extern struct rip_info *rip_ecmp_add(struct rip_info *);
extern struct rip_info *rip_ecmp_replace(struct rip_info *);
extern struct rip_info *rip_ecmp_delete(struct rip_info *);
extern void rip_offset_init(void);
extern void rip_offset_clean(void);
+/* YANG notifications */
+extern void ripd_notif_send_auth_type_failure(const char *ifname);
+extern void ripd_notif_send_auth_failure(const char *ifname);
+
/* There is only one rip strucutre. */
extern struct rip *rip;
DECLARE_HOOK(rip_ifaddr_add, (struct connected * ifc), (ifc))
DECLARE_HOOK(rip_ifaddr_del, (struct connected * ifc), (ifc))
+extern struct list *peer_list;
extern struct route_table *rip_distance_table;
extern vector Vrip_passive_nondefault;