]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/pim_instance.h
Merge pull request #5430 from taruta811/build-docker-centos
[mirror_frr.git] / pimd / pim_instance.h
index 5422e8fe0d5d70ff87de3b2dc56c3f16acb0bdad..dd3ac8fcb07bfcb6c1759cdf40158d93b7eba041 100644 (file)
 #ifndef __PIM_INSTANCE_H__
 #define __PIM_INSTANCE_H__
 
+#include <mlag.h>
+
 #include "pim_str.h"
 #include "pim_msdp.h"
+#include "pim_assert.h"
+#include "pim_bsm.h"
+#include "pim_vxlan_instance.h"
 
 #if defined(HAVE_LINUX_MROUTE_H)
 #include <linux/mroute.h>
 #define MAXVIFS (256)
 #endif
 #endif
-extern struct pim_instance *pimg; // Pim Global Instance
 
 enum pim_spt_switchover {
        PIM_SPT_IMMEDIATE,
        PIM_SPT_INFINITY,
 };
 
+struct pim_router {
+       struct thread_master *master;
+
+       uint32_t debugs;
+
+       int t_periodic;
+       struct pim_assert_metric infinite_assert_metric;
+       long rpf_cache_refresh_delay_msec;
+       int32_t register_suppress_time;
+       int packet_process;
+       int32_t register_probe_time;
+
+       /*
+        * What is the default vrf that we work in
+        */
+       vrf_id_t vrf_id;
+
+       enum mlag_role role;
+       uint32_t pim_mlag_intf_cnt;
+       /* if true we have registered with MLAG */
+       bool mlag_process_register;
+       /* if true local MLAG process reported that it is connected
+        * with the peer MLAG process
+        */
+       bool connected_to_mlag;
+       /* Holds the client data(unencoded) that need to be pushed to MCLAGD*/
+       struct stream_fifo *mlag_fifo;
+       struct stream *mlag_stream;
+       struct thread *zpthread_mlag_write;
+};
+
 /* Per VRF PIM DB */
 struct pim_instance {
        vrf_id_t vrf_id;
@@ -88,12 +123,36 @@ struct pim_instance {
        struct hash *channel_oil_hash;
 
        struct pim_msdp msdp;
+       struct pim_vxlan_instance vxlan;
 
        struct list *ssmpingd_list;
        struct in_addr ssmpingd_group_addr;
 
        unsigned int keep_alive_time;
        unsigned int rp_keep_alive_time;
+
+       bool ecmp_enable;
+       bool ecmp_rebalance_enable;
+       /* No. of Dual active I/fs in pim_instance */
+       uint32_t inst_mlag_intf_cnt;
+
+       /* Bsm related */
+       struct bsm_scope global_scope;
+       uint64_t bsm_rcvd;
+       uint64_t bsm_sent;
+       uint64_t bsm_dropped;
+
+       /* If we need to rescan all our upstreams */
+       struct thread *rpf_cache_refresher;
+       int64_t rpf_cache_refresh_requests;
+       int64_t rpf_cache_refresh_events;
+       int64_t rpf_cache_refresh_last;
+       int64_t scan_oil_events;
+       int64_t scan_oil_last;
+
+       int64_t nexthop_lookups;
+       int64_t nexthop_lookups_avoided;
+       int64_t last_route_change_time;
 };
 
 void pim_vrf_init(void);