From c0243892cbb0e48873d6132f673c830602808245 Mon Sep 17 00:00:00 2001 From: Ido Schimmel Date: Fri, 10 Mar 2017 08:56:18 +0100 Subject: ipv4: fib: Move FIB notification code to a separate file Most of the code concerned with the FIB notification chain currently resides in fib_trie.c, but this isn't really appropriate, as the FIB notification chain is also used for FIB rules. Therefore, it makes sense to move the common FIB notification code to a separate file and have it export the relevant functions, which can be invoked by its different users (e.g., fib_trie.c, fib_rules.c). Signed-off-by: Ido Schimmel Signed-off-by: Jiri Pirko Acked-by: David Ahern Signed-off-by: David S. Miller --- include/net/ip_fib.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/net/ip_fib.h') diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h index 368bb4024b78..3ad87063a475 100644 --- a/include/net/ip_fib.h +++ b/include/net/ip_fib.h @@ -232,9 +232,24 @@ enum fib_event_type { int register_fib_notifier(struct notifier_block *nb, void (*cb)(struct notifier_block *nb)); int unregister_fib_notifier(struct notifier_block *nb); +int call_fib_notifier(struct notifier_block *nb, struct net *net, + enum fib_event_type event_type, + struct fib_notifier_info *info); int call_fib_notifiers(struct net *net, enum fib_event_type event_type, struct fib_notifier_info *info); +void fib_notify(struct net *net, struct notifier_block *nb, + enum fib_event_type event_type); +#ifdef CONFIG_IP_MULTIPLE_TABLES +void fib_rules_notify(struct net *net, struct notifier_block *nb, + enum fib_event_type event_type); +#else +static inline void fib_rules_notify(struct net *net, struct notifier_block *nb, + enum fib_event_type event_type) +{ +} +#endif + struct fib_table { struct hlist_node tb_hlist; u32 tb_id; -- cgit v1.2.3-73-gaa49b