diff options
author | Mobashshera Rasool <mrasool@vmware.com> | 2021-12-14 07:31:39 +0100 |
---|---|---|
committer | Mobashshera Rasool <mrasool@vmware.com> | 2022-01-11 06:10:29 +0100 |
commit | 12e76340181e41872d56e1f45f502bb04584e886 (patch) | |
tree | ec6c03c8d550b907926dcc7688d2a248bb40742c | |
parent | pimd: Modify in_addr to pim_addr in pim_assert_metric (diff) | |
download | frr-12e76340181e41872d56e1f45f502bb04584e886.tar.xz frr-12e76340181e41872d56e1f45f502bb04584e886.zip |
pimd: Modifying in_addr to pim_addr in struct pim_interface for IPv6
Based on compiler option, pim_addr will be changed to in_addr
or in6_addr for pimd and pim6d respectively.
Reviewed-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
-rw-r--r-- | pimd/pim_iface.h | 16 | ||||
-rw-r--r-- | pimd/pim_macro.c | 2 | ||||
-rw-r--r-- | pimd/pim_macro.h | 2 | ||||
-rw-r--r-- | pimd/pim_pim.c | 4 |
4 files changed, 11 insertions, 13 deletions
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h index 72168b690..9213e600f 100644 --- a/pimd/pim_iface.h +++ b/pimd/pim_iface.h @@ -94,16 +94,14 @@ struct pim_interface { uint32_t options; /* bit vector */ ifindex_t mroute_vif_index; struct pim_instance *pim; - - struct in_addr primary_address; /* remember addr to detect change */ + pim_addr primary_address; /* remember addr to detect change */ struct list *sec_addr_list; /* list of struct pim_secondary_addr */ - struct in_addr update_source; /* user can statically set the primary + pim_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 - queries */ + int igmp_version; /* IGMP or MLD version */ + int igmp_default_robustness_variable; /* IGMP or MLD QRV */ + int igmp_default_query_interval; /* IGMP or MLD secs between general + queries */ int igmp_query_max_response_time_dsec; /* IGMPv3 Max Response Time in dsecs for general queries */ int igmp_specific_query_max_response_time_dsec; /* IGMPv3 Max Response @@ -144,7 +142,7 @@ struct pim_interface { int64_t pim_dr_election_last; /* timestamp */ int pim_dr_election_count; int pim_dr_election_changes; - struct in_addr pim_dr_addr; + pim_addr pim_dr_addr; uint32_t pim_dr_priority; /* config */ int pim_dr_num_nondrpri_neighbors; /* neighbors without dr_pri */ diff --git a/pimd/pim_macro.c b/pimd/pim_macro.c index c6961d30c..81ef6962d 100644 --- a/pimd/pim_macro.c +++ b/pimd/pim_macro.c @@ -261,7 +261,7 @@ int pim_macro_ch_could_assert_eval(const struct pim_ifchannel *ch) } */ struct pim_assert_metric pim_macro_spt_assert_metric(const struct pim_rpf *rpf, - struct in_addr ifaddr) + pim_addr ifaddr) { struct pim_assert_metric metric; diff --git a/pimd/pim_macro.h b/pimd/pim_macro.h index f310e244e..b88a84e2d 100644 --- a/pimd/pim_macro.h +++ b/pimd/pim_macro.h @@ -33,7 +33,7 @@ int pim_macro_chisin_pim_include(const struct pim_ifchannel *ch); int pim_macro_chisin_joins_or_include(const struct pim_ifchannel *ch); int pim_macro_ch_could_assert_eval(const struct pim_ifchannel *ch); struct pim_assert_metric pim_macro_spt_assert_metric(const struct pim_rpf *rpf, - struct in_addr ifaddr); + pim_addr ifaddr); struct pim_assert_metric pim_macro_ch_my_assert_metric_eval(const struct pim_ifchannel *ch); int pim_macro_chisin_oiflist(const struct pim_ifchannel *ch); diff --git a/pimd/pim_pim.c b/pimd/pim_pim.c index 351b906d2..2142d9010 100644 --- a/pimd/pim_pim.c +++ b/pimd/pim_pim.c @@ -570,8 +570,8 @@ static int pim_msg_send_frame(int fd, char *buf, size_t len, return 0; } -int pim_msg_send(int fd, struct in_addr src, struct in_addr dst, - uint8_t *pim_msg, int pim_msg_size, const char *ifname) +int pim_msg_send(int fd, pim_addr src, struct in_addr dst, uint8_t *pim_msg, + int pim_msg_size, const char *ifname) { struct sockaddr_in to; socklen_t tolen; |