CNDP  22.08.0
hexdump.h File Reference
#include <stdio.h>
#include <cne_common.h>

Go to the source code of this file.

Functions

CNDP_API void cne_hexdump (FILE *f, const char *title, const void *buf, unsigned int len)
 
CNDP_API void cne_memdump (FILE *f, const char *title, const void *buf, unsigned int len)
 

Detailed Description

Simple API to dump out memory in a special hex format.

Definition in file hexdump.h.

Function Documentation

◆ cne_hexdump()

CNDP_API void cne_hexdump ( FILE *  f,
const char *  title,
const void *  buf,
unsigned int  len 
)

Dump out memory in a special hex dump format.

Parameters
fA pointer to a file for output
titleIf not NULL this string is printed as a header to the output.
bufThis is the buffer address to print out.
lenThe number of bytes to dump out
Examples
examples/cnet-quic/quic-cli.c.

◆ cne_memdump()

CNDP_API void cne_memdump ( FILE *  f,
const char *  title,
const void *  buf,
unsigned int  len 
)

Dump out memory in a hex format with colons between bytes.

Parameters
fA pointer to a file for output
titleIf not NULL this string is printed as a header to the output.
bufThis is the buffer address to print out.
lenThe number of bytes to dump out