1 #ifndef _IP_CONNTRACK_FTP_H
2 #define _IP_CONNTRACK_FTP_H
7 #include <linux/netfilter_ipv4/lockhelp.h>
9 /* Protects ftp part of conntracks */
10 DECLARE_LOCK_EXTERN(ip_ftp_lock);
14 #endif /* __KERNEL__ */
18 /* PORT command from client */
20 /* PASV response from server */
22 /* EPRT command from client */
24 /* EPSV response from server */
28 /* This structure is per expected connection */
29 struct ip_ct_ftp_expect
31 /* We record seq number and length of ftp ip/port text here: all in
34 /* sequence number of IP address in packet is in ip_conntrack_expect */
35 u_int32_t len; /* length of IP address */
36 enum ip_ct_ftp_type ftptype; /* PORT or PASV ? */
37 u_int16_t port; /* TCP port that was to be used */
40 /* This structure exists only once per master */
41 struct ip_ct_ftp_master {
42 /* Next valid seq position for cmd matching after newline */
43 u_int32_t seq_aft_nl[IP_CT_DIR_MAX];
44 /* 0 means seq_match_aft_nl not set */
45 int seq_aft_nl_set[IP_CT_DIR_MAX];
48 #endif /* _IP_CONNTRACK_FTP_H */