cidr: Implement simplified IPv6 formats
* include/mailutils/cidr.h (MU_CIDR_FMT_SIMPLIFY): New format flag. * libmailutils/cidr/tostr.c (format_ipv6_bytes): Take additional argument, indicating whether to simplify the output. (format_ipv6_bytes_normal) (format_ipv6_bytes_simplified): New static functions. (mu_cidr_to_string): Select appropriate ipv6 printer depending on the MU_CIDR_FMT_SIMPLIFY bit. * libmailutils/tests/cidr.c (main): New options -s and -S
Showing
3 changed files
with
100 additions
and
16 deletions
-
Please register or sign in to post a comment