Can I know the preferred and valid lifetimes of an IPv6 address?

Vivien Kraus vivien@planete-kraus.eu
Sat Aug 23 15:30:40 GMT 2025


Dear glibc users,

I would like to know what my public IPv6 addresses are, so that I can 
automatically update a DNS zone with them. getifaddrs seems to be the 
perfect fit, because it jumps above all the netlink and rtnetlink 
details. However, due to delays in DNS propagation, I would like to 
filter the list so that only the “preferred” addresses would be 
published. Does the glibc offer a way to know which address is 
preferred? There is a struct prefix_cacheinfo in linux’ rtnetlink.h but 
it does not seem to be used in glibc.

Best regards,

Vivien



More information about the Libc-help mailing list