aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-26 02:24:24 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:27:17 -0400
commitc454673da7c1d6533f40ec2f788023df9af56ebf (patch)
tree004d329e049f3bdef09ff20623e24cba9f1fac12 /net/decnet
parent687ad8cc640fd1f1619cc44a9ab274dabd48c758 (diff)
[NET] rules: Unified rules dumping
Implements a unified, protocol independant rules dumping function which is capable of both, dumping a specific protocol family or all of them. This speeds up dumping as less lookups are required. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_rules.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/net/decnet/dn_rules.c b/net/decnet/dn_rules.c
index a7a7da9b35c3..fd0cc2aa316c 100644
--- a/net/decnet/dn_rules.c
+++ b/net/decnet/dn_rules.c
@@ -239,11 +239,6 @@ static u32 dn_fib_rule_default_pref(void)
239 return 0; 239 return 0;
240} 240}
241 241
242static int dn_fib_dump_rules(struct sk_buff *skb, struct netlink_callback *cb)
243{
244 return fib_rules_dump(skb, cb, AF_DECnet);
245}
246
247static struct fib_rules_ops dn_fib_rules_ops = { 242static struct fib_rules_ops dn_fib_rules_ops = {
248 .family = AF_DECnet, 243 .family = AF_DECnet,
249 .rule_size = sizeof(struct dn_fib_rule), 244 .rule_size = sizeof(struct dn_fib_rule),
@@ -264,12 +259,10 @@ void __init dn_fib_rules_init(void)
264{ 259{
265 list_add_tail(&default_rule.common.list, &dn_fib_rules); 260 list_add_tail(&default_rule.common.list, &dn_fib_rules);
266 fib_rules_register(&dn_fib_rules_ops); 261 fib_rules_register(&dn_fib_rules_ops);
267 rtnl_register(PF_DECnet, RTM_GETRULE, NULL, dn_fib_dump_rules);
268} 262}
269 263
270void __exit dn_fib_rules_cleanup(void) 264void __exit dn_fib_rules_cleanup(void)
271{ 265{
272 rtnl_unregister(PF_DECnet, RTM_GETRULE);
273 fib_rules_unregister(&dn_fib_rules_ops); 266 fib_rules_unregister(&dn_fib_rules_ops);
274} 267}
275 268