Home | History | Annotate | Download | only in linux
      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>
     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
     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 {
     31   __u8 family;
     32   __u8 dst_len;
     33   __u8 src_len;
     34   __u8 tos;
     35   __u8 table;
     36   __u8 res1;
     37   __u8 res2;
     38   __u8 action;
     39   __u32 flags;
     40 };
     41 struct fib_rule_uid_range {
     42   __u32 start;
     43   __u32 end;
     44 };
     45 struct fib_rule_port_range {
     46   __u16 start;
     47   __u16 end;
     48 };
     49 enum {
     50   FRA_UNSPEC,
     51   FRA_DST,
     52   FRA_SRC,
     53   FRA_IIFNAME,
     54 #define FRA_IFNAME FRA_IIFNAME
     55   FRA_GOTO,
     56   FRA_UNUSED2,
     57   FRA_PRIORITY,
     58   FRA_UNUSED3,
     59   FRA_UNUSED4,
     60   FRA_UNUSED5,
     61   FRA_FWMARK,
     62   FRA_FLOW,
     63   FRA_TUN_ID,
     64   FRA_SUPPRESS_IFGROUP,
     65   FRA_SUPPRESS_PREFIXLEN,
     66   FRA_TABLE,
     67   FRA_FWMASK,
     68   FRA_OIFNAME,
     69   FRA_PAD,
     70   FRA_L3MDEV,
     71   FRA_UID_RANGE,
     72   FRA_PROTOCOL,
     73   FRA_IP_PROTO,
     74   FRA_SPORT_RANGE,
     75   FRA_DPORT_RANGE,
     76   __FRA_MAX
     77 };
     78 #define FRA_MAX (__FRA_MAX - 1)
     79 enum {
     80   FR_ACT_UNSPEC,
     81   FR_ACT_TO_TBL,
     82   FR_ACT_GOTO,
     83   FR_ACT_NOP,
     84   FR_ACT_RES3,
     85   FR_ACT_RES4,
     86   FR_ACT_BLACKHOLE,
     87   FR_ACT_UNREACHABLE,
     88   FR_ACT_PROHIBIT,
     89   __FR_ACT_MAX,
     90 };
     91 #define FR_ACT_MAX (__FR_ACT_MAX - 1)
     92 #endif
     93