Home | History | Annotate | Download | only in netfilter
      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 _XT_POLICY_H
     20 #define _XT_POLICY_H
     21 #include <linux/types.h>
     22 #include <linux/in.h>
     23 #include <linux/in6.h>
     24 #define XT_POLICY_MAX_ELEM 4
     25 enum xt_policy_flags {
     26   XT_POLICY_MATCH_IN = 0x1,
     27   XT_POLICY_MATCH_OUT = 0x2,
     28   XT_POLICY_MATCH_NONE = 0x4,
     29   XT_POLICY_MATCH_STRICT = 0x8,
     30 };
     31 enum xt_policy_modes {
     32   XT_POLICY_MODE_TRANSPORT,
     33   XT_POLICY_MODE_TUNNEL
     34 };
     35 struct xt_policy_spec {
     36   __u8 saddr : 1, daddr : 1, proto : 1, mode : 1, spi : 1, reqid : 1;
     37 };
     38 union xt_policy_addr {
     39   struct in_addr a4;
     40   struct in6_addr a6;
     41 };
     42 struct xt_policy_elem {
     43   union {
     44     struct {
     45       union xt_policy_addr saddr;
     46       union xt_policy_addr smask;
     47       union xt_policy_addr daddr;
     48       union xt_policy_addr dmask;
     49     };
     50   };
     51   __be32 spi;
     52   __u32 reqid;
     53   __u8 proto;
     54   __u8 mode;
     55   struct xt_policy_spec match;
     56   struct xt_policy_spec invert;
     57 };
     58 struct xt_policy_info {
     59   struct xt_policy_elem pol[XT_POLICY_MAX_ELEM];
     60   __u16 flags;
     61   __u16 len;
     62 };
     63 #endif
     64