I want something like INET[6]_ADDRSTRLEN but containing the maximum value of the prefix length, i.e. 32 for v4 and 128 for v6.
Obviously I can #define my own versions, but wondered if I was just ignorant of the correct header. I've looked in <arpa/inet.h> and similar but not found anything.
sizeof(in_addr_t)andsizeof(s6_addr) * 8?8 * sizeof (struct in_addr)and8 * sizeof (struct in6_addr))#define INET_MAX_PREFIX_LEN 32and#define INET6_MAX_PREFIX_LEN 128would be clearest, if they don't already exist.