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 _NF_CONNTRACK_TUPLE_COMMON_H
20 #define _NF_CONNTRACK_TUPLE_COMMON_H
21 #include <linux/types.h>
22 #include <linux/netfilter.h>
23 #include <linux/netfilter/nf_conntrack_common.h>
24 enum ip_conntrack_dir {
25   IP_CT_DIR_ORIGINAL,
26   IP_CT_DIR_REPLY,
27   IP_CT_DIR_MAX
28 };
29 union nf_conntrack_man_proto {
30   __be16 all;
31   struct {
32     __be16 port;
33   } tcp;
34   struct {
35     __be16 port;
36   } udp;
37   struct {
38     __be16 id;
39   } icmp;
40   struct {
41     __be16 port;
42   } dccp;
43   struct {
44     __be16 port;
45   } sctp;
46   struct {
47     __be16 key;
48   } gre;
49 };
50 #define CTINFO2DIR(ctinfo) ((ctinfo) >= IP_CT_IS_REPLY ? IP_CT_DIR_REPLY : IP_CT_DIR_ORIGINAL)
51 #endif
52