xt_hashlimit.h revision 6a9755d20a995756487bb1aafb7e954f4fd868a7
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 _UAPI_XT_HASHLIMIT_H
20#define _UAPI_XT_HASHLIMIT_H
21#include <linux/types.h>
22#include <linux/if.h>
23/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24#define XT_HASHLIMIT_SCALE 10000
25#define XT_HASHLIMIT_SCALE_v2 1000000llu
26#define XT_HASHLIMIT_BYTE_SHIFT 4
27struct xt_hashlimit_htable;
28/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29enum {
30  XT_HASHLIMIT_HASH_DIP = 1 << 0,
31  XT_HASHLIMIT_HASH_DPT = 1 << 1,
32  XT_HASHLIMIT_HASH_SIP = 1 << 2,
33/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34  XT_HASHLIMIT_HASH_SPT = 1 << 3,
35  XT_HASHLIMIT_INVERT = 1 << 4,
36  XT_HASHLIMIT_BYTES = 1 << 5,
37};
38/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39struct hashlimit_cfg {
40  __u32 mode;
41  __u32 avg;
42  __u32 burst;
43/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44  __u32 size;
45  __u32 max;
46  __u32 gc_interval;
47  __u32 expire;
48/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49};
50struct xt_hashlimit_info {
51  char name[IFNAMSIZ];
52  struct hashlimit_cfg cfg;
53/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54  struct xt_hashlimit_htable * hinfo;
55  union {
56    void * ptr;
57    struct xt_hashlimit_info * master;
58/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59  } u;
60};
61struct hashlimit_cfg1 {
62  __u32 mode;
63/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64  __u32 avg;
65  __u32 burst;
66  __u32 size;
67  __u32 max;
68/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
69  __u32 gc_interval;
70  __u32 expire;
71  __u8 srcmask, dstmask;
72};
73/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
74struct hashlimit_cfg2 {
75  __u64 avg;
76  __u64 burst;
77  __u32 mode;
78/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
79  __u32 size;
80  __u32 max;
81  __u32 gc_interval;
82  __u32 expire;
83/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
84  __u8 srcmask, dstmask;
85};
86struct xt_hashlimit_mtinfo1 {
87  char name[IFNAMSIZ];
88/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
89  struct hashlimit_cfg1 cfg;
90  struct xt_hashlimit_htable * hinfo __attribute__((aligned(8)));
91};
92struct xt_hashlimit_mtinfo2 {
93/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
94  char name[NAME_MAX];
95  struct hashlimit_cfg2 cfg;
96  struct xt_hashlimit_htable * hinfo __attribute__((aligned(8)));
97};
98/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
99#endif
100