mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 04:14:19 +00:00
lib: add %pEA for struct ethaddr *
Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
02f686fff8
commit
bd0ab4d80a
10
lib/prefix.c
10
lib/prefix.c
@ -1317,6 +1317,16 @@ char *esi_to_str(const esi_t *esi, char *buf, int size)
|
||||
return ptr;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("EA", printfrr_ea)
|
||||
static ssize_t printfrr_ea(char *buf, size_t bsz, const char *fmt,
|
||||
int prec, const void *ptr)
|
||||
{
|
||||
const struct ethaddr *mac = ptr;
|
||||
|
||||
prefix_mac2str(mac, buf, bsz);
|
||||
return 2;
|
||||
}
|
||||
|
||||
printfrr_ext_autoreg_p("IA", printfrr_ia)
|
||||
static ssize_t printfrr_ia(char *buf, size_t bsz, const char *fmt,
|
||||
int prec, const void *ptr)
|
||||
|
@ -555,6 +555,8 @@ static inline int is_default_host_route(const struct prefix *p)
|
||||
}
|
||||
|
||||
#ifdef _FRR_ATTRIBUTE_PRINTFRR
|
||||
#pragma FRR printfrr_ext "%pEA" (struct ethaddr *)
|
||||
|
||||
#pragma FRR printfrr_ext "%pI4" (struct in_addr *)
|
||||
#pragma FRR printfrr_ext "%pI4" (in_addr_t *)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user