OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / prebuilt / ndk / android-ndk-r4 / platforms / android-5 / arch-arm / usr / include / linux / netfilter_ipv4 / ip_conntrack_tuple.h
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  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _IP_CONNTRACK_TUPLE_H
13 #define _IP_CONNTRACK_TUPLE_H
14
15 #include <linux/types.h>
16 #include <linux/netfilter/nf_conntrack_tuple_common.h>
17
18 union ip_conntrack_manip_proto
19 {
20
21  u_int16_t all;
22
23  struct {
24  __be16 port;
25  } tcp;
26  struct {
27  u_int16_t port;
28  } udp;
29  struct {
30  u_int16_t id;
31  } icmp;
32  struct {
33  u_int16_t port;
34  } sctp;
35  struct {
36  __be16 key;
37  } gre;
38 };
39
40 struct ip_conntrack_manip
41 {
42  u_int32_t ip;
43  union ip_conntrack_manip_proto u;
44 };
45
46 struct ip_conntrack_tuple
47 {
48  struct ip_conntrack_manip src;
49
50  struct {
51  u_int32_t ip;
52  union {
53
54  u_int16_t all;
55
56  struct {
57  u_int16_t port;
58  } tcp;
59  struct {
60  u_int16_t port;
61  } udp;
62  struct {
63  u_int8_t type, code;
64  } icmp;
65  struct {
66  u_int16_t port;
67  } sctp;
68  struct {
69  __be16 key;
70  } gre;
71  } u;
72
73  u_int8_t protonum;
74
75  u_int8_t dir;
76  } dst;
77 };
78
79 #define IP_CT_TUPLE_U_BLANK(tuple)   do {   (tuple)->src.u.all = 0;   (tuple)->dst.u.all = 0;   } while (0)
80
81 #endif