patch-2.4.20 linux-2.4.20/include/linux/netfilter_ipv4/ip_nat_helper.h
Next file: linux-2.4.20/include/linux/netfilter_ipv4/ip_nat_rule.h
Previous file: linux-2.4.20/include/linux/netfilter_ipv4/ip_nat.h
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Thu Nov 28 15:53:15 2002
- Orig file:
linux-2.4.19/include/linux/netfilter_ipv4/ip_nat_helper.h
- Orig date:
Wed Apr 25 15:00:28 2001
diff -urN linux-2.4.19/include/linux/netfilter_ipv4/ip_nat_helper.h linux-2.4.20/include/linux/netfilter_ipv4/ip_nat_helper.h
@@ -6,23 +6,37 @@
struct sk_buff;
+/* Flags */
+/* NAT helper must be called on every packet (for TCP) */
+#define IP_NAT_HELPER_F_ALWAYS 0x01
+/* Standalone NAT helper, without a conntrack part */
+#define IP_NAT_HELPER_F_STANDALONE 0x02
+
struct ip_nat_helper
{
- /* Internal use */
- struct list_head list;
+ struct list_head list; /* Internal use */
+ const char *name; /* name of the module */
+ unsigned char flags; /* Flags (see above) */
+ struct module *me; /* pointer to self */
+
/* Mask of things we will help: vs. tuple from server */
struct ip_conntrack_tuple tuple;
struct ip_conntrack_tuple mask;
/* Helper function: returns verdict */
unsigned int (*help)(struct ip_conntrack *ct,
+ struct ip_conntrack_expect *exp,
struct ip_nat_info *info,
enum ip_conntrack_info ctinfo,
unsigned int hooknum,
struct sk_buff **pskb);
- const char *name;
+ /* Returns verdict and sets up NAT for this connection */
+ unsigned int (*expect)(struct sk_buff **pskb,
+ unsigned int hooknum,
+ struct ip_conntrack *ct,
+ struct ip_nat_info *info);
};
extern struct list_head helpers;
@@ -39,5 +53,5 @@
extern int ip_nat_seq_adjust(struct sk_buff *skb,
struct ip_conntrack *ct,
enum ip_conntrack_info ctinfo);
-extern void ip_nat_delete_sack(struct sk_buff *skb, struct tcphdr *tcph);
+extern void ip_nat_delete_sack(struct sk_buff *skb);
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)