patch-2.1.124 linux/include/net/ip_masq_mod.h
Next file: linux/include/net/ip_portfw.h
Previous file: linux/include/net/ip_masq.h
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Sun Oct 4 10:21:45 1998
- Orig file:
v2.1.123/linux/include/net/ip_masq_mod.h
- Orig date:
Wed Dec 10 09:45:16 1997
diff -u --recursive --new-file v2.1.123/linux/include/net/ip_masq_mod.h linux/include/net/ip_masq_mod.h
@@ -14,11 +14,9 @@
#include <linux/proc_fs.h>
#include <net/ip_masq.h>
-enum {
- IP_MASQ_MOD_NOP,
- IP_MASQ_MOD_ACCEPT,
- IP_MASQ_MOD_REJECT
-};
+#define IP_MASQ_MOD_NOP 0
+#define IP_MASQ_MOD_ACCEPT 1
+#define IP_MASQ_MOD_REJECT -1
struct ip_masq_mod {
struct ip_masq_mod *next; /* next mod for addrs. lookups */
@@ -27,29 +25,32 @@
atomic_t refcnt;
atomic_t mmod_nent; /* number of entries */
struct proc_dir_entry *mmod_proc_ent;
- int (*mmod_ctl) (int optname, struct ip_fw_masqctl *, int optlen);
+ int (*mmod_ctl) (int optname, struct ip_masq_ctl *, int optlen);
int (*mmod_init) (void);
int (*mmod_done) (void);
- int (*mmod_in_rule) (struct iphdr *, __u16 *);
- int (*mmod_in_update) (struct iphdr *, struct ip_masq *);
- struct ip_masq * (*mmod_in_create) (struct iphdr *, __u16 *, __u32);
- int (*mmod_out_rule) (struct iphdr *, __u16 *);
- int (*mmod_out_update) (struct iphdr *, __u16 *, struct ip_masq *);
- struct ip_masq * (*mmod_out_create) (struct iphdr *, __u16 *, __u32);
+ int (*mmod_in_rule) (const struct sk_buff *, const struct iphdr *);
+ int (*mmod_in_update) (const struct sk_buff *, const struct iphdr *,
+ struct ip_masq *);
+ struct ip_masq * (*mmod_in_create) (const struct sk_buff *, const struct iphdr *, __u32);
+ int (*mmod_out_rule) (const struct sk_buff *, const struct iphdr *);
+ int (*mmod_out_update) (const struct sk_buff *, const struct iphdr *,
+ struct ip_masq *);
+ struct ip_masq * (*mmod_out_create) (const struct sk_buff *, const struct iphdr *, __u32);
};
/*
* Service routines (called from ip_masq.c)
*/
-int ip_masq_mod_out_rule(struct iphdr *iph, __u16 *portp);
-int ip_masq_mod_out_update(struct iphdr *iph, __u16 *portp, struct ip_masq *ms);
-struct ip_masq * ip_masq_mod_out_create(struct iphdr *iph, __u16 *portp, __u32 maddr);
-
-int ip_masq_mod_in_rule(struct iphdr *iph, __u16 *portp);
-int ip_masq_mod_in_update(struct iphdr *iph, __u16 *portp, struct ip_masq *ms);
-struct ip_masq * ip_masq_mod_in_create(struct iphdr *iph, __u16 *portp, __u32 maddr);
-extern int ip_masq_mod_ctl(int optname, struct ip_fw_masqctl *, int len);
+int ip_masq_mod_out_rule(const struct sk_buff *, const struct iphdr *);
+int ip_masq_mod_out_update(const struct sk_buff *, const struct iphdr *, struct ip_masq *ms);
+struct ip_masq * ip_masq_mod_out_create(const struct sk_buff *, const struct iphdr *iph, __u32 maddr);
+
+int ip_masq_mod_in_rule(const struct sk_buff *, const struct iphdr *iph);
+int ip_masq_mod_in_update(const struct sk_buff *, const struct iphdr *iph, struct ip_masq *ms);
+struct ip_masq * ip_masq_mod_in_create(const struct sk_buff *, const struct iphdr *iph, __u32 maddr);
+
+extern int ip_masq_mod_ctl(int optname, struct ip_masq_ctl *, int len);
/*
* ip_masq_mod registration functions
@@ -58,6 +59,13 @@
extern int unregister_ip_masq_mod(struct ip_masq_mod *mmod);
extern int ip_masq_mod_lkp_unlink(struct ip_masq_mod *mmod);
extern int ip_masq_mod_lkp_link(struct ip_masq_mod *mmod);
+
+/*
+ * init functions protos
+ */
+extern int ip_portfw_init(void);
+extern int ip_markfw_init(void);
+extern int ip_autofw_init(void);
/*
* Utility ...
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov