compat_firewall.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* Minor modifications to fit on compatibility framework:
  2.    Rusty.Russell@rustcorp.com.au
  3. */
  4. #ifndef __LINUX_FIREWALL_H
  5. #define __LINUX_FIREWALL_H
  6. /*
  7.  * Definitions for loadable firewall modules
  8.  */
  9. #define FW_QUEUE 0
  10. #define FW_BLOCK 1
  11. #define FW_ACCEPT 2
  12. #define FW_REJECT (-1)
  13. #define FW_REDIRECT 3
  14. #define FW_MASQUERADE 4
  15. #define FW_SKIP 5
  16. struct firewall_ops
  17. {
  18. struct firewall_ops *next;
  19. int (*fw_forward)(struct firewall_ops *this, int pf,
  20.   struct net_device *dev, void *phdr, void *arg,
  21.   struct sk_buff **pskb);
  22. int (*fw_input)(struct firewall_ops *this, int pf,
  23. struct net_device *dev, void *phdr, void *arg,
  24. struct sk_buff **pskb);
  25. int (*fw_output)(struct firewall_ops *this, int pf,
  26.  struct net_device *dev, void *phdr, void *arg,
  27.  struct sk_buff **pskb);
  28. /* These may be NULL. */
  29. int (*fw_acct_in)(struct firewall_ops *this, int pf,
  30.   struct net_device *dev, void *phdr, void *arg,
  31.   struct sk_buff **pskb);
  32. int (*fw_acct_out)(struct firewall_ops *this, int pf,
  33.    struct net_device *dev, void *phdr, void *arg,
  34.    struct sk_buff **pskb);
  35. };
  36. extern int register_firewall(int pf, struct firewall_ops *fw);
  37. extern int unregister_firewall(int pf, struct firewall_ops *fw);
  38. extern int ip_fw_masq_timeouts(void *user, int len);
  39. #endif /* __LINUX_FIREWALL_H */