Enable tls psk
[radsecproxy.git] / debug.h
1 /* Copyright 2011 NORDUnet A/S. All rights reserved.
2    See LICENSE for licensing information. */
3
4 #define hd(p, l) { int i;               \
5     for (i = 1; i <= l; i++) {          \
6       printf ("%02x ", p[i-1]);         \
7       if (i % 8 == 0) printf (" ");     \
8       if (i % 16 == 0) printf ("\n"); } \
9     printf ("\n"); }
10
11 #if defined (__cplusplus)
12 extern "C" {
13 #endif
14
15 struct rs_packet;
16 void rs_dump_packet (const struct rs_packet *pkt);
17 int _rs_debug (const char *fmt, ...);
18
19 #if defined (DEBUG)
20 #define rs_debug(x) _rs_debug x
21 #else
22 #define rs_debug(x) do {;} while (0)
23 #endif
24
25 #if defined (__cplusplus)
26 }
27 #endif