fib_rules.c (63f3444fb9a54c024d55f1205f8b94e7d2786595) fib_rules.c (c454673da7c1d6533f40ec2f788023df9af56ebf)
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * IPv4 Forwarding Information Base: policy rules.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 260 unchanged lines hidden (view full) ---

269 NLA_PUT_U32(skb, FRA_FLOW, rule4->tclassid);
270#endif
271 return 0;
272
273nla_put_failure:
274 return -ENOBUFS;
275}
276
1/*
2 * INET An implementation of the TCP/IP protocol suite for the LINUX
3 * operating system. INET is implemented using the BSD Socket
4 * interface as the means of communication with the user level.
5 *
6 * IPv4 Forwarding Information Base: policy rules.
7 *
8 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>

--- 260 unchanged lines hidden (view full) ---

269 NLA_PUT_U32(skb, FRA_FLOW, rule4->tclassid);
270#endif
271 return 0;
272
273nla_put_failure:
274 return -ENOBUFS;
275}
276
277static int fib4_rule_dump(struct sk_buff *skb, struct netlink_callback *cb)
278{
279 return fib_rules_dump(skb, cb, AF_INET);
280}
281
282static u32 fib4_rule_default_pref(void)
283{
284 struct list_head *pos;
285 struct fib_rule *rule;
286
287 if (!list_empty(&fib4_rules)) {
288 pos = fib4_rules.next;
289 if (pos->next != &fib4_rules) {

--- 32 unchanged lines hidden (view full) ---

322
323void __init fib4_rules_init(void)
324{
325 list_add_tail(&local_rule.common.list, &fib4_rules);
326 list_add_tail(&main_rule.common.list, &fib4_rules);
327 list_add_tail(&default_rule.common.list, &fib4_rules);
328
329 fib_rules_register(&fib4_rules_ops);
277static u32 fib4_rule_default_pref(void)
278{
279 struct list_head *pos;
280 struct fib_rule *rule;
281
282 if (!list_empty(&fib4_rules)) {
283 pos = fib4_rules.next;
284 if (pos->next != &fib4_rules) {

--- 32 unchanged lines hidden (view full) ---

317
318void __init fib4_rules_init(void)
319{
320 list_add_tail(&local_rule.common.list, &fib4_rules);
321 list_add_tail(&main_rule.common.list, &fib4_rules);
322 list_add_tail(&default_rule.common.list, &fib4_rules);
323
324 fib_rules_register(&fib4_rules_ops);
330
331 rtnl_register(PF_INET, RTM_GETRULE, NULL, fib4_rule_dump);
332}
325}