aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fib_rules.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fib_rules.h')
-rw-r--r--include/linux/fib_rules.h60
1 files changed, 60 insertions, 0 deletions
diff --git a/include/linux/fib_rules.h b/include/linux/fib_rules.h
new file mode 100644
index 000000000000..5e503f0ca6e4
--- /dev/null
+++ b/include/linux/fib_rules.h
@@ -0,0 +1,60 @@
1#ifndef __LINUX_FIB_RULES_H
2#define __LINUX_FIB_RULES_H
3
4#include <linux/types.h>
5#include <linux/rtnetlink.h>
6
7/* rule is permanent, and cannot be deleted */
8#define FIB_RULE_PERMANENT 1
9
10struct fib_rule_hdr
11{
12 __u8 family;
13 __u8 dst_len;
14 __u8 src_len;
15 __u8 tos;
16
17 __u8 table;
18 __u8 res1; /* reserved */
19 __u8 res2; /* reserved */
20 __u8 action;
21
22 __u32 flags;
23};
24
25enum
26{
27 FRA_UNSPEC,
28 FRA_DST, /* destination address */
29 FRA_SRC, /* source address */
30 FRA_IFNAME, /* interface name */
31 FRA_UNUSED1,
32 FRA_UNUSED2,
33 FRA_PRIORITY, /* priority/preference */
34 FRA_UNUSED3,
35 FRA_UNUSED4,
36 FRA_UNUSED5,
37 FRA_FWMARK, /* netfilter mark (IPv4) */
38 FRA_FLOW, /* flow/class id */
39 __FRA_MAX
40};
41
42#define FRA_MAX (__FRA_MAX - 1)
43
44enum
45{
46 FR_ACT_UNSPEC,
47 FR_ACT_TO_TBL, /* Pass to fixed table */
48 FR_ACT_RES1,
49 FR_ACT_RES2,
50 FR_ACT_RES3,
51 FR_ACT_RES4,
52 FR_ACT_BLACKHOLE, /* Drop without notification */
53 FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */
54 FR_ACT_PROHIBIT, /* Drop with EACCES */
55 __FR_ACT_MAX,
56};
57
58#define FR_ACT_MAX (__FR_ACT_MAX - 1)
59
60#endif