From ce0d5858da1f27087d24cae3e627102deb89fc24 Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 31 Jan 2018 09:55:58 -0800 Subject: [PATCH] util: added macros to print mac addresses --- src/util.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util.h b/src/util.h index 2747538d..153a8ae6 100644 --- a/src/util.h +++ b/src/util.h @@ -32,6 +32,9 @@ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) +#define MAC "%02x:%02x:%02x:%02x:%02x:%02x" +#define MAC_STR(a) a[0], a[1], a[2], a[3], a[4], a[5] + const char *util_ssid_to_utf8(size_t len, const uint8_t *ssid); bool util_ssid_is_utf8(size_t len, const uint8_t *ssid); const char *util_address_to_string(const uint8_t *addr);