1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef __LINUX_FIB_RULES_H 8 #define __LINUX_FIB_RULES_H 9 #include <linux/types.h> 10 #include <linux/rtnetlink.h> 11 #define FIB_RULE_PERMANENT 0x00000001 12 #define FIB_RULE_INVERT 0x00000002 13 #define FIB_RULE_UNRESOLVED 0x00000004 14 #define FIB_RULE_IIF_DETACHED 0x00000008 15 #define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED 16 #define FIB_RULE_OIF_DETACHED 0x00000010 17 #define FIB_RULE_FIND_SADDR 0x00010000 18 struct fib_rule_hdr { 19 __u8 family; 20 __u8 dst_len; 21 __u8 src_len; 22 __u8 tos; 23 __u8 table; 24 __u8 res1; 25 __u8 res2; 26 __u8 action; 27 __u32 flags; 28 }; 29 struct fib_rule_uid_range { 30 __u32 start; 31 __u32 end; 32 }; 33 struct fib_rule_port_range { 34 __u16 start; 35 __u16 end; 36 }; 37 enum { 38 FRA_UNSPEC, 39 FRA_DST, 40 FRA_SRC, 41 FRA_IIFNAME, 42 #define FRA_IFNAME FRA_IIFNAME 43 FRA_GOTO, 44 FRA_UNUSED2, 45 FRA_PRIORITY, 46 FRA_UNUSED3, 47 FRA_UNUSED4, 48 FRA_UNUSED5, 49 FRA_FWMARK, 50 FRA_FLOW, 51 FRA_TUN_ID, 52 FRA_SUPPRESS_IFGROUP, 53 FRA_SUPPRESS_PREFIXLEN, 54 FRA_TABLE, 55 FRA_FWMASK, 56 FRA_OIFNAME, 57 FRA_PAD, 58 FRA_L3MDEV, 59 FRA_UID_RANGE, 60 FRA_PROTOCOL, 61 FRA_IP_PROTO, 62 FRA_SPORT_RANGE, 63 FRA_DPORT_RANGE, 64 __FRA_MAX 65 }; 66 #define FRA_MAX (__FRA_MAX - 1) 67 enum { 68 FR_ACT_UNSPEC, 69 FR_ACT_TO_TBL, 70 FR_ACT_GOTO, 71 FR_ACT_NOP, 72 FR_ACT_RES3, 73 FR_ACT_RES4, 74 FR_ACT_BLACKHOLE, 75 FR_ACT_UNREACHABLE, 76 FR_ACT_PROHIBIT, 77 __FR_ACT_MAX, 78 }; 79 #define FR_ACT_MAX (__FR_ACT_MAX - 1) 80 #endif 81