diff options
| author | David Lamparter <equinox@diac24.net> | 2020-03-29 11:39:12 +0200 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2020-07-14 11:15:57 +0200 |
| commit | bd0ab4d80aa026d065b93bc066a5b2e88a14970a (patch) | |
| tree | 5b16d70d5329fb94a2771cb123a08320b6db9b96 /lib/prefix.c | |
| parent | 02f686fff8820c4a0a91665c5909ba33570bf716 (diff) | |
lib: add %pEA for struct ethaddr *
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/prefix.c')
| -rw-r--r-- | lib/prefix.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index 7f660d03d8..697e1a6239 100644 --- a/lib/prefix.c +++ b/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) |
