]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blame - include/uapi/linux/fib_rules.h
prctl: Add force disable speculation
[mirror_ubuntu-artful-kernel.git] / include / uapi / linux / fib_rules.h
CommitLineData
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 */
29f6af77
YH
8#define FIB_RULE_PERMANENT 0x00000001
9#define FIB_RULE_INVERT 0x00000002
10#define FIB_RULE_UNRESOLVED 0x00000004
491deb24
PM
11#define FIB_RULE_IIF_DETACHED 0x00000008
12#define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED
1b038a5e 13#define FIB_RULE_OIF_DETACHED 0x00000010
29f6af77
YH
14
15/* try to find source address in routing lookups */
16#define FIB_RULE_FIND_SADDR 0x00010000
14c0b97d 17
d94d9fee 18struct fib_rule_hdr {
14c0b97d
TG
19 __u8 family;
20 __u8 dst_len;
21 __u8 src_len;
22 __u8 tos;
23
24 __u8 table;
25 __u8 res1; /* reserved */
26 __u8 res2; /* reserved */
27 __u8 action;
28
29 __u32 flags;
30};
31
622ec2c9
LC
32struct fib_rule_uid_range {
33 __u32 start;
34 __u32 end;
35};
36
d94d9fee 37enum {
14c0b97d
TG
38 FRA_UNSPEC,
39 FRA_DST, /* destination address */
40 FRA_SRC, /* source address */
491deb24
PM
41 FRA_IIFNAME, /* interface name */
42#define FRA_IFNAME FRA_IIFNAME
0947c9fe 43 FRA_GOTO, /* target to jump to (FR_ACT_GOTO) */
14c0b97d
TG
44 FRA_UNUSED2,
45 FRA_PRIORITY, /* priority/preference */
46 FRA_UNUSED3,
47 FRA_UNUSED4,
48 FRA_UNUSED5,
b8964ed9 49 FRA_FWMARK, /* mark */
14c0b97d 50 FRA_FLOW, /* flow/class id */
e7030878 51 FRA_TUN_ID,
6ef94cfa 52 FRA_SUPPRESS_IFGROUP,
73f5698e 53 FRA_SUPPRESS_PREFIXLEN,
9e762a4a 54 FRA_TABLE, /* Extended table id */
bbfb39cb 55 FRA_FWMASK, /* mask for netfilter mark */
1b038a5e 56 FRA_OIFNAME,
b46f6ded 57 FRA_PAD,
96c63fa7 58 FRA_L3MDEV, /* iif or oif is l3mdev goto its table */
622ec2c9 59 FRA_UID_RANGE, /* UID range */
14c0b97d
TG
60 __FRA_MAX
61};
62
63#define FRA_MAX (__FRA_MAX - 1)
64
d94d9fee 65enum {
14c0b97d
TG
66 FR_ACT_UNSPEC,
67 FR_ACT_TO_TBL, /* Pass to fixed table */
0947c9fe 68 FR_ACT_GOTO, /* Jump to another rule */
fa0b2d1d 69 FR_ACT_NOP, /* No operation */
14c0b97d
TG
70 FR_ACT_RES3,
71 FR_ACT_RES4,
72 FR_ACT_BLACKHOLE, /* Drop without notification */
73 FR_ACT_UNREACHABLE, /* Drop with ENETUNREACH */
74 FR_ACT_PROHIBIT, /* Drop with EACCES */
75 __FR_ACT_MAX,
76};
77
78#define FR_ACT_MAX (__FR_ACT_MAX - 1)
79
80#endif