]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/linux/netfilter/nf_conntrack_ftp.h
[NETFILTER]: Replace sk_buff ** with sk_buff *
[net-next-2.6.git] / include / linux / netfilter / nf_conntrack_ftp.h
CommitLineData
9fb9cbb1
YK
1#ifndef _NF_CONNTRACK_FTP_H
2#define _NF_CONNTRACK_FTP_H
3/* FTP tracking. */
4
5/* This enum is exposed to userspace */
55a73324 6enum nf_ct_ftp_type
9fb9cbb1
YK
7{
8 /* PORT command from client */
55a73324 9 NF_CT_FTP_PORT,
9fb9cbb1 10 /* PASV response from server */
55a73324 11 NF_CT_FTP_PASV,
9fb9cbb1 12 /* EPRT command from client */
55a73324 13 NF_CT_FTP_EPRT,
9fb9cbb1 14 /* EPSV response from server */
55a73324 15 NF_CT_FTP_EPSV,
9fb9cbb1
YK
16};
17
18#ifdef __KERNEL__
19
20#define FTP_PORT 21
21
22#define NUM_SEQ_TO_REMEMBER 2
23/* This structure exists only once per master */
55a73324 24struct nf_ct_ftp_master {
9fb9cbb1
YK
25 /* Valid seq positions for cmd matching after newline */
26 u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER];
27 /* 0 means seq_match_aft_nl not set */
28 int seq_aft_nl_num[IP_CT_DIR_MAX];
29};
30
55a73324 31struct nf_conntrack_expect;
9fb9cbb1
YK
32
33/* For NAT to hook in when we find a packet which describes what other
34 * connection we should expect. */
3db05fea 35extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
9fb9cbb1 36 enum ip_conntrack_info ctinfo,
55a73324 37 enum nf_ct_ftp_type type,
9fb9cbb1
YK
38 unsigned int matchoff,
39 unsigned int matchlen,
25b86e05 40 struct nf_conntrack_expect *exp);
9fb9cbb1
YK
41#endif /* __KERNEL__ */
42
43#endif /* _NF_CONNTRACK_FTP_H */