blob: 733c1b1ae4205dd73a7a223dc6016720ad00b32b [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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 Cheng655a7c02013-10-16 16:09:24 -070023#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 Cheng655a7c02013-10-16 16:09:24 -070027#define FIB_RULE_DEV_DETACHED FIB_RULE_IIF_DETACHED
28#define FIB_RULE_OIF_DETACHED 0x00000010
29#define FIB_RULE_FIND_SADDR 0x00010000
30struct fib_rule_hdr {
Tao Baod7db5942015-01-28 10:07:51 -080031 __u8 family;
32 __u8 dst_len;
33 __u8 src_len;
34 __u8 tos;
Tao Baod7db5942015-01-28 10:07:51 -080035 __u8 table;
36 __u8 res1;
37 __u8 res2;
38 __u8 action;
Tao Baod7db5942015-01-28 10:07:51 -080039 __u32 flags;
Ben Cheng655a7c02013-10-16 16:09:24 -070040};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080041struct fib_rule_uid_range {
42 __u32 start;
Christopher Ferris48af7cb2017-02-21 12:35:09 -080043 __u32 end;
44};
Christopher Ferris76a1d452018-06-27 14:12:29 -070045struct fib_rule_port_range {
46 __u16 start;
47 __u16 end;
48};
Ben Cheng655a7c02013-10-16 16:09:24 -070049enum {
Tao Baod7db5942015-01-28 10:07:51 -080050 FRA_UNSPEC,
Tao Baod7db5942015-01-28 10:07:51 -080051 FRA_DST,
52 FRA_SRC,
53 FRA_IIFNAME,
Ben Cheng655a7c02013-10-16 16:09:24 -070054#define FRA_IFNAME FRA_IIFNAME
Tao Baod7db5942015-01-28 10:07:51 -080055 FRA_GOTO,
56 FRA_UNUSED2,
57 FRA_PRIORITY,
58 FRA_UNUSED3,
Tao Baod7db5942015-01-28 10:07:51 -080059 FRA_UNUSED4,
60 FRA_UNUSED5,
61 FRA_FWMARK,
62 FRA_FLOW,
Christopher Ferris05d08e92016-02-04 13:16:38 -080063 FRA_TUN_ID,
Tao Baod7db5942015-01-28 10:07:51 -080064 FRA_SUPPRESS_IFGROUP,
65 FRA_SUPPRESS_PREFIXLEN,
66 FRA_TABLE,
Tao Baod7db5942015-01-28 10:07:51 -080067 FRA_FWMASK,
68 FRA_OIFNAME,
Christopher Ferris106b3a82016-08-24 12:15:38 -070069 FRA_PAD,
Christopher Ferris49f525c2016-12-12 14:55:36 -080070 FRA_L3MDEV,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080071 FRA_UID_RANGE,
Christopher Ferris76a1d452018-06-27 14:12:29 -070072 FRA_PROTOCOL,
73 FRA_IP_PROTO,
74 FRA_SPORT_RANGE,
75 FRA_DPORT_RANGE,
Christopher Ferris49f525c2016-12-12 14:55:36 -080076 __FRA_MAX
Christopher Ferris106b3a82016-08-24 12:15:38 -070077};
Ben Cheng655a7c02013-10-16 16:09:24 -070078#define FRA_MAX (__FRA_MAX - 1)
Christopher Ferris48af7cb2017-02-21 12:35:09 -080079enum {
Christopher Ferris49f525c2016-12-12 14:55:36 -080080 FR_ACT_UNSPEC,
Christopher Ferris106b3a82016-08-24 12:15:38 -070081 FR_ACT_TO_TBL,
Tao Baod7db5942015-01-28 10:07:51 -080082 FR_ACT_GOTO,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080083 FR_ACT_NOP,
Christopher Ferris49f525c2016-12-12 14:55:36 -080084 FR_ACT_RES3,
Christopher Ferris106b3a82016-08-24 12:15:38 -070085 FR_ACT_RES4,
Tao Baod7db5942015-01-28 10:07:51 -080086 FR_ACT_BLACKHOLE,
Christopher Ferris48af7cb2017-02-21 12:35:09 -080087 FR_ACT_UNREACHABLE,
Christopher Ferris49f525c2016-12-12 14:55:36 -080088 FR_ACT_PROHIBIT,
Christopher Ferris106b3a82016-08-24 12:15:38 -070089 __FR_ACT_MAX,
Ben Cheng655a7c02013-10-16 16:09:24 -070090};
Christopher Ferris48af7cb2017-02-21 12:35:09 -080091#define FR_ACT_MAX (__FR_ACT_MAX - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -080092#endif