1 #ifndef __LINUX_FIREWALL_H
2 #define __LINUX_FIREWALL_H
3
4
5
6
7
8 #define FW_BLOCK 0
9 #define FW_ACCEPT 1
10 #define FW_REJECT (-1)
11 #define FW_MASQUERADE 2
12 #define FW_SKIP 3
13
14 struct firewall_ops
15 {
16 struct firewall_ops *next;
17 int (*fw_forward)(struct firewall_ops *this, int pf,
18 struct device *dev, void *phdr);
19 int (*fw_input)(struct firewall_ops *this, int pf,
20 struct device *dev, void *phdr);
21 int (*fw_output)(struct firewall_ops *this, int pf,
22 struct device *dev, void *phdr);
23
24
25
26
27 int fw_pf;
28 int fw_priority;
29 };
30
31 #ifdef __KERNEL__
32 extern int register_firewall(int pf, struct firewall_ops *fw);
33 extern int unregister_firewall(int pf, struct firewall_ops *fw);
34 extern int call_fw_firewall(int pf, struct device *dev, void *phdr);
35 extern int call_in_firewall(int pf, struct device *dev, void *phdr);
36 extern int call_out_firewall(int pf, struct device *dev, void *phdr);
37 extern void fwchain_init(void);
38 #endif
39
40 #endif