#ifndef _NETKEY_KEYSOCK_H_
#define _NETKEY_KEYSOCK_H_
+#include <sys/appleapiopts.h>
/* statistics for pfkey socket */
struct pfkeystat {
#define KEY_SENDUP_ALL 1
#define KEY_SENDUP_REGISTERED 2
-#ifdef KERNEL
+#ifdef BSD_KERNEL_PRIVATE
+#define PFKEY_STAT_INCREMENT(x) \
+ {lck_mtx_lock(pfkey_stat_mutex); (x)++; lck_mtx_unlock(pfkey_stat_mutex);}
+
struct keycb {
struct rawcb kp_raw; /* rawcb */
int kp_promisc; /* promiscuous mode */
extern struct pfkeystat pfkeystat;
-extern int key_output __P((struct mbuf *, struct socket *));
-#ifndef __NetBSD__
-extern int key_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *));
+#ifdef __APPLE__
+extern int key_output(struct mbuf *, struct socket* so);
#else
-extern int key_usrreq __P((struct socket *,
- int, struct mbuf *, struct mbuf *, struct mbuf *, struct proc *));
+extern int key_output(struct mbuf *, ...);
#endif
+extern int key_usrreq(struct socket *,
+ int, struct mbuf *, struct mbuf *, struct mbuf *);
-extern int key_sendup __P((struct socket *, struct sadb_msg *, u_int, int));
-extern int key_sendup_mbuf __P((struct socket *, struct mbuf *, int));
-#endif /* KERNEL */
+extern int key_sendup(struct socket *, struct sadb_msg *, u_int, int);
+extern int key_sendup_mbuf(struct socket *, struct mbuf *, int);
+#endif /* BSD_KERNEL_PRIVATE */
#endif /*_NETKEY_KEYSOCK_H_*/