1 #ifndef _LIBNETFILTER_CTTIMEOUT_H_
2 #define _LIBNETFILTER_CTTIMEOUT_H_
6 #include <linux/netfilter/nfnetlink_conntrack.h>
17 enum nfct_timeout_attr {
18 NFCT_TIMEOUT_ATTR_NAME= 0,
19 NFCT_TIMEOUT_ATTR_L3PROTO,
20 NFCT_TIMEOUT_ATTR_L4PROTO,
21 NFCT_TIMEOUT_ATTR_POLICY,
25 enum nfct_timeout_tcp_attr {
26 NFCT_TIMEOUT_ATTR_TCP_SYN_SENT = 0,
27 NFCT_TIMEOUT_ATTR_TCP_SYN_RECV,
28 NFCT_TIMEOUT_ATTR_TCP_ESTABLISHED,
29 NFCT_TIMEOUT_ATTR_TCP_FIN_WAIT,
30 NFCT_TIMEOUT_ATTR_TCP_CLOSE_WAIT,
31 NFCT_TIMEOUT_ATTR_TCP_LAST_ACK,
32 NFCT_TIMEOUT_ATTR_TCP_TIME_WAIT,
33 NFCT_TIMEOUT_ATTR_TCP_CLOSE,
34 NFCT_TIMEOUT_ATTR_TCP_SYN_SENT2,
35 NFCT_TIMEOUT_ATTR_TCP_RETRANS,
36 NFCT_TIMEOUT_ATTR_TCP_UNACK,
37 NFCT_TIMEOUT_ATTR_TCP_MAX
40 enum nfct_timeout_udp_attr {
41 NFCT_TIMEOUT_ATTR_UDP_UNREPLIED = 0,
42 NFCT_TIMEOUT_ATTR_UDP_REPLIED,
43 NFCT_TIMEOUT_ATTR_UDP_MAX
46 enum nfct_timeout_udplite_attr {
47 NFCT_TIMEOUT_ATTR_UDPLITE_UNREPLIED = 0,
48 NFCT_TIMEOUT_ATTR_UDPLITE_REPLIED,
49 NFCT_TIMEOUT_ATTR_UDPLITE_MAX
52 enum nfct_timeout_dccp_attr {
53 NFCT_TIMEOUT_ATTR_DCCP_REQUEST,
54 NFCT_TIMEOUT_ATTR_DCCP_RESPOND,
55 NFCT_TIMEOUT_ATTR_DCCP_PARTOPEN,
56 NFCT_TIMEOUT_ATTR_DCCP_OPEN,
57 NFCT_TIMEOUT_ATTR_DCCP_CLOSEREQ,
58 NFCT_TIMEOUT_ATTR_DCCP_CLOSING,
59 NFCT_TIMEOUT_ATTR_DCCP_TIMEWAIT,
60 NFCT_TIMEOUT_ATTR_DCCP_MAX
63 enum nfct_timeout_sctp_attr {
64 NFCT_TIMEOUT_ATTR_SCTP_CLOSED = 0,
65 NFCT_TIMEOUT_ATTR_SCTP_COOKIE_WAIT,
66 NFCT_TIMEOUT_ATTR_SCTP_COOKIE_ECHOED,
67 NFCT_TIMEOUT_ATTR_SCTP_ESTABLISHED,
68 NFCT_TIMEOUT_ATTR_SCTP_SHUTDOWN_SENT,
69 NFCT_TIMEOUT_ATTR_SCTP_SHUTDOWN_RECD,
70 NFCT_TIMEOUT_ATTR_SCTP_SHUTDOWN_ACK_SENT,
71 NFCT_TIMEOUT_ATTR_SCTP_MAX
74 enum nfct_timeout_icmp_attr {
75 NFCT_TIMEOUT_ATTR_ICMP = 0,
76 NFCT_TIMEOUT_ATTR_ICMP_MAX
79 enum nfct_timeout_icmpv6_attr {
80 NFCT_TIMEOUT_ATTR_ICMPV6 = 0,
81 NFCT_TIMEOUT_ATTR_ICMPV6_MAX
84 enum nfct_timeout_gre_attr {
85 NFCT_TIMEOUT_ATTR_GRE_UNREPLIED = 0,
86 NFCT_TIMEOUT_ATTR_GRE_REPLIED,
87 NFCT_TIMEOUT_ATTR_GRE_MAX
90 enum nfct_timeout_generic_attr {
91 NFCT_TIMEOUT_ATTR_GENERIC = 0,
92 NFCT_TIMEOUT_ATTR_GENERIC_MAX
111 NFCT_TIMEOUT_O_DEFAULT,
114 int nfct_timeout_snprintf(
char *buf,
size_t size,
const struct nfct_timeout *,
unsigned int type,
unsigned int flags);
int nfct_timeout_snprintf(char *buf, size_t size, const struct nfct_timeout *, unsigned int type, unsigned int flags)
void nfct_timeout_policy_attr_unset(struct nfct_timeout *t, uint32_t type)
void nfct_timeout_free(struct nfct_timeout *)
int nfct_timeout_attr_set_u16(struct nfct_timeout *t, uint32_t type, uint16_t data)
int nfct_timeout_attr_set_u8(struct nfct_timeout *t, uint32_t type, uint8_t data)
void nfct_timeout_attr_unset(struct nfct_timeout *t, uint32_t type)
int nfct_timeout_policy_attr_set_u32(struct nfct_timeout *, uint32_t type, uint32_t data)
struct nfct_timeout * nfct_timeout_alloc(void)
const char * nfct_timeout_policy_attr_to_name(uint8_t l4proto, uint32_t state)
int nfct_timeout_attr_set(struct nfct_timeout *t, uint32_t type, const void *data)
void nfct_timeout_nlmsg_build_payload(struct nlmsghdr *, const struct nfct_timeout *)
int nfct_timeout_nlmsg_parse_payload(const struct nlmsghdr *nlh, struct nfct_timeout *)
struct nlmsghdr * nfct_timeout_nlmsg_build_hdr(char *buf, uint8_t cmd, uint16_t flags, uint32_t seq)