#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
{
struct mr_table *mrt;
};
-static inline bool pimsm_enabled(void)
-{
- return IS_BUILTIN(CONFIG_IP_PIMSM_V1) || IS_BUILTIN(CONFIG_IP_PIMSM_V2);
-}
-
/* Big lock, protecting vif table, mrt cache and mroute socket state.
* Note that the changes are semaphored via rtnl_lock.
*/
switch (vifc->vifc_flags) {
case VIFF_REGISTER:
- if (!pimsm_enabled())
+ if (!ipmr_pimsm_enabled())
return -EINVAL;
/* Special Purpose VIF in PIM
* All the packets will be sent to the daemon
mrt->mroute_do_assert = val;
break;
case MRT_PIM:
- if (!pimsm_enabled()) {
+ if (!ipmr_pimsm_enabled()) {
ret = -ENOPROTOOPT;
break;
}
val = 0x0305;
break;
case MRT_PIM:
- if (!pimsm_enabled())
+ if (!ipmr_pimsm_enabled())
return -ENOPROTOOPT;
val = mrt->mroute_do_pim;
break;