git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
include
/
linux
/
netfilter_ipv4
/
ip_nat_protocol.h
diff --git
a/include/linux/netfilter_ipv4/ip_nat_protocol.h
b/include/linux/netfilter_ipv4/ip_nat_protocol.h
index
129708c
..
612a436
100644
(file)
--- a/
include/linux/netfilter_ipv4/ip_nat_protocol.h
+++ b/
include/linux/netfilter_ipv4/ip_nat_protocol.h
@@
-4,6
+4,9
@@
#include <linux/init.h>
#include <linux/list.h>
#include <linux/init.h>
#include <linux/list.h>
+#include <linux/netfilter_ipv4/ip_nat.h>
+#include <linux/netfilter/nfnetlink_conntrack.h>
+
struct iphdr;
struct ip_nat_range;
struct iphdr;
struct ip_nat_range;
@@
-15,6
+18,8
@@
struct ip_nat_protocol
/* Protocol number. */
unsigned int protonum;
/* Protocol number. */
unsigned int protonum;
+ struct module *me;
+
/* Translate a packet to the target according to manip type.
Return true if succeeded. */
int (*manip_pkt)(struct sk_buff **pskb,
/* Translate a packet to the target according to manip type.
Return true if succeeded. */
int (*manip_pkt)(struct sk_buff **pskb,
@@
-37,25
+42,19
@@
struct ip_nat_protocol
enum ip_nat_manip_type maniptype,
const struct ip_conntrack *conntrack);
enum ip_nat_manip_type maniptype,
const struct ip_conntrack *conntrack);
- unsigned int (*print)(char *buffer,
- const struct ip_conntrack_tuple *match,
- const struct ip_conntrack_tuple *mask);
+ int (*range_to_nfattr)(struct sk_buff *skb,
+ const struct ip_nat_range *range);
-
unsigned int (*print_range)(char *buffer
,
-
const
struct ip_nat_range *range);
+
int (*nfattr_to_range)(struct nfattr *tb[]
,
+ struct ip_nat_range *range);
};
};
-#define MAX_IP_NAT_PROTO 256
-extern struct ip_nat_protocol *ip_nat_protos[MAX_IP_NAT_PROTO];
-
/* Protocol registration. */
extern int ip_nat_protocol_register(struct ip_nat_protocol *proto);
extern void ip_nat_protocol_unregister(struct ip_nat_protocol *proto);
/* Protocol registration. */
extern int ip_nat_protocol_register(struct ip_nat_protocol *proto);
extern void ip_nat_protocol_unregister(struct ip_nat_protocol *proto);
-static inline struct ip_nat_protocol *ip_nat_find_proto(u_int8_t protocol)
-{
- return ip_nat_protos[protocol];
-}
+extern struct ip_nat_protocol *ip_nat_proto_find_get(u_int8_t protocol);
+extern void ip_nat_proto_put(struct ip_nat_protocol *proto);
/* Built-in protocols. */
extern struct ip_nat_protocol ip_nat_protocol_tcp;
/* Built-in protocols. */
extern struct ip_nat_protocol ip_nat_protocol_tcp;
@@
-67,4
+66,9
@@
extern int init_protocols(void) __init;
extern void cleanup_protocols(void);
extern struct ip_nat_protocol *find_nat_proto(u_int16_t protonum);
extern void cleanup_protocols(void);
extern struct ip_nat_protocol *find_nat_proto(u_int16_t protonum);
+extern int ip_nat_port_range_to_nfattr(struct sk_buff *skb,
+ const struct ip_nat_range *range);
+extern int ip_nat_port_nfattr_to_range(struct nfattr *tb[],
+ struct ip_nat_range *range);
+
#endif /*_IP_NAT_PROTO_H*/
#endif /*_IP_NAT_PROTO_H*/