Thomas Graf | 14c0b97 | 2006-08-04 03:38:38 -0700 | [diff] [blame] | 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 | |
| 10 | struct 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 | |
| 25 | enum |
| 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, |
Patrick McHardy | bbfb39c | 2006-08-25 16:10:14 -0700 | [diff] [blame] | 37 | FRA_FWMARK, /* netfilter mark */ |
Thomas Graf | 14c0b97 | 2006-08-04 03:38:38 -0700 | [diff] [blame] | 38 | FRA_FLOW, /* flow/class id */ |
Patrick McHardy | 9e762a4 | 2006-08-10 23:09:48 -0700 | [diff] [blame] | 39 | FRA_UNUSED6, |
| 40 | FRA_UNUSED7, |
| 41 | FRA_UNUSED8, |
| 42 | FRA_TABLE, /* Extended table id */ |
Patrick McHardy | bbfb39c | 2006-08-25 16:10:14 -0700 | [diff] [blame] | 43 | FRA_FWMASK, /* mask for netfilter mark */ |
Thomas Graf | 14c0b97 | 2006-08-04 03:38:38 -0700 | [diff] [blame] | 44 | __FRA_MAX |
| 45 | }; |
| 46 | |
| 47 | #define FRA_MAX (__FRA_MAX - 1) |
| 48 | |
| 49 | enum |
| 50 | { |
| 51 | FR_ACT_UNSPEC, |
| 52 | FR_ACT_TO_TBL, /* Pass to fixed table */ |
| 53 | FR_ACT_RES1, |
| 54 | FR_ACT_RES2, |
| 55 | FR_ACT_RES3, |
| 56 | FR_ACT_RES4, |
| 57 | FR_ACT_BLACKHOLE, /* Drop without notification */ |
| 58 | FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */ |
| 59 | FR_ACT_PROHIBIT, /* Drop with EACCES */ |
| 60 | __FR_ACT_MAX, |
| 61 | }; |
| 62 | |
| 63 | #define FR_ACT_MAX (__FR_ACT_MAX - 1) |
| 64 | |
| 65 | #endif |