Add mac2str() and str2mac() to print/parse MAC address

This commit is contained in:
Dmitry Rakhchev
2016-07-04 18:28:21 +03:00
committed by Zdenek Styblik
parent 2f76ab3d3a
commit 34711329c2
6 changed files with 78 additions and 102 deletions

View File

@@ -100,6 +100,8 @@ uint32_t buf2long(uint8_t * buf);
#define BUF2STR_MAXIMUM_OUTPUT_SIZE (3*1024 + 1)
const char * buf2str_extended(const uint8_t *buf, int len, const char *sep);
const char * buf2str(const uint8_t *buf, int len);
int str2mac(const char *arg, uint8_t *buf);
const char * mac2str(const uint8_t *buf);
int ipmi_parse_hex(const char *str, uint8_t *out, int size);
void printbuf(const uint8_t * buf, int len, const char * desc);
uint8_t ipmi_csum(uint8_t * d, int s);