summaryrefslogtreecommitdiffstats
path: root/include/linux/pim.h
diff options
context:
space:
mode:
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>2015-11-26 15:23:48 +0100
committerDavid S. Miller <davem@davemloft.net>2015-11-30 15:26:22 -0500
commit1973a4ea6ceaa47671227c3077f90508ea30897b (patch)
treee0a0e6d13f5302891e0a45aee15b02b5729ac93d /include/linux/pim.h
parent5ea1f13299d8b8edcb2969eda4c81f8e3264b706 (diff)
downloadop-kernel-dev-1973a4ea6ceaa47671227c3077f90508ea30897b.zip
op-kernel-dev-1973a4ea6ceaa47671227c3077f90508ea30897b.tar.gz
net: ipmr: move pimsm_enabled to pim.h and rename
Move the inline pimsm_enabled() to pim.h and rename it to ipmr_pimsm_enabled to show it's for the ipv4 ipmr code since pim.h is used by IPv6 too. Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pim.h')
-rw-r--r--include/linux/pim.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pim.h b/include/linux/pim.h
index 252bf66..e1d756f 100644
--- a/include/linux/pim.h
+++ b/include/linux/pim.h
@@ -13,6 +13,11 @@
#define PIM_NULL_REGISTER cpu_to_be32(0x40000000)
+static inline bool ipmr_pimsm_enabled(void)
+{
+ return IS_BUILTIN(CONFIG_IP_PIMSM_V1) || IS_BUILTIN(CONFIG_IP_PIMSM_V2);
+}
+
/* PIMv2 register message header layout (ietf-draft-idmr-pimvsm-v2-00.ps */
struct pimreghdr
{
OpenPOWER on IntegriCloud