summaryrefslogtreecommitdiffstats
path: root/pimd/pim_iface.h
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-10-23 16:37:45 +0200
committerDonald Sharp <sharpd@cumulusnetwroks.com>2016-05-26 02:38:35 +0200
commit84366c7e153b3e557b99168d4712539c076d23ea (patch)
treec99da0e4a4b42078ade7238e15719b0e89ff5b74 /pimd/pim_iface.h
parentpimd: Add some code to intelligently handle WHOLEPKT generation (diff)
downloadfrr-84366c7e153b3e557b99168d4712539c076d23ea.tar.xz
frr-84366c7e153b3e557b99168d4712539c076d23ea.zip
pimd: Move I_am_DR macro to more appropriate place
Move the I_am_DR(ifp) outside of pim_macro.c and into pim_iface.h where it belongs. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_iface.h')
-rw-r--r--pimd/pim_iface.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/pimd/pim_iface.h b/pimd/pim_iface.h
index ad6a3264d..9c4e1a770 100644
--- a/pimd/pim_iface.h
+++ b/pimd/pim_iface.h
@@ -53,6 +53,8 @@
#define PIM_IF_DONT_IGMP_LISTEN_ALLROUTERS(options) ((options) &= ~PIM_IF_MASK_IGMP_LISTEN_ALLROUTERS)
#define PIM_IF_DONT_PIM_CAN_DISABLE_JOIN_SUPRESSION(options) ((options) &= ~PIM_IF_MASK_PIM_CAN_DISABLE_JOIN_SUPRESSION)
+#define PIM_I_am_DR(pim_ifp) ((pim_ifp)->pim_dr_addr.s_addr == (pim_ifp)->primary_address.s_addr)
+
enum pim_interface_type {
PIM_INTERFACE_SSM,
PIM_INTERFACE_SM