1 #ifndef __LINUX_FIREWALL_H
2 #define __LINUX_FIREWALL_H
4 #include <linux/config.h>
7 * Definitions for loadable firewall modules
13 #define FW_REJECT (-1)
15 #define FW_MASQUERADE 4
20 struct firewall_ops
*next
;
21 int (*fw_forward
)(struct firewall_ops
*this, int pf
,
22 struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**pskb
);
23 int (*fw_input
)(struct firewall_ops
*this, int pf
,
24 struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**pskb
);
25 int (*fw_output
)(struct firewall_ops
*this, int pf
,
26 struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**pskb
);
27 /* Data falling in the second 486 cache line isn't used directly
28 during a firewall call and scan, only by insert/delete and other
31 int fw_pf
; /* Protocol family */
32 int fw_priority
; /* Priority of chosen firewalls */
36 extern int register_firewall(int pf
, struct firewall_ops
*fw
);
37 extern int unregister_firewall(int pf
, struct firewall_ops
*fw
);
38 extern void fwchain_init(void);
39 #ifdef CONFIG_FIREWALL
40 extern int call_fw_firewall(int pf
, struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**pskb
);
41 extern int call_in_firewall(int pf
, struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**pskb
);
42 extern int call_out_firewall(int pf
, struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**pskb
);
44 extern __inline__
int call_fw_firewall(int pf
, struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**skb
)
49 extern __inline__
int call_in_firewall(int pf
, struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**skb
)
54 extern __inline__
int call_out_firewall(int pf
, struct device
*dev
, void *phdr
, void *arg
, struct sk_buff
**skb
)