fib_rules.h (5ef26e966d3fd105ad9a7e8e8f6d12c7fbd4c03d) | fib_rules.h (1b2a4440858857f2f93bb2ec5bb3a60f4fcc25be) |
---|---|
1#ifndef __NET_FIB_RULES_H 2#define __NET_FIB_RULES_H 3 4#include <linux/types.h> 5#include <linux/slab.h> 6#include <linux/netdevice.h> 7#include <linux/fib_rules.h> 8#include <linux/refcount.h> 9#include <net/flow.h> 10#include <net/rtnetlink.h> | 1#ifndef __NET_FIB_RULES_H 2#define __NET_FIB_RULES_H 3 4#include <linux/types.h> 5#include <linux/slab.h> 6#include <linux/netdevice.h> 7#include <linux/fib_rules.h> 8#include <linux/refcount.h> 9#include <net/flow.h> 10#include <net/rtnetlink.h> |
11#include <net/fib_notifier.h> |
|
11 12struct fib_kuid_range { 13 kuid_t start; 14 kuid_t end; 15}; 16 17struct fib_rule { 18 struct list_head list; --- 33 unchanged lines hidden (view full) --- 52 53struct fib_rules_ops { 54 int family; 55 struct list_head list; 56 int rule_size; 57 int addr_size; 58 int unresolved_rules; 59 int nr_goto_rules; | 12 13struct fib_kuid_range { 14 kuid_t start; 15 kuid_t end; 16}; 17 18struct fib_rule { 19 struct list_head list; --- 33 unchanged lines hidden (view full) --- 53 54struct fib_rules_ops { 55 int family; 56 struct list_head list; 57 int rule_size; 58 int addr_size; 59 int unresolved_rules; 60 int nr_goto_rules; |
61 unsigned int fib_rules_seq; |
|
60 61 int (*action)(struct fib_rule *, 62 struct flowi *, int, 63 struct fib_lookup_arg *); 64 bool (*suppress)(struct fib_rule *, 65 struct fib_lookup_arg *); 66 int (*match)(struct fib_rule *, 67 struct flowi *, int); --- 16 unchanged lines hidden (view full) --- 84 int nlgroup; 85 const struct nla_policy *policy; 86 struct list_head rules_list; 87 struct module *owner; 88 struct net *fro_net; 89 struct rcu_head rcu; 90}; 91 | 62 63 int (*action)(struct fib_rule *, 64 struct flowi *, int, 65 struct fib_lookup_arg *); 66 bool (*suppress)(struct fib_rule *, 67 struct fib_lookup_arg *); 68 int (*match)(struct fib_rule *, 69 struct flowi *, int); --- 16 unchanged lines hidden (view full) --- 86 int nlgroup; 87 const struct nla_policy *policy; 88 struct list_head rules_list; 89 struct module *owner; 90 struct net *fro_net; 91 struct rcu_head rcu; 92}; 93 |
94struct fib_rule_notifier_info { 95 struct fib_notifier_info info; /* must be first */ 96 struct fib_rule *rule; 97}; 98 |
|
92#define FRA_GENERIC_POLICY \ 93 [FRA_IIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ 94 [FRA_OIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ 95 [FRA_PRIORITY] = { .type = NLA_U32 }, \ 96 [FRA_FWMARK] = { .type = NLA_U32 }, \ 97 [FRA_FWMASK] = { .type = NLA_U32 }, \ 98 [FRA_TABLE] = { .type = NLA_U32 }, \ 99 [FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \ --- 38 unchanged lines hidden (view full) --- 138 struct net *); 139void fib_rules_unregister(struct fib_rules_ops *); 140 141int fib_rules_lookup(struct fib_rules_ops *, struct flowi *, int flags, 142 struct fib_lookup_arg *); 143int fib_default_rule_add(struct fib_rules_ops *, u32 pref, u32 table, 144 u32 flags); 145bool fib_rule_matchall(const struct fib_rule *rule); | 99#define FRA_GENERIC_POLICY \ 100 [FRA_IIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ 101 [FRA_OIFNAME] = { .type = NLA_STRING, .len = IFNAMSIZ - 1 }, \ 102 [FRA_PRIORITY] = { .type = NLA_U32 }, \ 103 [FRA_FWMARK] = { .type = NLA_U32 }, \ 104 [FRA_FWMASK] = { .type = NLA_U32 }, \ 105 [FRA_TABLE] = { .type = NLA_U32 }, \ 106 [FRA_SUPPRESS_PREFIXLEN] = { .type = NLA_U32 }, \ --- 38 unchanged lines hidden (view full) --- 145 struct net *); 146void fib_rules_unregister(struct fib_rules_ops *); 147 148int fib_rules_lookup(struct fib_rules_ops *, struct flowi *, int flags, 149 struct fib_lookup_arg *); 150int fib_default_rule_add(struct fib_rules_ops *, u32 pref, u32 table, 151 u32 flags); 152bool fib_rule_matchall(const struct fib_rule *rule); |
153int fib_rules_dump(struct net *net, struct notifier_block *nb, int family); 154unsigned int fib_rules_seq_read(struct net *net, int family); |
|
146 147int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, 148 struct netlink_ext_ack *extack); 149int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr *nlh, 150 struct netlink_ext_ack *extack); 151#endif | 155 156int fib_nl_newrule(struct sk_buff *skb, struct nlmsghdr *nlh, 157 struct netlink_ext_ack *extack); 158int fib_nl_delrule(struct sk_buff *skb, struct nlmsghdr *nlh, 159 struct netlink_ext_ack *extack); 160#endif |