mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 22:19:10 +00:00
Fix typo in getifaddrs viz tool
Netmask address was used to display the network broadcast address.
This commit is contained in:
parent
2fe8338f92
commit
1b8d8ccee8
1 changed files with 2 additions and 2 deletions
|
@ -33,7 +33,7 @@
|
||||||
eth0
|
eth0
|
||||||
addr: 10.10.10.237
|
addr: 10.10.10.237
|
||||||
netmask: 255.255.255.0
|
netmask: 255.255.255.0
|
||||||
broadcast: 255.255.255.0
|
broadcast: 10.10.10.255
|
||||||
flags: IFF_UP IFF_BROADCAST IFF_MULTICAST IFF_RUNNING
|
flags: IFF_UP IFF_BROADCAST IFF_MULTICAST IFF_RUNNING
|
||||||
|
|
||||||
lo
|
lo
|
||||||
|
@ -74,7 +74,7 @@ int main(int argc, char *argv[]) {
|
||||||
tinyprint(1, "netmask: ", buf, "\n", NULL);
|
tinyprint(1, "netmask: ", buf, "\n", NULL);
|
||||||
}
|
}
|
||||||
if ((ifa->ifa_flags & IFF_BROADCAST) &&
|
if ((ifa->ifa_flags & IFF_BROADCAST) &&
|
||||||
sockaddr2str(ifa->ifa_netmask, buf, sizeof(buf))) {
|
sockaddr2str(ifa->ifa_broadaddr, buf, sizeof(buf))) {
|
||||||
tinyprint(1, "broadcast: ", buf, "\n", NULL);
|
tinyprint(1, "broadcast: ", buf, "\n", NULL);
|
||||||
} else if ((ifa->ifa_flags & IFF_POINTOPOINT) &&
|
} else if ((ifa->ifa_flags & IFF_POINTOPOINT) &&
|
||||||
sockaddr2str(ifa->ifa_dstaddr, buf, sizeof(buf))) {
|
sockaddr2str(ifa->ifa_dstaddr, buf, sizeof(buf))) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue