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