diff options
Diffstat (limited to 'pimd/pim_iface.h')
| -rw-r--r-- | pimd/pim_iface.h | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h index 55c278d6e2..bf8e4bd024 100644 --- a/pimd/pim_iface.h +++ b/pimd/pim_iface.h @@ -61,6 +61,20 @@ #define PIM_I_am_DR(pim_ifp) (pim_ifp)->pim_dr_addr.s_addr == (pim_ifp)->primary_address.s_addr #define PIM_I_am_DualActive(pim_ifp) (pim_ifp)->activeactive == true +/* Macros for interface flags */ + +/* + * PIM needs to know if hello is required to send before other PIM messages + * like Join, prune, assert would go out + */ +#define PIM_IF_FLAG_HELLO_SENT (1 << 0) + +#define PIM_IF_FLAG_TEST_HELLO_SENT(flags) ((flags)&PIM_IF_FLAG_HELLO_SENT) + +#define PIM_IF_FLAG_SET_HELLO_SENT(flags) ((flags) |= PIM_IF_FLAG_HELLO_SENT) + +#define PIM_IF_FLAG_UNSET_HELLO_SENT(flags) ((flags) &= ~PIM_IF_FLAG_HELLO_SENT) + struct pim_iface_upstream_switch { struct in_addr address; struct list *us; @@ -86,13 +100,13 @@ struct pim_interface { struct in_addr update_source; /* user can statically set the primary * address of the interface */ - int igmp_version; /* IGMP version */ - int igmp_default_robustness_variable; /* IGMPv3 QRV */ - int igmp_default_query_interval; /* IGMPv3 secs between general + int version; /* IGMP or MLD version */ + int default_robustness_variable; /* IGMP or MLD QRV */ + int default_query_interval; /* IGMP or MLD secs between general queries */ - int igmp_query_max_response_time_dsec; /* IGMPv3 Max Response Time in + int query_max_response_time_dsec; /* IGMP or MLD Max Response Time in dsecs for general queries */ - int igmp_specific_query_max_response_time_dsec; /* IGMPv3 Max Response + int specific_query_max_response_time_dsec; /* IGMP or MLD Max Response Time in dsecs called as last member query interval, defines the @@ -100,11 +114,11 @@ struct pim_interface { advertised in IGMP group-specific queries */ - int igmp_last_member_query_count; /* IGMP last member query count */ - struct list *igmp_socket_list; /* list of struct igmp_sock */ - struct list *igmp_join_list; /* list of struct igmp_join */ - struct list *igmp_group_list; /* list of struct igmp_group */ - struct hash *igmp_group_hash; + int last_member_query_count; /* IGMP or MLD last member query count */ + struct list *socket_list; /* list of struct IGMP or MLD sock */ + struct list *join_list; /* list of struct IGMP or MLD join */ + struct list *group_list; /* list of struct IGMP or MLD group */ + struct hash *group_hash; int pim_sock_fd; /* PIM socket file descriptor */ struct thread *t_pim_sock_read; /* thread for reading PIM socket */ @@ -161,6 +175,7 @@ struct pim_interface { uint32_t pim_ifstat_bsm_cfg_miss; uint32_t pim_ifstat_ucast_bsm_cfg_miss; uint32_t pim_ifstat_bsm_invalid_sz; + uint8_t flags; bool bsm_enable; /* bsm processing enable */ bool ucast_bsm_accept; /* ucast bsm processing */ @@ -193,7 +208,6 @@ void pim_if_addr_del(struct connected *ifc, int force_prim_as_any); void pim_if_addr_add_all(struct interface *ifp); void pim_if_addr_del_all(struct interface *ifp); void pim_if_addr_del_all_igmp(struct interface *ifp); -void pim_if_addr_del_all_pim(struct interface *ifp); int pim_if_add_vif(struct interface *ifp, bool ispimreg, bool is_vxlan_term); int pim_if_del_vif(struct interface *ifp); |
