1 #ifndef _IP_CONNTRACK_FTP_H 2 #define _IP_CONNTRACK_FTP_H 3 /* FTP tracking. */ 4 5 #ifdef __KERNEL__ 6 7 #define FTP_PORT 21 8 9 #endif /* __KERNEL__ */ 10 11 enum ip_ct_ftp_type 12 { 13 /* PORT command from client */ 14 IP_CT_FTP_PORT, 15 /* PASV response from server */ 16 IP_CT_FTP_PASV, 17 /* EPRT command from client */ 18 IP_CT_FTP_EPRT, 19 /* EPSV response from server */ 20 IP_CT_FTP_EPSV, 21 }; 22 23 /* This structure is per expected connection */ 24 struct ip_ct_ftp_expect 25 { 26 /* We record seq number and length of ftp ip/port text here: all in 27 * host order. */ 28 29 /* sequence number of IP address in packet is in ip_conntrack_expect */ 30 u_int32_t len; /* length of IP address */ 31 enum ip_ct_ftp_type ftptype; /* PORT or PASV ? */ 32 u_int16_t port; /* TCP port that was to be used */ 33 }; 34 35 /* This structure exists only once per master */ 36 struct ip_ct_ftp_master { 37 /* Next valid seq position for cmd matching after newline */ 38 u_int32_t seq_aft_nl[IP_CT_DIR_MAX]; 39 /* 0 means seq_match_aft_nl not set */ 40 int seq_aft_nl_set[IP_CT_DIR_MAX]; 41 }; 42 43 #endif /* _IP_CONNTRACK_FTP_H */ 44