ether-addr-util, network: introduce ETHER_ADDR_TO_STR() macro and use it
This commit is contained in:
@@ -42,6 +42,8 @@ static inline bool hw_addr_is_null(const struct hw_addr_data *addr) {
|
||||
#define ETHER_ADDR_TO_STRING_MAX (3*6)
|
||||
char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]);
|
||||
int ether_addr_to_string_alloc(const struct ether_addr *addr, char **ret);
|
||||
/* Use only as function argument, never stand-alone! */
|
||||
#define ETHER_ADDR_TO_STR(addr) ether_addr_to_string((addr), (char[ETHER_ADDR_TO_STRING_MAX]){})
|
||||
|
||||
int ether_addr_compare(const struct ether_addr *a, const struct ether_addr *b);
|
||||
static inline bool ether_addr_equal(const struct ether_addr *a, const struct ether_addr *b) {
|
||||
|
||||
Reference in New Issue
Block a user