| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** | 
|  | 2 | **************************************************************************** | 
|  | 3 | *** | 
|  | 4 | ***   This header was automatically generated from a Linux kernel header | 
|  | 5 | ***   of the same name, to make information necessary for userspace to | 
|  | 6 | ***   call into the kernel available to libc.  It contains only constants, | 
|  | 7 | ***   structures, and macros generated from the original header, and thus, | 
|  | 8 | ***   contains no copyrightable information. | 
|  | 9 | *** | 
|  | 10 | ***   To edit the content of this header, modify the corresponding | 
|  | 11 | ***   source file (e.g. under external/kernel-headers/original/) then | 
|  | 12 | ***   run bionic/libc/kernel/tools/update_all.py | 
|  | 13 | *** | 
|  | 14 | ***   Any manual change here will be lost the next time this script will | 
|  | 15 | ***   be run. You've been warned! | 
|  | 16 | *** | 
|  | 17 | **************************************************************************** | 
|  | 18 | ****************************************************************************/ | 
|  | 19 | #ifndef __LINUX_FIB_RULES_H | 
|  | 20 | #define __LINUX_FIB_RULES_H | 
|  | 21 | #include <linux/types.h> | 
|  | 22 | #include <linux/rtnetlink.h> | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define FIB_RULE_PERMANENT 0x00000001 | 
|  | 24 | #define FIB_RULE_INVERT 0x00000002 | 
|  | 25 | #define FIB_RULE_UNRESOLVED 0x00000004 | 
|  | 26 | #define FIB_RULE_IIF_DETACHED 0x00000008 | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED | 
|  | 28 | #define FIB_RULE_OIF_DETACHED 0x00000010 | 
|  | 29 | #define FIB_RULE_FIND_SADDR 0x00010000 | 
|  | 30 | struct fib_rule_hdr { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u8 family; | 
|  | 32 | __u8 dst_len; | 
|  | 33 | __u8 src_len; | 
|  | 34 | __u8 tos; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u8 table; | 
|  | 36 | __u8 res1; | 
|  | 37 | __u8 res2; | 
|  | 38 | __u8 action; | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __u32 flags; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | }; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 41 | struct fib_rule_uid_range { | 
|  | 42 | __u32 start; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 43 | __u32 end; | 
|  | 44 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | enum { | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 46 | FRA_UNSPEC, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | FRA_DST, | 
|  | 48 | FRA_SRC, | 
|  | 49 | FRA_IIFNAME, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 50 | #define FRA_IFNAME FRA_IIFNAME | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 51 | FRA_GOTO, | 
|  | 52 | FRA_UNUSED2, | 
|  | 53 | FRA_PRIORITY, | 
|  | 54 | FRA_UNUSED3, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 55 | FRA_UNUSED4, | 
|  | 56 | FRA_UNUSED5, | 
|  | 57 | FRA_FWMARK, | 
|  | 58 | FRA_FLOW, | 
| Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 59 | FRA_TUN_ID, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 60 | FRA_SUPPRESS_IFGROUP, | 
|  | 61 | FRA_SUPPRESS_PREFIXLEN, | 
|  | 62 | FRA_TABLE, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | FRA_FWMASK, | 
|  | 64 | FRA_OIFNAME, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 65 | FRA_PAD, | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 66 | FRA_L3MDEV, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 67 | FRA_UID_RANGE, | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 68 | __FRA_MAX | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 69 | }; | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 70 | #define FRA_MAX (__FRA_MAX - 1) | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 71 | enum { | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 72 | FR_ACT_UNSPEC, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 73 | FR_ACT_TO_TBL, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 74 | FR_ACT_GOTO, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 75 | FR_ACT_NOP, | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 76 | FR_ACT_RES3, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 77 | FR_ACT_RES4, | 
| Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 | FR_ACT_BLACKHOLE, | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 79 | FR_ACT_UNREACHABLE, | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 80 | FR_ACT_PROHIBIT, | 
| Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 81 | __FR_ACT_MAX, | 
| Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 82 | }; | 
| Christopher Ferris | 48af7cb | 2017-02-21 12:35:09 -0800 | [diff] [blame] | 83 | #define FR_ACT_MAX (__FR_ACT_MAX - 1) | 
| Christopher Ferris | 49f525c | 2016-12-12 14:55:36 -0800 | [diff] [blame] | 84 | #endif |