Now
netbsd-5 commitmail json YAML
src/lib/libc/net/getifaddrs.3@1.8.38.1
/
diff
/
nxr@1.8.38.1
src/lib/libc/net/getifaddrs.c@1.11.12.1 / diff / nxr@1.11.12.1
src/sbin/ifconfig/af_link.c@1.3.2.1 / diff / nxr@1.3.2.1
src/sbin/ifconfig/ifconfig.c@1.213.2.2 / diff / nxr@1.213.2.2
src/sbin/ifconfig/util.c@1.8.2.1 / diff / nxr@1.8.2.1
src/sbin/ifconfig/util.h@1.6.2.1 / diff / nxr@1.6.2.1
src/lib/libc/net/getifaddrs.c@1.11.12.1 / diff / nxr@1.11.12.1
src/sbin/ifconfig/af_link.c@1.3.2.1 / diff / nxr@1.3.2.1
src/sbin/ifconfig/ifconfig.c@1.213.2.2 / diff / nxr@1.213.2.2
src/sbin/ifconfig/util.c@1.8.2.1 / diff / nxr@1.8.2.1
src/sbin/ifconfig/util.h@1.6.2.1 / diff / nxr@1.6.2.1
Pull up following revision(s) (requested by dyoung in ticket #730):
sbin/ifconfig/af_link.c: revisions 1.4 - 1.6
sbin/ifconfig/util.h: revision 1.7
sbin/ifconfig/util.c: revisions 1.10, 1.11
lib/libc/net/getifaddrs.c: revision 1.12
lib/libc/net/getifaddrs.3: revision 1.10
sbin/ifconfig/ifconfig.c: revisions 1.216 - 1.218
Fix indentation: change spaces to tabs.
Use getnameinfo(3) to render a human-readable link-layer address in the
'address: ' line, just as we do in the 'link xx:xx:...:xx' line.
There's no use casting a socket address to sockaddr_dl, only to cast it
back to sockaddr, so don't do it.
Cosmetic: add some whitespace for my ease of reading.
To make sure that we always print the active link-layer address in the
'address: ' field, don't treat the first address as the active address,
but search the link-layer addresses for the ones flagged IFLR_ACTIVE,
and print those. Extract a subroutine, print_link_addresses(), for
printing link-layer addresses.
For non-AF_LINK ifaddrs, ifa_data is NULL. AFAICT, this has always been
so. Say so in the documentation.
Bring getifaddrs(3) behavior in line with the documentation: the
ifa_data member of every AF_LINK struct ifaddrs points at the
corresponding struct if_data. In ifconfig(8), do not try to suppress
duplicate AF_LINK ifaddrs by checking for a NULL ifa_data.
Don't copy out two AF_LINK struct ifaddrs for each active link-layer
address. getifaddrs(3) used to copy out one ifaddrs for the kernel's
RTM_IFINFO message, and one more for the kernel's RTM_NEWADDR message.
I suppress the first duplicate with a highly conservative change that
wastes a little bit of ifaddrs storage. The storage is not leaked.
sbin/ifconfig/af_link.c: revisions 1.4 - 1.6
sbin/ifconfig/util.h: revision 1.7
sbin/ifconfig/util.c: revisions 1.10, 1.11
lib/libc/net/getifaddrs.c: revision 1.12
lib/libc/net/getifaddrs.3: revision 1.10
sbin/ifconfig/ifconfig.c: revisions 1.216 - 1.218
Fix indentation: change spaces to tabs.
Use getnameinfo(3) to render a human-readable link-layer address in the
'address: ' line, just as we do in the 'link xx:xx:...:xx' line.
There's no use casting a socket address to sockaddr_dl, only to cast it
back to sockaddr, so don't do it.
Cosmetic: add some whitespace for my ease of reading.
To make sure that we always print the active link-layer address in the
'address: ' field, don't treat the first address as the active address,
but search the link-layer addresses for the ones flagged IFLR_ACTIVE,
and print those. Extract a subroutine, print_link_addresses(), for
printing link-layer addresses.
For non-AF_LINK ifaddrs, ifa_data is NULL. AFAICT, this has always been
so. Say so in the documentation.
Bring getifaddrs(3) behavior in line with the documentation: the
ifa_data member of every AF_LINK struct ifaddrs points at the
corresponding struct if_data. In ifconfig(8), do not try to suppress
duplicate AF_LINK ifaddrs by checking for a NULL ifa_data.
Don't copy out two AF_LINK struct ifaddrs for each active link-layer
address. getifaddrs(3) used to copy out one ifaddrs for the kernel's
RTM_IFINFO message, and one more for the kernel's RTM_NEWADDR message.
I suppress the first duplicate with a highly conservative change that
wastes a little bit of ifaddrs storage. The storage is not leaked.