diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/conntrack.h | 7 | ||||
-rw-r--r-- | include/linux/netfilter/nf_conntrack_common.h | 24 |
2 files changed, 26 insertions, 5 deletions
diff --git a/include/conntrack.h b/include/conntrack.h index 6659a64..37ccf6e 100644 --- a/include/conntrack.h +++ b/include/conntrack.h @@ -3,7 +3,6 @@ #include "linux_list.h" #include <stdint.h> -#include <libnetfilter_conntrack/libnetfilter_conntrack.h> #define PROGNAME "conntrack" @@ -12,6 +11,8 @@ #define NUMBER_OF_CMD 19 #define NUMBER_OF_OPT 29 +struct nf_conntrack; + struct ctproto_handler { struct list_head head; @@ -19,8 +20,8 @@ struct ctproto_handler { uint16_t protonum; const char *version; - enum ctattr_protoinfo protoinfo_attr; - + uint32_t protoinfo_attr; + int (*parse_opts)(char c, struct nf_conntrack *ct, struct nf_conntrack *exptuple, diff --git a/include/linux/netfilter/nf_conntrack_common.h b/include/linux/netfilter/nf_conntrack_common.h index 4cf003f..8023e5b 100644 --- a/include/linux/netfilter/nf_conntrack_common.h +++ b/include/linux/netfilter/nf_conntrack_common.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _NF_CONNTRACK_COMMON_H #define _NF_CONNTRACK_COMMON_H /* Connection state tracking for netfilter. This is separated from, @@ -28,12 +29,14 @@ enum ip_conntrack_info { /* only for userspace compatibility */ #ifndef __KERNEL__ IP_CT_NEW_REPLY = IP_CT_NUMBER, +#else + IP_CT_UNTRACKED = 7, #endif }; #define NF_CT_STATE_INVALID_BIT (1 << 0) #define NF_CT_STATE_BIT(ctinfo) (1 << ((ctinfo) % IP_CT_IS_REPLY + 1)) -#define NF_CT_STATE_UNTRACKED_BIT (1 << (IP_CT_NUMBER + 1)) +#define NF_CT_STATE_UNTRACKED_BIT (1 << 6) /* Bitset representing status of connection. */ enum ip_conntrack_status { @@ -90,13 +93,26 @@ enum ip_conntrack_status { IPS_TEMPLATE_BIT = 11, IPS_TEMPLATE = (1 << IPS_TEMPLATE_BIT), - /* Conntrack is a fake untracked entry */ + /* Conntrack is a fake untracked entry. Obsolete and not used anymore */ IPS_UNTRACKED_BIT = 12, IPS_UNTRACKED = (1 << IPS_UNTRACKED_BIT), /* Conntrack got a helper explicitly attached via CT target. */ IPS_HELPER_BIT = 13, IPS_HELPER = (1 << IPS_HELPER_BIT), + + /* Conntrack has been offloaded to flow table. */ + IPS_OFFLOAD_BIT = 14, + IPS_OFFLOAD = (1 << IPS_OFFLOAD_BIT), + + /* Be careful here, modifying these bits can make things messy, + * so don't let users modify them directly. + */ + IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK | IPS_NAT_MASK | + IPS_EXPECTED | IPS_CONFIRMED | IPS_DYING | + IPS_SEQ_ADJUST | IPS_TEMPLATE | IPS_OFFLOAD), + + __IPS_MAX_BIT = 15, }; /* Connection tracking event types */ @@ -113,6 +129,10 @@ enum ip_conntrack_events { IPCT_NATSEQADJ = IPCT_SEQADJ, IPCT_SECMARK, /* new security mark has been set */ IPCT_LABEL, /* new connlabel has been set */ + IPCT_SYNPROXY, /* synproxy has been set */ +#ifdef __KERNEL__ + __IPCT_MAX +#endif }; enum ip_conntrack_expect_events { |