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);
+void fib_notify(struct net *net, struct notifier_block *nb);
#ifdef CONFIG_IP_MULTIPLE_TABLES
-void fib_rules_notify(struct net *net, struct notifier_block *nb,
- enum fib_event_type event_type);
+void fib_rules_notify(struct net *net, struct notifier_block *nb);
#else
-static inline void fib_rules_notify(struct net *net, struct notifier_block *nb,
- enum fib_event_type event_type)
+static inline void fib_rules_notify(struct net *net, struct notifier_block *nb)
{
}
#endif
return call_fib_notifiers(net, event_type, &info);
}
-void fib_rules_notify(struct net *net, struct notifier_block *nb,
- enum fib_event_type event_type)
+void fib_rules_notify(struct net *net, struct notifier_block *nb)
{
struct fib_notifier_info info;
if (net->ipv4.fib_has_custom_rules)
- call_fib_notifier(nb, net, event_type, &info);
+ call_fib_notifier(nb, net, FIB_EVENT_RULE_ADD, &info);
}
static const struct nla_policy fib4_rule_policy[FRA_MAX+1] = {
}
static void fib_leaf_notify(struct net *net, struct key_vector *l,
- struct fib_table *tb, struct notifier_block *nb,
- enum fib_event_type event_type)
+ struct fib_table *tb, struct notifier_block *nb)
{
struct fib_alias *fa;
if (tb->tb_id != fa->tb_id)
continue;
- call_fib_entry_notifier(nb, net, event_type, l->key,
+ call_fib_entry_notifier(nb, net, FIB_EVENT_ENTRY_ADD, l->key,
KEYLENGTH - fa->fa_slen, fi, fa->fa_tos,
fa->fa_type, fa->tb_id);
}
}
static void fib_table_notify(struct net *net, struct fib_table *tb,
- struct notifier_block *nb,
- enum fib_event_type event_type)
+ struct notifier_block *nb)
{
struct trie *t = (struct trie *)tb->tb_data;
struct key_vector *l, *tp = t->kv;
t_key key = 0;
while ((l = leaf_walk_rcu(&tp, key)) != NULL) {
- fib_leaf_notify(net, l, tb, nb, event_type);
+ fib_leaf_notify(net, l, tb, nb);
key = l->key + 1;
/* stop in case of wrap around */
}
}
-void fib_notify(struct net *net, struct notifier_block *nb,
- enum fib_event_type event_type)
+void fib_notify(struct net *net, struct notifier_block *nb)
{
unsigned int h;
struct fib_table *tb;
hlist_for_each_entry_rcu(tb, head, tb_hlist)
- fib_table_notify(net, tb, nb, event_type);
+ fib_table_notify(net, tb, nb);
}
}