X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/1c79356b52d46aa6b508fb032f5ae709b1f2897b..bd504ef0e0b883cdd7917b73b3574eb9ce669905:/bsd/netkey/key_debug.h diff --git a/bsd/netkey/key_debug.h b/bsd/netkey/key_debug.h index 750a570d0..b2e94a3ad 100644 --- a/bsd/netkey/key_debug.h +++ b/bsd/netkey/key_debug.h @@ -1,4 +1,4 @@ -/* $KAME: key_debug.h,v 1.5 2000/03/25 07:24:12 sumikawa Exp $ */ +/* $KAME: key_debug.h,v 1.7 2000/07/04 04:08:16 itojun Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -31,8 +31,7 @@ #ifndef _NETKEY_KEY_DEBUG_H_ #define _NETKEY_KEY_DEBUG_H_ - -#if !defined(KERNEL) || (defined(KERNEL) && defined(IPSEC_DEBUG)) +#include /* debug flags */ #define KEYDEBUG_STAMP 0x00000001 /* path */ @@ -53,43 +52,41 @@ #define KEYDEBUG_IPSEC_DATA (KEYDEBUG_IPSEC | KEYDEBUG_DATA) #define KEYDEBUG_IPSEC_DUMP (KEYDEBUG_IPSEC | KEYDEBUG_DUMP) -#define KEYDEBUG(lev,arg) if ((key_debug_level & (lev)) == (lev)) { arg; } - -#ifdef KERNEL -extern u_int32_t key_debug_level; -#endif /*KERNEL*/ +#if 0 +#define KEYDEBUG(lev,arg) \ + do { if ((key_debug_level & (lev)) == (lev)) { arg; } } while (0) +#else +#define KEYDEBUG(lev,arg) +#endif struct sadb_msg; struct sadb_ext; -extern void kdebug_sadb __P((struct sadb_msg *)); -extern void kdebug_sadb_x_policy __P((struct sadb_ext *)); +extern void kdebug_sadb(struct sadb_msg *); +extern void kdebug_sadb_x_policy(struct sadb_ext *); #ifdef KERNEL +extern u_int32_t key_debug_level; + struct secpolicy; struct secpolicyindex; struct secasindex; struct secasvar; struct secreplay; struct mbuf; -extern void kdebug_secpolicy __P((struct secpolicy *)); -extern void kdebug_secpolicyindex __P((struct secpolicyindex *)); -extern void kdebug_secasindex __P((struct secasindex *)); -extern void kdebug_secasv __P((struct secasvar *)); -extern void kdebug_mbufhdr __P((struct mbuf *)); -extern void kdebug_mbuf __P((struct mbuf *)); -#endif /*KERNEL*/ +extern void kdebug_secpolicy(struct secpolicy *); +extern void kdebug_secpolicyindex(struct secpolicyindex *); +extern void kdebug_secasindex(struct secasindex *); +extern void kdebug_secasv(struct secasvar *); +extern void kdebug_mbufhdr(struct mbuf *); +extern void kdebug_mbuf(struct mbuf *); +#endif /* KERNEL */ struct sockaddr; -extern void kdebug_sockaddr __P((struct sockaddr *)); - -#else - -#define KEYDEBUG(lev,arg) +extern void kdebug_sockaddr(struct sockaddr *); -#endif /*!defined(KERNEL) || (defined(KERNEL) && defined(IPSEC_DEBUG))*/ +extern void ipsec_hexdump(caddr_t, int); +extern void ipsec_bindump(caddr_t, int); -extern void ipsec_hexdump __P((caddr_t, int)); -extern void ipsec_bindump __P((caddr_t, int)); #endif /* _NETKEY_KEY_DEBUG_H_ */