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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _XT_CONNTRACK_H
     13 #define _XT_CONNTRACK_H
     14 
     15 #include <linux/netfilter/nf_conntrack_tuple_common.h>
     16 #include <linux/in.h>
     17 
     18 #define XT_CONNTRACK_STATE_BIT(ctinfo) (1 << ((ctinfo)%IP_CT_IS_REPLY+1))
     19 #define XT_CONNTRACK_STATE_INVALID (1 << 0)
     20 
     21 #define XT_CONNTRACK_STATE_SNAT (1 << (IP_CT_NUMBER + 1))
     22 #define XT_CONNTRACK_STATE_DNAT (1 << (IP_CT_NUMBER + 2))
     23 #define XT_CONNTRACK_STATE_UNTRACKED (1 << (IP_CT_NUMBER + 3))
     24 
     25 #define XT_CONNTRACK_STATE 0x01
     26 #define XT_CONNTRACK_PROTO 0x02
     27 #define XT_CONNTRACK_ORIGSRC 0x04
     28 #define XT_CONNTRACK_ORIGDST 0x08
     29 #define XT_CONNTRACK_REPLSRC 0x10
     30 #define XT_CONNTRACK_REPLDST 0x20
     31 #define XT_CONNTRACK_STATUS 0x40
     32 #define XT_CONNTRACK_EXPIRES 0x80
     33 
     34 struct ip_conntrack_old_tuple
     35 {
     36  struct {
     37  __u32 ip;
     38  union {
     39  __u16 all;
     40  } u;
     41  } src;
     42 
     43  struct {
     44  __u32 ip;
     45  union {
     46  __u16 all;
     47  } u;
     48 
     49  __u16 protonum;
     50  } dst;
     51 };
     52 
     53 struct xt_conntrack_info
     54 {
     55  unsigned int statemask, statusmask;
     56 
     57  struct ip_conntrack_old_tuple tuple[IP_CT_DIR_MAX];
     58  struct in_addr sipmsk[IP_CT_DIR_MAX], dipmsk[IP_CT_DIR_MAX];
     59 
     60  unsigned long expires_min, expires_max;
     61 
     62  u_int8_t flags;
     63 
     64  u_int8_t invflags;
     65 };
     66 #endif
     67