]> git.proxmox.com Git - mirror_frr.git/blobdiff - ripd/ripd.h
zebra: Refactor kernel_rtm to be a bit smarter about how it handles options
[mirror_frr.git] / ripd / ripd.h
index 307f7934bf17f0374ef214fbf51279b718ddd019..91fab2a7a2e3d63b190b8be002db5c88f25e1393 100644 (file)
@@ -21,7 +21,6 @@
 #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
 
@@ -117,9 +111,6 @@ struct rip {
        /* RIP routing information base. */
        struct route_table *table;
 
-       /* RIP only static routing information. */
-       struct route_table *route;
-
        /* RIP neighbor. */
        struct route_table *neighbor;
 
@@ -135,9 +126,9 @@ struct rip {
        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;
@@ -156,13 +147,10 @@ struct rip {
        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 {
@@ -257,7 +245,7 @@ struct rip_interface {
        int ri_receive;
 
        /* RIPv2 broadcast mode */
-       int v2_broadcast;
+       bool v2_broadcast;
 
        /* RIPv2 authentication type. */
        int auth_type;
@@ -269,11 +257,10 @@ struct rip_interface {
        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
@@ -386,21 +373,17 @@ struct rip_offset_list {
 
 /* 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);
 
@@ -415,11 +398,14 @@ extern int rip_enable_network_delete(struct prefix *p);
 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);
@@ -432,7 +418,7 @@ extern void rip_distribute_update_interface(struct interface *);
 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);
@@ -448,6 +434,7 @@ extern void rip_distance_free(struct rip_distance *rdistance);
 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 *);
@@ -462,6 +449,10 @@ extern int rip_offset_list_apply_out(struct prefix_ipv4 *, struct interface *,
 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;
 
@@ -477,6 +468,7 @@ extern long rip_global_queries;
 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;