Commit | Line | Data |
---|---|---|
14c0b97d TG |
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 | |
3dfbcc41 | 9 | #define FIB_RULE_INVERT 2 |
0947c9fe | 10 | #define FIB_RULE_UNRESOLVED 4 |
14c0b97d TG |
11 | |
12 | struct fib_rule_hdr | |
13 | { | |
14 | __u8 family; | |
15 | __u8 dst_len; | |
16 | __u8 src_len; | |
17 | __u8 tos; | |
18 | ||
19 | __u8 table; | |
20 | __u8 res1; /* reserved */ | |
21 | __u8 res2; /* reserved */ | |
22 | __u8 action; | |
23 | ||
24 | __u32 flags; | |
25 | }; | |
26 | ||
27 | enum | |
28 | { | |
29 | FRA_UNSPEC, | |
30 | FRA_DST, /* destination address */ | |
31 | FRA_SRC, /* source address */ | |
32 | FRA_IFNAME, /* interface name */ | |
0947c9fe | 33 | FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */ |
14c0b97d TG |
34 | FRA_UNUSED2, |
35 | FRA_PRIORITY, /* priority/preference */ | |
36 | FRA_UNUSED3, | |
37 | FRA_UNUSED4, | |
38 | FRA_UNUSED5, | |
b8964ed9 | 39 | FRA_FWMARK, /* mark */ |
14c0b97d | 40 | FRA_FLOW, /* flow/class id */ |
9e762a4a PM |
41 | FRA_UNUSED6, |
42 | FRA_UNUSED7, | |
43 | FRA_UNUSED8, | |
44 | FRA_TABLE, /* Extended table id */ | |
bbfb39cb | 45 | FRA_FWMASK, /* mask for netfilter mark */ |
14c0b97d TG |
46 | __FRA_MAX |
47 | }; | |
48 | ||
49 | #define FRA_MAX (__FRA_MAX - 1) | |
50 | ||
51 | enum | |
52 | { | |
53 | FR_ACT_UNSPEC, | |
54 | FR_ACT_TO_TBL, /* Pass to fixed table */ | |
0947c9fe | 55 | FR_ACT_GOTO, /* Jump to another rule */ |
14c0b97d TG |
56 | FR_ACT_RES2, |
57 | FR_ACT_RES3, | |
58 | FR_ACT_RES4, | |
59 | FR_ACT_BLACKHOLE, /* Drop without notification */ | |
60 | FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */ | |
61 | FR_ACT_PROHIBIT, /* Drop with EACCES */ | |
62 | __FR_ACT_MAX, | |
63 | }; | |
64 | ||
65 | #define FR_ACT_MAX (__FR_ACT_MAX - 1) | |
66 | ||
67 | #endif |