tdump()

tdump()#

tdump prints a formatted hexadecimal and ASCII dump of a given byte array.

Prototype

void tdump(
    const char *prefix,
    const uint8_t *s,
    size_t len,
    view_fn_t view,
    int nivel
);

Parameters

Key

Type

Description

prefix

const char *

A string prefix to prepend to each line of the dump.

s

const uint8_t *

Pointer to the byte array to be dumped.

len

size_t

The number of bytes to dump.

view

view_fn_t

A function pointer for output formatting, typically printf.

nivel

int

The verbosity level: 1 for hex only, 2 for hex and ASCII, 3 for hex, ASCII, and byte index.


Return Value

This function does not return a value.

Notes

If nivel is 0, it defaults to 3. The function formats the output in a structured manner, displaying hexadecimal values alongside their ASCII representation.

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples