xxd-style hex dumps through a line callback.
More...
|
| typedef void(* | HexdumpLineCallback) (int level, const char *src_filename, int src_line_number, const char *line_buffer) |
| | Output callback of hexdump(), called once per line.
|
| |
|
| void | hexdump (const char *src_filename, int src_line_number, int level, const uint8_t *data, size_t length, HexdumpLineCallback write_line_cb) |
| | Hex dump data in xxd-style lines of 16 bytes.
|
| |
xxd-style hex dumps through a line callback.
◆ HexdumpLineCallback
| typedef void(* HexdumpLineCallback) (int level, const char *src_filename, int src_line_number, const char *line_buffer) |
Output callback of hexdump(), called once per line.
- Parameters
-
| level | Level passed to hexdump(). |
| src_filename | Source file name passed to hexdump(). |
| src_line_number | Source line number passed to hexdump(). |
| line_buffer | Line, without line terminator. |
◆ hexdump()
| void hexdump |
( |
const char * |
src_filename, |
|
|
int |
src_line_number, |
|
|
int |
level, |
|
|
const uint8_t * |
data, |
|
|
size_t |
length, |
|
|
HexdumpLineCallback |
write_line_cb |
|
) |
| |
Hex dump data in xxd-style lines of 16 bytes.
Each line has the offset, the bytes in hex and their printable ASCII characters.
- Parameters
-
| src_filename | Source file name, passed through to write_line_cb. |
| src_line_number | Source line number, passed through to write_line_cb. |
| level | Log level, passed through to write_line_cb. |
| data | Data to dump. |
| length | Length of data in bytes. |
| write_line_cb | Output callback. |