#include <stdint.h>
#include <stdio.h>
#include <sys/time.h>
#include <time.h>
#include "yubihsm.h"
#include "../common/debug.h"
Go to the source code of this file.
|
#define | DUMPIF(var, len, lev) |
|
#define | DBG_INT(var, len, ...) |
|
#define | DBG_CRYPTO(var, len, ...) |
|
#define | DBG_NET(var, dump) |
|
#define | DBG_INFO(...) |
|
#define | DBG_DUMPINFO(var, len, ...) |
|
#define | DBG_ERR(...) |
|
#define | DBG_DUMPERR(var, len, ...) |
|
◆ DBG_CRYPTO
#define DBG_CRYPTO |
( |
| var, |
|
|
| len, |
|
|
| ... ) |
Value: do { \
__VA_ARGS__); \
} while (0)
#define YH_VERB_CRYPTO
Debug level crypto. Crypto results printed out.
Definition at line 47 of file debug_lib.h.
47#define DBG_CRYPTO(var, len, ...) \
48 do { \
49 D(_yh_verbosity &YH_VERB_CRYPTO, _yh_output, ANSI_GREEN, "LIB", "CRY", \
50 __VA_ARGS__); \
51 DUMPIF(var, len, YH_VERB_CRYPTO); \
52 } while (0)
◆ DBG_DUMPERR
#define DBG_DUMPERR |
( |
| var, |
|
|
| len, |
|
|
| ... ) |
Value: do { \
__VA_ARGS__); \
} while (0)
#define YH_VERB_ERR
Debug level error. Error messages printed out.
Definition at line 83 of file debug_lib.h.
83#define DBG_DUMPERR(var, len, ...) \
84 do { \
85 D(_yh_verbosity &YH_VERB_ERR, _yh_output, ANSI_RED, "LIB", "ERR", \
86 __VA_ARGS__); \
87 DUMPIF(var, len, YH_VERB_ERR); \
88 } while (0)
◆ DBG_DUMPINFO
#define DBG_DUMPINFO |
( |
| var, |
|
|
| len, |
|
|
| ... ) |
Value: do { \
__VA_ARGS__); \
} while (0)
#define YH_VERB_INFO
Debug level info. General information messages printed out.
Definition at line 69 of file debug_lib.h.
69#define DBG_DUMPINFO(var, len, ...) \
70 do { \
71 D(_yh_verbosity &YH_VERB_INFO, _yh_output, ANSI_BLUE, "LIB", "INF", \
72 __VA_ARGS__); \
73 DUMPIF(var, len, YH_VERB_INFO); \
74 } while (0)
◆ DBG_ERR
Value: do { \
__VA_ARGS__); \
} while (0)
Definition at line 76 of file debug_lib.h.
76#define DBG_ERR(...) \
77 do { \
78 DLN(_yh_verbosity &YH_VERB_ERR, _yh_output, ANSI_RED, "LIB", "ERR", \
79 __VA_ARGS__); \
80 } while (0)
◆ DBG_INFO
Value: do { \
__VA_ARGS__); \
} while (0)
Definition at line 63 of file debug_lib.h.
63#define DBG_INFO(...) \
64 do { \
65 DLN(_yh_verbosity &YH_VERB_INFO, _yh_output, ANSI_BLUE, "LIB", "INF", \
66 __VA_ARGS__); \
67 } while (0)
◆ DBG_INT
#define DBG_INT |
( |
| var, |
|
|
| len, |
|
|
| ... ) |
Value: do { \
"INT", __VA_ARGS__); \
} while (0)
#define YH_VERB_INTERMEDIATE
Debug level intermediate. Intermediate results printed out.
Definition at line 40 of file debug_lib.h.
40#define DBG_INT(var, len, ...) \
41 do { \
42 D(_yh_verbosity &YH_VERB_INTERMEDIATE, _yh_output, ANSI_YELLOW, "LIB", \
43 "INT", __VA_ARGS__); \
44 DUMPIF(var, len, YH_VERB_INTERMEDIATE); \
45 } while (0)
◆ DBG_NET
#define DBG_NET |
( |
| var, |
|
|
| dump ) |
Value: do { \
" "); \
} \
} while (0)
#define YH_VERB_RAW
Debug level raw. Raw messages printed out.
Definition at line 54 of file debug_lib.h.
54#define DBG_NET(var, dump) \
55 do { \
56 D(_yh_verbosity &YH_VERB_RAW, _yh_output, ANSI_MAGENTA, "LIB", "NET", \
57 " "); \
58 if (_yh_verbosity & YH_VERB_RAW) { \
59 dump(_yh_output, (var)); \
60 } \
61 } while (0)
◆ DUMPIF
#define DUMPIF |
( |
| var, |
|
|
| len, |
|
|
| lev ) |
Value:
Definition at line 32 of file debug_lib.h.
32#define DUMPIF(var, len, lev) \
33 do { \
34 if (_yh_verbosity & lev) { \
35 dump_hex(_yh_output, var, len); \
36 fprintf(_yh_output, "\n"); \
37 } \
38 } while (0)
◆ _yh_output
◆ _yh_verbosity