]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet/ip_fw.h
xnu-792.25.20.tar.gz
[apple/xnu.git] / bsd / netinet / ip_fw.h
index 41eae12e2f94d0ffc6342ec62f49010f58549f08..606c6284436a7d682028cb7c94eb72f27eb16073 100644 (file)
 #define _IP_FW_H
 #include <sys/appleapiopts.h>
 
+#ifdef IPFW2
+#include <netinet/ip_fw2.h>
+#else /* !IPFW2, good old ipfw */
+
 #include <sys/queue.h>
 
 
@@ -287,8 +291,7 @@ struct ipfw_dyn_rule {
 /*
  * Main firewall chains definitions and global var's definitions.
  */
-#ifdef KERNEL
-#ifdef __APPLE_API_PRIVATE
+#ifdef KERNEL_PRIVATE
 
 #define IP_FW_PORT_DYNT_FLAG   0x10000
 #define        IP_FW_PORT_TEE_FLAG     0x20000
@@ -297,20 +300,20 @@ struct ipfw_dyn_rule {
 /*
  * Function definitions.
  */
-void ip_fw_init __P((void));
+void ip_fw_init(void);
 
 /* Firewall hooks */
 struct ip;
 struct sockopt;
-typedef        int ip_fw_chk_t __P((struct ip **, int, struct ifnet *, u_int16_t *,
-            struct mbuf **, struct ip_fw_chain **, struct sockaddr_in **));
-typedef        int ip_fw_ctl_t __P((struct sockopt *));
+typedef        int ip_fw_chk_t(struct ip **, int, struct ifnet *, u_int16_t *,
+            struct mbuf **, struct ip_fw_chain **, struct sockaddr_in **);
+typedef        int ip_fw_ctl_t(struct sockopt *);
 extern ip_fw_chk_t *ip_fw_chk_ptr;
 extern ip_fw_ctl_t *ip_fw_ctl_ptr;
 extern int fw_one_pass;
 extern int fw_enable;
 extern struct ipfw_flow_id last_pkt ;
-#endif /* __APPLE_API_PRIVATE */
-#endif /* KERNEL */
+#endif KERNEL_PRIVATE
 
+#endif !IPFW2
 #endif /* _IP_FW_H */