=head1 NAME

nbdkit_debug_hexdump - display buffer in hexdump format

=head1 SYNOPSIS

 #include <nbdkit-plugin.h>

 void nbdkit_debug_hexdump (const void *buf, size_t len,
                            const char *prefix, uint64_t start);

=head1 DESCRIPTION

This function displays a buffer of binary data in canonical hexdump
format, sending the output to the same place as L<nbdkit_debug(3)>.
For example:

 char buf[33] = "12345678123456781234567812345678";
 nbdkit_debug_hexdump (buf, 32, "data: ", 0);

would produce output similar to this:

 data: 00000000: 31 32 33 34 35 36 37 38  31 32 33 34 35 36 37 38  |1234567812345678|
 data: 00000010: 31 32 33 34 35 36 37 38  31 32 33 34 35 36 37 38  |1234567812345678|

An optional C<prefix> may be given which prefixes the string on each
line of output.  (This may be C<NULL> or C<""> for no prefix).

An optional C<start> may be given which changes the first offset
displayed in the output.

=head1 LANGUAGE BINDINGS

(There are no language bindings of this function in the current version.)

=head1 HISTORY

C<nbdkit_debug_hexdump> was added in nbdkit 1.46.

=head1 SEE ALSO

L<nbdkit(1)>,
L<nbdkit_debug(3)>,
L<nbdkit-plugin(3)>,
L<nbdkit-filter(3)>,
L<nbddump(1)>,
L<hexdump(1)>.

=head1 AUTHORS

Richard W.M. Jones

=head1 COPYRIGHT

Copyright Red Hat
