xt_policy.h revision d7db594b8d1dab36b711bd887a9dd21675c87243
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#define XT_POLICY_MAX_ELEM 4 23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24enum xt_policy_flags { 25 XT_POLICY_MATCH_IN = 0x1, 26 XT_POLICY_MATCH_OUT = 0x2, 27 XT_POLICY_MATCH_NONE = 0x4, 28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 XT_POLICY_MATCH_STRICT = 0x8, 30}; 31enum xt_policy_modes { 32 XT_POLICY_MODE_TRANSPORT, 33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 XT_POLICY_MODE_TUNNEL 35}; 36struct xt_policy_spec { 37 __u8 saddr : 1, daddr : 1, proto : 1, mode : 1, spi : 1, reqid : 1; 38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39}; 40union xt_policy_addr { 41 struct in_addr a4; 42 struct in6_addr a6; 43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44}; 45struct xt_policy_elem { 46 union { 47 struct { 48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 union xt_policy_addr saddr; 50 union xt_policy_addr smask; 51 union xt_policy_addr daddr; 52 union xt_policy_addr dmask; 53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 }; 55 }; 56 __be32 spi; 57 __u32 reqid; 58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 __u8 proto; 60 __u8 mode; 61 struct xt_policy_spec match; 62 struct xt_policy_spec invert; 63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64}; 65struct xt_policy_info { 66 struct xt_policy_elem pol[XT_POLICY_MAX_ELEM]; 67 __u16 flags; 68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 __u16 len; 70}; 71#endif 72