PATH:
usr
/
include
/
linux
/
netfilter
#ifndef _NF_CONNTRACK_COMMON_H #define _NF_CONNTRACK_COMMON_H /* Connection state tracking for netfilter. This is separated from, but required by, the NAT layer; it can also be used by an iptables extension. */ enum ip_conntrack_info { /* Part of an established connection (either direction). */ IP_CT_ESTABLISHED, /* Like NEW, but related to an existing connection, or ICMP error (in either direction). */ IP_CT_RELATED, /* Started a new connection to track (only IP_CT_DIR_ORIGINAL); may be a retransmission. */ IP_CT_NEW, /* >= this indicates reply direction */ IP_CT_IS_REPLY, IP_CT_ESTABLISHED_REPLY = IP_CT_ESTABLISHED + IP_CT_IS_REPLY, IP_CT_RELATED_REPLY = IP_CT_RELATED + IP_CT_IS_REPLY, /* No NEW in reply direction. */ /* Number of distinct IP_CT types. */ IP_CT_NUMBER, /* only for userspace compatibility */ IP_CT_NEW_REPLY = IP_CT_NUMBER, }; #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 << 6) /* Bitset representing status of connection. */ enum ip_conntrack_status { /* It's an expected connection: bit 0 set. This bit never changed */ IPS_EXPECTED_BIT = 0, IPS_EXPECTED = (1 << IPS_EXPECTED_BIT), /* We've seen packets both ways: bit 1 set. Can be set, not unset. */ IPS_SEEN_REPLY_BIT = 1, IPS_SEEN_REPLY = (1 << IPS_SEEN_REPLY_BIT), /* Conntrack should never be early-expired. */ IPS_ASSURED_BIT = 2, IPS_ASSURED = (1 << IPS_ASSURED_BIT), /* Connection is confirmed: originating packet has left box */ IPS_CONFIRMED_BIT = 3, IPS_CONFIRMED = (1 << IPS_CONFIRMED_BIT), /* Connection needs src nat in orig dir. This bit never changed. */ IPS_SRC_NAT_BIT = 4, IPS_SRC_NAT = (1 << IPS_SRC_NAT_BIT), /* Connection needs dst nat in orig dir. This bit never changed. */ IPS_DST_NAT_BIT = 5, IPS_DST_NAT = (1 << IPS_DST_NAT_BIT), /* Both together. */ IPS_NAT_MASK = (IPS_DST_NAT | IPS_SRC_NAT), /* Connection needs TCP sequence adjusted. */ IPS_SEQ_ADJUST_BIT = 6, IPS_SEQ_ADJUST = (1 << IPS_SEQ_ADJUST_BIT), /* NAT initialization bits. */ IPS_SRC_NAT_DONE_BIT = 7, IPS_SRC_NAT_DONE = (1 << IPS_SRC_NAT_DONE_BIT), IPS_DST_NAT_DONE_BIT = 8, IPS_DST_NAT_DONE = (1 << IPS_DST_NAT_DONE_BIT), /* Both together */ IPS_NAT_DONE_MASK = (IPS_DST_NAT_DONE | IPS_SRC_NAT_DONE), /* Connection is dying (removed from lists), can not be unset. */ IPS_DYING_BIT = 9, IPS_DYING = (1 << IPS_DYING_BIT), /* Connection has fixed timeout. */ IPS_FIXED_TIMEOUT_BIT = 10, IPS_FIXED_TIMEOUT = (1 << IPS_FIXED_TIMEOUT_BIT), /* Conntrack is a template */ IPS_TEMPLATE_BIT = 11, IPS_TEMPLATE = (1 << IPS_TEMPLATE_BIT), /* 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), /* 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_MAX_BIT = 14, }; /* Connection tracking event types */ enum ip_conntrack_events { IPCT_NEW, /* new conntrack */ IPCT_RELATED, /* related conntrack */ IPCT_DESTROY, /* destroyed conntrack */ IPCT_REPLY, /* connection has seen two-way traffic */ IPCT_ASSURED, /* connection status has changed to assured */ IPCT_PROTOINFO, /* protocol information has changed */ IPCT_HELPER, /* new helper has been set */ IPCT_MARK, /* new mark has been set */ IPCT_SEQADJ, /* sequence adjustment has changed */ IPCT_NATSEQADJ = IPCT_SEQADJ, IPCT_SECMARK, /* new security mark has been set */ IPCT_LABEL, /* new connlabel has been set */ }; enum ip_conntrack_expect_events { IPEXP_NEW, /* new expectation */ IPEXP_DESTROY, /* destroyed expectation */ }; /* expectation flags */ #define NF_CT_EXPECT_PERMANENT 0x1 #define NF_CT_EXPECT_INACTIVE 0x2 #define NF_CT_EXPECT_USERSPACE 0x4 #endif /* _NF_CONNTRACK_COMMON_H */
[-] xt_helper.h
[edit]
[-] xt_HMARK.h
[edit]
[-] xt_time.h
[edit]
[-] xt_dccp.h
[edit]
[-] xt_IDLETIMER.h
[edit]
[-] xt_recent.h
[edit]
[-] nfnetlink_acct.h
[edit]
[-] xt_mac.h
[edit]
[-] xt_rateest.h
[edit]
[-] x_tables.h
[edit]
[-] xt_mark.h
[edit]
[-] xt_devgroup.h
[edit]
[-] xt_connlimit.h
[edit]
[-] nf_conntrack_ftp.h
[edit]
[-] nfnetlink_cthelper.h
[edit]
[+]
..
[-] xt_u32.h
[edit]
[-] xt_rpfilter.h
[edit]
[-] nf_tables_compat.h
[edit]
[-] xt_policy.h
[edit]
[-] xt_CLASSIFY.h
[edit]
[-] xt_quota.h
[edit]
[-] xt_TCPOPTSTRIP.h
[edit]
[-] xt_comment.h
[edit]
[-] xt_sctp.h
[edit]
[-] xt_tcpudp.h
[edit]
[-] xt_tcpmss.h
[edit]
[-] xt_nfacct.h
[edit]
[-] xt_TCPMSS.h
[edit]
[-] xt_length.h
[edit]
[-] xt_connlabel.h
[edit]
[-] xt_cpu.h
[edit]
[-] xt_osf.h
[edit]
[-] xt_bpf.h
[edit]
[-] xt_hashlimit.h
[edit]
[-] xt_NFLOG.h
[edit]
[-] nfnetlink_conntrack.h
[edit]
[-] xt_AUDIT.h
[edit]
[-] xt_pkttype.h
[edit]
[-] xt_set.h
[edit]
[-] xt_string.h
[edit]
[-] xt_ipvs.h
[edit]
[-] xt_socket.h
[edit]
[-] nf_tables.h
[edit]
[-] xt_CONNSECMARK.h
[edit]
[-] xt_CONNMARK.h
[edit]
[-] xt_NFQUEUE.h
[edit]
[-] nf_nat.h
[edit]
[-] xt_connbytes.h
[edit]
[-] xt_addrtype.h
[edit]
[-] nfnetlink_log.h
[edit]
[-] xt_LED.h
[edit]
[-] xt_LOG.h
[edit]
[-] xt_physdev.h
[edit]
[-] xt_state.h
[edit]
[-] xt_realm.h
[edit]
[-] xt_SECMARK.h
[edit]
[-] xt_ecn.h
[edit]
[-] xt_cluster.h
[edit]
[+]
ipset
[-] xt_connmark.h
[edit]
[-] xt_esp.h
[edit]
[-] xt_TEE.h
[edit]
[-] xt_owner.h
[edit]
[-] nfnetlink_compat.h
[edit]
[-] xt_cgroup.h
[edit]
[-] xt_CHECKSUM.h
[edit]
[-] xt_TPROXY.h
[edit]
[-] xt_CT.h
[edit]
[-] nf_conntrack_tcp.h
[edit]
[-] xt_iprange.h
[edit]
[-] nf_conntrack_sctp.h
[edit]
[-] xt_DSCP.h
[edit]
[-] nf_conntrack_common.h
[edit]
[-] xt_MARK.h
[edit]
[-] nfnetlink.h
[edit]
[-] xt_conntrack.h
[edit]
[-] nfnetlink_cttimeout.h
[edit]
[-] xt_limit.h
[edit]
[-] xt_RATEEST.h
[edit]
[-] nfnetlink_queue.h
[edit]
[-] nf_conntrack_tuple_common.h
[edit]
[-] xt_dscp.h
[edit]
[-] xt_statistic.h
[edit]
[-] xt_multiport.h
[edit]