|
@@ -402,6 +402,12 @@ void perror(const char *s);
|
|
#ifndef MAC2STR
|
|
#ifndef MAC2STR
|
|
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
|
|
#define MAC2STR(a) (a)[0], (a)[1], (a)[2], (a)[3], (a)[4], (a)[5]
|
|
#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
|
|
#define MACSTR "%02x:%02x:%02x:%02x:%02x:%02x"
|
|
|
|
+
|
|
|
|
+/*
|
|
|
|
+ * Compact form for string representation of MAC address
|
|
|
|
+ * To be used, e.g., for constructing dbus paths for P2P Devices
|
|
|
|
+ */
|
|
|
|
+#define COMPACT_MACSTR "%02x%02x%02x%02x%02x%02x"
|
|
#endif
|
|
#endif
|
|
|
|
|
|
#ifndef BIT
|
|
#ifndef BIT
|
|
@@ -436,6 +442,7 @@ typedef u64 __bitwise le64;
|
|
#endif /* __must_check */
|
|
#endif /* __must_check */
|
|
|
|
|
|
int hwaddr_aton(const char *txt, u8 *addr);
|
|
int hwaddr_aton(const char *txt, u8 *addr);
|
|
|
|
+int hwaddr_compact_aton(const char *txt, u8 *addr);
|
|
int hwaddr_aton2(const char *txt, u8 *addr);
|
|
int hwaddr_aton2(const char *txt, u8 *addr);
|
|
int hex2byte(const char *hex);
|
|
int hex2byte(const char *hex);
|
|
int hexstr2bin(const char *hex, u8 *buf, size_t len);
|
|
int hexstr2bin(const char *hex, u8 *buf, size_t len);
|