diff options
author | Yuval Mintz <yuvalm@mellanox.com> | 2018-03-26 15:01:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 13:14:43 -0400 |
commit | cdc9f9443b5c3a61c7cec807965054ee1fd29acf (patch) | |
tree | 5b7d4b2295983ee08909ffb33a4c7130edb03573 /include/linux/mroute_base.h | |
parent | 54c4cad97b8fd414909b78d4274a6797baa52b3b (diff) | |
download | linux-stable-cdc9f9443b5c3a61c7cec807965054ee1fd29acf.tar.gz linux-stable-cdc9f9443b5c3a61c7cec807965054ee1fd29acf.tar.bz2 linux-stable-cdc9f9443b5c3a61c7cec807965054ee1fd29acf.zip |
ipmr: Make ipmr_dump() common
Since all the primitive elements used for the notification done by ipmr
are now common [mr_table, mr_mfc, vif_device] we can refactor the logic
for dumping them to a common file.
Signed-off-by: Yuval Mintz <yuvalm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/mroute_base.h')
-rw-r--r-- | include/linux/mroute_base.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/mroute_base.h b/include/linux/mroute_base.h index 2c594686c05e..289eb5aa7b5d 100644 --- a/include/linux/mroute_base.h +++ b/include/linux/mroute_base.h @@ -277,6 +277,13 @@ int mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb, u32 portid, u32 seq, struct mr_mfc *c, int cmd, int flags), spinlock_t *lock); + +int mr_dump(struct net *net, struct notifier_block *nb, unsigned short family, + int (*rules_dump)(struct net *net, + struct notifier_block *nb), + struct mr_table *(*mr_iter)(struct net *net, + struct mr_table *mrt), + rwlock_t *mrt_lock); #else static inline void vif_device_init(struct vif_device *v, struct net_device *dev, @@ -333,6 +340,17 @@ mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb, { return -EINVAL; } + +static inline int mr_dump(struct net *net, struct notifier_block *nb, + unsigned short family, + int (*rules_dump)(struct net *net, + struct notifier_block *nb), + struct mr_table *(*mr_iter)(struct net *net, + struct mr_table *mrt), + rwlock_t *mrt_lock) +{ + return -EINVAL; +} #endif static inline void *mr_mfc_find(struct mr_table *mrt, void *hasharg) |