Linux 4.14-rc6
[linux-2.6-block.git] / include / linux / netfilter / nf_conntrack_ftp.h
CommitLineData
9fb9cbb1
YK
1#ifndef _NF_CONNTRACK_FTP_H
2#define _NF_CONNTRACK_FTP_H
9fb9cbb1 3
94d0ec58 4#include <uapi/linux/netfilter/nf_conntrack_ftp.h>
9fb9cbb1 5
9fb9cbb1
YK
6
7#define FTP_PORT 21
8
7be54ca4
PNA
9#define NF_CT_FTP_SEQ_PICKUP (1 << 0)
10
9fb9cbb1
YK
11#define NUM_SEQ_TO_REMEMBER 2
12/* This structure exists only once per master */
55a73324 13struct nf_ct_ftp_master {
9fb9cbb1
YK
14 /* Valid seq positions for cmd matching after newline */
15 u_int32_t seq_aft_nl[IP_CT_DIR_MAX][NUM_SEQ_TO_REMEMBER];
16 /* 0 means seq_match_aft_nl not set */
7be54ca4
PNA
17 u_int16_t seq_aft_nl_num[IP_CT_DIR_MAX];
18 /* pickup sequence tracking, useful for conntrackd */
19 u_int16_t flags[IP_CT_DIR_MAX];
9fb9cbb1
YK
20};
21
55a73324 22struct nf_conntrack_expect;
9fb9cbb1
YK
23
24/* For NAT to hook in when we find a packet which describes what other
25 * connection we should expect. */
3db05fea 26extern unsigned int (*nf_nat_ftp_hook)(struct sk_buff *skb,
9fb9cbb1 27 enum ip_conntrack_info ctinfo,
55a73324 28 enum nf_ct_ftp_type type,
051966c0 29 unsigned int protoff,
9fb9cbb1
YK
30 unsigned int matchoff,
31 unsigned int matchlen,
25b86e05 32 struct nf_conntrack_expect *exp);
9fb9cbb1 33#endif /* _NF_CONNTRACK_FTP_H */