1 #ifndef __LINUX_FIB_RULES_H
2 #define __LINUX_FIB_RULES_H
4 #include <linux/types.h>
5 #include <linux/rtnetlink.h>
7 /* rule is permanent, and cannot be deleted */
8 #define FIB_RULE_PERMANENT 0x00000001
9 #define FIB_RULE_INVERT 0x00000002
10 #define FIB_RULE_UNRESOLVED 0x00000004
11 #define FIB_RULE_IIF_DETACHED 0x00000008
12 #define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED
13 #define FIB_RULE_OIF_DETACHED 0x00000010
15 /* try to find source address in routing lookups */
16 #define FIB_RULE_FIND_SADDR 0x00010000
18 /* fib_rules families. values up to 127 are reserved for real address
19 * families, values above 128 may be used arbitrarily.
21 #define FIB_RULES_IPV4 AF_INET
22 #define FIB_RULES_IPV6 AF_INET6
23 #define FIB_RULES_DECNET AF_DECnet
24 #define FIB_RULES_IPMR 128
33 __u8 res1; /* reserved */
34 __u8 res2; /* reserved */
42 FRA_DST, /* destination address */
43 FRA_SRC, /* source address */
44 FRA_IIFNAME, /* interface name */
45 #define FRA_IFNAME FRA_IIFNAME
46 FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */
48 FRA_PRIORITY, /* priority/preference */
52 FRA_FWMARK, /* mark */
53 FRA_FLOW, /* flow/class id */
57 FRA_TABLE, /* Extended table id */
58 FRA_FWMASK, /* mask for netfilter mark */
63 #define FRA_MAX (__FRA_MAX - 1)
67 FR_ACT_TO_TBL, /* Pass to fixed table */
68 FR_ACT_GOTO, /* Jump to another rule */
69 FR_ACT_NOP, /* No operation */
72 FR_ACT_BLACKHOLE, /* Drop without notification */
73 FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */
74 FR_ACT_PROHIBIT, /* Drop with EACCES */
78 #define FR_ACT_MAX (__FR_ACT_MAX - 1)