Rename COPYING -> LICENSE.
[radsecproxy.git] / lib / debug.h
index a541555..c319085 100644 (file)
@@ -1,3 +1,6 @@
+/* Copyright 2011 NORDUnet A/S. All rights reserved.
+   See LICENSE for licensing information.  */
+
 #define hd(p, l) { int i;              \
     for (i = 1; i <= l; i++) {         \
       printf ("%02x ", p[i-1]);                \
@@ -5,5 +8,20 @@
       if (i % 16 == 0) printf ("\n"); }        \
     printf ("\n"); }
 
+#if defined (__cplusplus)
+extern "C" {
+#endif
+
+struct rs_packet;
 void rs_dump_packet (const struct rs_packet *pkt);
-void rs_dump_attr (const struct rs_attr *attr);
+int _rs_debug (const char *fmt, ...);
+
+#if defined (DEBUG)
+#define rs_debug(x) _rs_debug x
+#else
+#define rs_debug(x) do {;} while (0)
+#endif
+
+#if defined (__cplusplus)
+}
+#endif