#define _IP_FW_H
#include <sys/appleapiopts.h>
+#ifdef IPFW2
+#include <netinet/ip_fw2.h>
+#else /* !IPFW2, good old ipfw */
+
#include <sys/queue.h>
/*
* 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
/*
* 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 */