1 #ifndef _NF_NAT_HELPER_H
2 #define _NF_NAT_HELPER_H
3 /* NAT protocol helper routines. */
5 #include <net/netfilter/nf_conntrack.h>
9 /* These return true or false. */
10 extern int __nf_nat_mangle_tcp_packet(struct sk_buff
*skb
,
12 enum ip_conntrack_info ctinfo
,
14 unsigned int match_offset
,
15 unsigned int match_len
,
16 const char *rep_buffer
,
17 unsigned int rep_len
, bool adjust
);
19 static inline int nf_nat_mangle_tcp_packet(struct sk_buff
*skb
,
21 enum ip_conntrack_info ctinfo
,
23 unsigned int match_offset
,
24 unsigned int match_len
,
25 const char *rep_buffer
,
28 return __nf_nat_mangle_tcp_packet(skb
, ct
, ctinfo
, protoff
,
29 match_offset
, match_len
,
30 rep_buffer
, rep_len
, true);
33 extern int nf_nat_mangle_udp_packet(struct sk_buff
*skb
,
35 enum ip_conntrack_info ctinfo
,
37 unsigned int match_offset
,
38 unsigned int match_len
,
39 const char *rep_buffer
,
40 unsigned int rep_len
);
42 /* Setup NAT on this expected conntrack so it follows master, but goes
43 * to port ct->master->saved_proto. */
44 extern void nf_nat_follow_master(struct nf_conn
*ct
,
45 struct nf_conntrack_expect
*this);
This page took 0.030638 seconds and 5 git commands to generate.