pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ifconfig output in NetBSD 8

On 01/08/2018 07:21, Travis Paul wrote:
In NetBSD 8 the output of ifconfig was changed and the netmask is now
returned as part of the IP address[1].  Some software[2] that parses
ifconfig needs to be updated to handle the new output.

Is there a better way of aquiring the interfaces and addresses instead
of parsing ifconfig output?



There's a python script here [1] to use libc getifaddrs(3) which avoids this issue entirely and should work across all modern platforms.

This is probably better than scraping ifconfig or similar output across platforms.



Home | Main Index | Thread Index | Old Index