SILC_LOG_HEXDUMP
NAME
#define SILC_LOG_HEXDUMP(...)
DESCRIPTION
This is a special wrapper to the hexdump output function. This macro
behaves slightly differently from other logging wrappers.
The first parameter, is composed by a group of parameters delimited by
parenthesis.
The second parameter is a `char *' pointer pointing to the beginning
of the memory section that should be hexdumped, and the third parameter
is the length of this memory section.
Undefining the global SILC_DEBUG define causes these functions to be
defined to an empty value, thus removing all debug logging calls from
the compiled application.
This macro is also affected by the global variable silc_debug_hexdump.
EXAMPLE
SILC_LOG_HEXDUMP(("Outgoing packet [%d], len %d", pckt->seq, pckt->len),
pckt->data, pckt->datalen);
SOURCE
#if defined(SILC_DEBUG)
#define SILC_LOG_HEXDUMP(fmt, data, len) silc_log_output_hexdump(__FILE__, \
__FUNCTION__, \
__LINE__, \
(void *)(data), (len), \
silc_format fmt)
#else
#define SILC_LOG_HEXDUMP(fmt, data, len) do { } while(0)
#endif /* SILC_DEBUG */
|