1 #ifndef _NF_CONNTRACK_FTP_H
2 #define _NF_CONNTRACK_FTP_H
5 /* This enum is exposed to userspace */
7 /* PORT command from client */
9 /* PASV response from server */
11 /* EPRT command from client */
13 /* EPSV response from server */
21 #define NF_CT_FTP_SEQ_PICKUP (1 << 0)
23 #define NUM_SEQ_TO_REMEMBER 2
24 /* This structure exists only once per master */
25 struct nf_ct_ftp_master {
26 /* Valid seq positions for cmd matching after newline */
27 u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER];
28 /* 0 means seq_match_aft_nl not set */
29 u_int16_t seq_aft_nl_num[IP_CT_DIR_MAX];
30 /* pickup sequence tracking, useful for conntrackd */
31 u_int16_t flags[IP_CT_DIR_MAX];
34 struct nf_conntrack_expect;
36 /* For NAT to hook in when we find a packet which describes what other
37 * connection we should expect. */
38 extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
39 enum ip_conntrack_info ctinfo,
40 enum nf_ct_ftp_type type,
42 unsigned int matchoff,
43 unsigned int matchlen,
44 struct nf_conntrack_expect *exp);
45 #endif /* __KERNEL__ */
47 #endif /* _NF_CONNTRACK_FTP_H */