diff options
author | David Lamparter <equinox@diac24.net> | 2020-03-29 11:09:14 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2020-07-14 11:15:47 +0200 |
commit | dc5d01863127158ca9fc8a82fb221c7e6fb4b891 (patch) | |
tree | 126201d74375e951300bd307e05816f7c24719e7 /lib/prefix.c | |
parent | lib/ipaddr: match constants to AF_* (diff) | |
download | frr-dc5d01863127158ca9fc8a82fb221c7e6fb4b891.tar.xz frr-dc5d01863127158ca9fc8a82fb221c7e6fb4b891.zip |
lib: add %pIA for struct ipaddr *
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/prefix.c')
-rw-r--r-- | lib/prefix.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/prefix.c b/lib/prefix.c index 0900100be..7f660d03d 100644 --- a/lib/prefix.c +++ b/lib/prefix.c @@ -22,6 +22,7 @@ #include <zebra.h> #include "prefix.h" +#include "ipaddr.h" #include "vty.h" #include "sockunion.h" #include "memory.h" @@ -1316,6 +1317,16 @@ char *esi_to_str(const esi_t *esi, char *buf, int size) return ptr; } +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) +{ + const struct ipaddr *ipa = ptr; + + ipaddr2str(ipa, buf, bsz); + return 2; +} + printfrr_ext_autoreg_p("I4", printfrr_i4) static ssize_t printfrr_i4(char *buf, size_t bsz, const char *fmt, int prec, const void *ptr) |