ifconfig(8): Use getifaddrs(3) from libc

Operating Systems / DragonFlyBSD - Aaron LI [aaronly.me] - 26 June 2020 14:53 UTC

Use libc's getifaddrs(3) instead of implementing its own version.

Obtained from FreeBSD (revisions 166956 and 199770); with minor adjustments.

While there, also adjust some styles.

5ecbd7012b ifconfig(8): Use getifaddrs(3) from libc
sbin/ifconfig/af_inet.c | 25 +++--
sbin/ifconfig/af_inet6.c | 20 ++--
sbin/ifconfig/af_link.c | 6 +-
sbin/ifconfig/ifconfig.c | 235 +++++++++++++++++------------------------------
sbin/ifconfig/ifconfig.h | 5 +-
5 files changed, 110 insertions(+), 181 deletions(-)

Upstream: gitweb.dragonflybsd.org


  • Share