Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/core/utils.c

23 lines
415 B
C
Raw Normal View History

#include "utils.h"
2018-11-02 21:03:54 +01:00
void print_hexa (const char *prefix, uint8_t *payload, size_t size)
{
2018-10-04 01:54:12 +02:00
if (! payload)
return ;
size_t i;
for(i = 0; i < size; i++)
{
if(! (i % 4))
printf("\n%s (%ld) ", prefix, size);
2018-10-04 01:54:12 +02:00
printf("%2x ", payload[i]);
}
printf("\n");
}
2018-11-02 21:03:54 +01:00
void mprint_hexa (char *prefix, uint8_t *buf, size_t length)
{
print_hexa (prefix, buf, length);
}