From 7bd9febf65e98eb1f4b4d51afa2479c442066235 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Sat, 3 Nov 2018 23:43:49 +0100 Subject: libxtables: add and use mac print helpers This changes ebtables-nft to consistently print mac address with two characters, i.e. 00:01:02:03:04:0a, not 0:1:2:3:4:a. Will require another bump of vcurrent/vage. Suggested-by: Pablo Neira Ayuso Signed-off-by: Florian Westphal --- include/xtables.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/xtables.h b/include/xtables.h index 8fb8843a..2bc190cd 100644 --- a/include/xtables.h +++ b/include/xtables.h @@ -556,6 +556,9 @@ extern void xtables_save_string(const char *value); #define FMT(tab,notab) ((format) & FMT_NOTABLE ? (notab) : (tab)) extern void xtables_print_num(uint64_t number, unsigned int format); +extern void xtables_print_mac(const unsigned char *macaddress); +extern void xtables_print_mac_and_mask(const unsigned char *mac, + const unsigned char *mask); extern void xtables_parse_val_mask(struct xt_option_call *cb, unsigned int *val, unsigned int *mask, -- cgit v1.2.3