aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2010-04-13 01:03:17 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-13 17:49:31 -0400
commit0f87b1dd01b51dc3c789f7a212656a4a87eee1bd (patch)
tree2ce87a26afecd5c0400a6e743534a402a6ca8aec /include
parent28bb17268b92b0c568f2496e5e631008f9108409 (diff)
net: fib_rules: decouple address families from real address families
Decouple the address family values used for fib_rules from the real address families in socket.h. This allows to use fib_rules for code that is not a real address family without increasing AF_MAX/NPROTO. Values up to 127 are reserved for real address families and map directly to the corresponding AF value, values starting from 128 are for other uses. rtnetlink is changed to invoke the AF_UNSPEC dumpit/doit handlers for these families. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fib_rules.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
index 51da65b68b85..405e41139a4d 100644
--- a/include/linux/fib_rules.h
+++ b/include/linux/fib_rules.h
@@ -15,6 +15,13 @@
15/* try to find source address in routing lookups */ 15/* try to find source address in routing lookups */
16#define FIB_RULE_FIND_SADDR 0x00010000 16#define FIB_RULE_FIND_SADDR 0x00010000
17 17
18/* fib_rules families. values up to 127 are reserved for real address
19 * families, values above 128 may be used arbitrarily.
20 */
21#define FIB_RULES_IPV4 AF_INET
22#define FIB_RULES_IPV6 AF_INET6
23#define FIB_RULES_DECNET AF_DECnet
24
18struct fib_rule_hdr { 25struct fib_rule_hdr {
19 __u8 family; 26 __u8 family;
20 __u8 dst_len; 27 __u8 dst_len;