diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-01-14 01:34:48 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-01-14 01:34:48 +0100 |
commit | 6967578728a3eef43b7b2be4080dafc1b87f528d (patch) | |
tree | 76b79c4c81ce8e5ad4e57df5119efecef810e673 /networking | |
parent | 52185155088d0910d29c7f4fdf5cb3eecaac8965 (diff) | |
download | busybox-w32-6967578728a3eef43b7b2be4080dafc1b87f528d.tar.gz busybox-w32-6967578728a3eef43b7b2be4080dafc1b87f528d.tar.bz2 busybox-w32-6967578728a3eef43b7b2be4080dafc1b87f528d.zip |
whitespace fixes. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking')
-rw-r--r-- | networking/arp.c | 14 | ||||
-rw-r--r-- | networking/ether-wake.c | 6 | ||||
-rw-r--r-- | networking/httpd.c | 6 | ||||
-rw-r--r-- | networking/httpd_ssi.c | 2 | ||||
-rw-r--r-- | networking/ifconfig.c | 2 | ||||
-rw-r--r-- | networking/interface.c | 29 | ||||
-rw-r--r-- | networking/nc.c | 2 | ||||
-rw-r--r-- | networking/ntpd.c | 11 | ||||
-rw-r--r-- | networking/ntpd_simple.c | 2 | ||||
-rw-r--r-- | networking/ping.c | 2 | ||||
-rw-r--r-- | networking/route.c | 14 |
11 files changed, 44 insertions, 46 deletions
diff --git a/networking/arp.c b/networking/arp.c index 696c402e0..1c99987ae 100644 --- a/networking/arp.c +++ b/networking/arp.c | |||
@@ -214,7 +214,7 @@ static int arp_del(char **args) | |||
214 | 214 | ||
215 | /* Get the hardware address to a specified interface name */ | 215 | /* Get the hardware address to a specified interface name */ |
216 | static void arp_getdevhw(char *ifname, struct sockaddr *sa, | 216 | static void arp_getdevhw(char *ifname, struct sockaddr *sa, |
217 | const struct hwtype *hwt) | 217 | const struct hwtype *hwt) |
218 | { | 218 | { |
219 | struct ifreq ifr; | 219 | struct ifreq ifr; |
220 | const struct hwtype *xhw; | 220 | const struct hwtype *xhw; |
@@ -233,8 +233,8 @@ static void arp_getdevhw(char *ifname, struct sockaddr *sa, | |||
233 | xhw = get_hwntype(-1); | 233 | xhw = get_hwntype(-1); |
234 | } | 234 | } |
235 | bb_error_msg("device '%s' has HW address %s '%s'", | 235 | bb_error_msg("device '%s' has HW address %s '%s'", |
236 | ifname, xhw->name, | 236 | ifname, xhw->name, |
237 | xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data)); | 237 | xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data)); |
238 | } | 238 | } |
239 | } | 239 | } |
240 | 240 | ||
@@ -345,7 +345,7 @@ static int arp_set(char **args) | |||
345 | /* Print the contents of an ARP request block. */ | 345 | /* Print the contents of an ARP request block. */ |
346 | static void | 346 | static void |
347 | arp_disp(const char *name, char *ip, int type, int arp_flags, | 347 | arp_disp(const char *name, char *ip, int type, int arp_flags, |
348 | char *hwa, char *mask, char *dev) | 348 | char *hwa, char *mask, char *dev) |
349 | { | 349 | { |
350 | static const int arp_masks[] = { | 350 | static const int arp_masks[] = { |
351 | ATF_PERM, ATF_PUBL, | 351 | ATF_PERM, ATF_PUBL, |
@@ -428,7 +428,7 @@ static int arp_show(char *name) | |||
428 | /* All these strings can't overflow | 428 | /* All these strings can't overflow |
429 | * because fgets above reads limited amount of data */ | 429 | * because fgets above reads limited amount of data */ |
430 | num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n", | 430 | num = sscanf(line, "%s 0x%x 0x%x %s %s %s\n", |
431 | ip, &type, &flags, hwa, mask, dev); | 431 | ip, &type, &flags, hwa, mask, dev); |
432 | if (num < 4) | 432 | if (num < 4) |
433 | break; | 433 | break; |
434 | 434 | ||
@@ -461,7 +461,7 @@ static int arp_show(char *name) | |||
461 | } | 461 | } |
462 | if (option_mask32 & ARP_OPT_v) | 462 | if (option_mask32 & ARP_OPT_v) |
463 | printf("Entries: %d\tSkipped: %d\tFound: %d\n", | 463 | printf("Entries: %d\tSkipped: %d\tFound: %d\n", |
464 | entries, entries - shown, shown); | 464 | entries, entries - shown, shown); |
465 | 465 | ||
466 | if (!shown) { | 466 | if (!shown) { |
467 | if (hw_set || host || device[0]) | 467 | if (hw_set || host || device[0]) |
@@ -517,7 +517,7 @@ int arp_main(int argc UNUSED_PARAM, char **argv) | |||
517 | 517 | ||
518 | if (hw->alen <= 0) { | 518 | if (hw->alen <= 0) { |
519 | bb_error_msg_and_die("%s: %s without ARP support", | 519 | bb_error_msg_and_die("%s: %s without ARP support", |
520 | hw->name, "hardware type"); | 520 | hw->name, "hardware type"); |
521 | } | 521 | } |
522 | 522 | ||
523 | /* Now see what we have to do here... */ | 523 | /* Now see what we have to do here... */ |
diff --git a/networking/ether-wake.c b/networking/ether-wake.c index 6a88279f4..a73b0baea 100644 --- a/networking/ether-wake.c +++ b/networking/ether-wake.c | |||
@@ -238,9 +238,9 @@ int ether_wake_main(int argc UNUSED_PARAM, char **argv) | |||
238 | { | 238 | { |
239 | unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data; | 239 | unsigned char *hwaddr = if_hwaddr.ifr_hwaddr.sa_data; |
240 | printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " | 240 | printf("The hardware address (SIOCGIFHWADDR) of %s is type %d " |
241 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname, | 241 | "%2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x\n\n", ifname, |
242 | if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], | 242 | if_hwaddr.ifr_hwaddr.sa_family, hwaddr[0], hwaddr[1], |
243 | hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); | 243 | hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]); |
244 | } | 244 | } |
245 | # endif | 245 | # endif |
246 | } | 246 | } |
diff --git a/networking/httpd.c b/networking/httpd.c index a942794f5..1934bb27e 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -796,9 +796,9 @@ static void parse_conf(const char *path, int flag) | |||
796 | /* the line is not recognized */ | 796 | /* the line is not recognized */ |
797 | config_error: | 797 | config_error: |
798 | bb_error_msg("config error '%s' in '%s'", buf, filename); | 798 | bb_error_msg("config error '%s' in '%s'", buf, filename); |
799 | } /* while (fgets) */ | 799 | } /* while (fgets) */ |
800 | 800 | ||
801 | fclose(f); | 801 | fclose(f); |
802 | } | 802 | } |
803 | 803 | ||
804 | #if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR | 804 | #if ENABLE_FEATURE_HTTPD_ENCODE_URL_STR |
@@ -1708,7 +1708,7 @@ static int pam_talker(int num_msg, | |||
1708 | case PAM_PROMPT_ECHO_OFF: | 1708 | case PAM_PROMPT_ECHO_OFF: |
1709 | s = userinfo->pw; | 1709 | s = userinfo->pw; |
1710 | break; | 1710 | break; |
1711 | case PAM_ERROR_MSG: | 1711 | case PAM_ERROR_MSG: |
1712 | case PAM_TEXT_INFO: | 1712 | case PAM_TEXT_INFO: |
1713 | s = ""; | 1713 | s = ""; |
1714 | break; | 1714 | break; |
diff --git a/networking/httpd_ssi.c b/networking/httpd_ssi.c index cfe64eb46..4bd9a6d97 100644 --- a/networking/httpd_ssi.c +++ b/networking/httpd_ssi.c | |||
@@ -133,7 +133,7 @@ static void process_includes(const char *filename) | |||
133 | process_includes(include_directive); | 133 | process_includes(include_directive); |
134 | 134 | ||
135 | /* Print everything after directive */ | 135 | /* Print everything after directive */ |
136 | if (end) { | 136 | if (end) { |
137 | fputs(end, stdout); | 137 | fputs(end, stdout); |
138 | free(end); | 138 | free(end); |
139 | } | 139 | } |
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index b6604f5d1..320df3010 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c | |||
@@ -449,7 +449,7 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv) | |||
449 | } | 449 | } |
450 | #endif | 450 | #endif |
451 | memcpy( (((char *)&ifr) + a1op->ifr_offset), | 451 | memcpy( (((char *)&ifr) + a1op->ifr_offset), |
452 | p, sizeof(struct sockaddr)); | 452 | p, sizeof(struct sockaddr)); |
453 | } else { | 453 | } else { |
454 | /* FIXME: error check?? */ | 454 | /* FIXME: error check?? */ |
455 | unsigned long i = strtoul(*argv, NULL, 0); | 455 | unsigned long i = strtoul(*argv, NULL, 0); |
diff --git a/networking/interface.c b/networking/interface.c index 79c322ec0..4b9b9485d 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -950,8 +950,8 @@ static void ife_print6(struct interface *ptr) | |||
950 | (struct sockaddr *) &sap.sin6_addr); | 950 | (struct sockaddr *) &sap.sin6_addr); |
951 | sap.sin6_family = AF_INET6; | 951 | sap.sin6_family = AF_INET6; |
952 | printf(" inet6 addr: %s/%d", | 952 | printf(" inet6 addr: %s/%d", |
953 | INET6_sprint((struct sockaddr *) &sap, 1), | 953 | INET6_sprint((struct sockaddr *) &sap, 1), |
954 | plen); | 954 | plen); |
955 | printf(" Scope:"); | 955 | printf(" Scope:"); |
956 | switch (scope & IPV6_ADDR_SCOPE_MASK) { | 956 | switch (scope & IPV6_ADDR_SCOPE_MASK) { |
957 | case 0: | 957 | case 0: |
@@ -1019,7 +1019,7 @@ static void ife_print(struct interface *ptr) | |||
1019 | 1019 | ||
1020 | if (ptr->has_ip) { | 1020 | if (ptr->has_ip) { |
1021 | printf(" %s addr:%s ", ap->name, | 1021 | printf(" %s addr:%s ", ap->name, |
1022 | ap->sprint(&ptr->addr, 1)); | 1022 | ap->sprint(&ptr->addr, 1)); |
1023 | if (ptr->flags & IFF_POINTOPOINT) { | 1023 | if (ptr->flags & IFF_POINTOPOINT) { |
1024 | printf(" P-t-P:%s ", ap->sprint(&ptr->dstaddr, 1)); | 1024 | printf(" P-t-P:%s ", ap->sprint(&ptr->dstaddr, 1)); |
1025 | } | 1025 | } |
@@ -1102,17 +1102,17 @@ static void ife_print(struct interface *ptr) | |||
1102 | printf(" "); | 1102 | printf(" "); |
1103 | 1103 | ||
1104 | printf("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n", | 1104 | printf("RX packets:%llu errors:%lu dropped:%lu overruns:%lu frame:%lu\n", |
1105 | ptr->stats.rx_packets, ptr->stats.rx_errors, | 1105 | ptr->stats.rx_packets, ptr->stats.rx_errors, |
1106 | ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors, | 1106 | ptr->stats.rx_dropped, ptr->stats.rx_fifo_errors, |
1107 | ptr->stats.rx_frame_errors); | 1107 | ptr->stats.rx_frame_errors); |
1108 | if (can_compress) | 1108 | if (can_compress) |
1109 | printf(" compressed:%lu\n", | 1109 | printf(" compressed:%lu\n", |
1110 | ptr->stats.rx_compressed); | 1110 | ptr->stats.rx_compressed); |
1111 | printf(" "); | 1111 | printf(" "); |
1112 | printf("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n", | 1112 | printf("TX packets:%llu errors:%lu dropped:%lu overruns:%lu carrier:%lu\n", |
1113 | ptr->stats.tx_packets, ptr->stats.tx_errors, | 1113 | ptr->stats.tx_packets, ptr->stats.tx_errors, |
1114 | ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors, | 1114 | ptr->stats.tx_dropped, ptr->stats.tx_fifo_errors, |
1115 | ptr->stats.tx_carrier_errors); | 1115 | ptr->stats.tx_carrier_errors); |
1116 | printf(" collisions:%lu ", ptr->stats.collisions); | 1116 | printf(" collisions:%lu ", ptr->stats.collisions); |
1117 | if (can_compress) | 1117 | if (can_compress) |
1118 | printf("compressed:%lu ", ptr->stats.tx_compressed); | 1118 | printf("compressed:%lu ", ptr->stats.tx_compressed); |
@@ -1129,13 +1129,12 @@ static void ife_print(struct interface *ptr) | |||
1129 | printf(" "); | 1129 | printf(" "); |
1130 | if (ptr->map.irq) | 1130 | if (ptr->map.irq) |
1131 | printf("Interrupt:%d ", ptr->map.irq); | 1131 | printf("Interrupt:%d ", ptr->map.irq); |
1132 | if (ptr->map.base_addr >= 0x100) /* Only print devices using it for | 1132 | if (ptr->map.base_addr >= 0x100) /* Only print devices using it for I/O maps */ |
1133 | I/O maps */ | ||
1134 | printf("Base address:0x%lx ", | 1133 | printf("Base address:0x%lx ", |
1135 | (unsigned long) ptr->map.base_addr); | 1134 | (unsigned long) ptr->map.base_addr); |
1136 | if (ptr->map.mem_start) { | 1135 | if (ptr->map.mem_start) { |
1137 | printf("Memory:%lx-%lx ", ptr->map.mem_start, | 1136 | printf("Memory:%lx-%lx ", ptr->map.mem_start, |
1138 | ptr->map.mem_end); | 1137 | ptr->map.mem_end); |
1139 | } | 1138 | } |
1140 | if (ptr->map.dma) | 1139 | if (ptr->map.dma) |
1141 | printf("DMA chan:%x ", ptr->map.dma); | 1140 | printf("DMA chan:%x ", ptr->map.dma); |
@@ -1168,7 +1167,7 @@ static struct interface *lookup_interface(char *name) | |||
1168 | 1167 | ||
1169 | #ifdef UNUSED | 1168 | #ifdef UNUSED |
1170 | static int for_all_interfaces(int (*doit) (struct interface *, void *), | 1169 | static int for_all_interfaces(int (*doit) (struct interface *, void *), |
1171 | void *cookie) | 1170 | void *cookie) |
1172 | { | 1171 | { |
1173 | struct interface *ife; | 1172 | struct interface *ife; |
1174 | 1173 | ||
diff --git a/networking/nc.c b/networking/nc.c index 1b32e3aa3..0c843a686 100644 --- a/networking/nc.c +++ b/networking/nc.c | |||
@@ -120,7 +120,7 @@ int nc_main(int argc, char **argv) | |||
120 | /* getopt32 is _almost_ usable: | 120 | /* getopt32 is _almost_ usable: |
121 | ** it cannot handle "... -e PROG -prog-opt" */ | 121 | ** it cannot handle "... -e PROG -prog-opt" */ |
122 | while ((opt = getopt(argc, argv, | 122 | while ((opt = getopt(argc, argv, |
123 | "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0 | 123 | "" IF_NC_SERVER("lp:") IF_NC_EXTRA("w:i:f:e:") )) > 0 |
124 | ) { | 124 | ) { |
125 | if (ENABLE_NC_SERVER && opt == 'l') | 125 | if (ENABLE_NC_SERVER && opt == 'l') |
126 | IF_NC_SERVER(do_listen++); | 126 | IF_NC_SERVER(do_listen++); |
diff --git a/networking/ntpd.c b/networking/ntpd.c index 7facf9484..45485c080 100644 --- a/networking/ntpd.c +++ b/networking/ntpd.c | |||
@@ -1854,7 +1854,7 @@ recv_and_process_client_pkt(void /*int fd*/) | |||
1854 | msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM; | 1854 | msg.m_status = G.stratum < MAXSTRAT ? G.ntp_status : LI_ALARM; |
1855 | msg.m_status |= (query_status & VERSION_MASK); | 1855 | msg.m_status |= (query_status & VERSION_MASK); |
1856 | msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? | 1856 | msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? |
1857 | MODE_SERVER : MODE_SYM_PAS; | 1857 | MODE_SERVER : MODE_SYM_PAS; |
1858 | msg.m_stratum = G.stratum; | 1858 | msg.m_stratum = G.stratum; |
1859 | msg.m_ppoll = G.poll_exp; | 1859 | msg.m_ppoll = G.poll_exp; |
1860 | msg.m_precision_exp = G_precision_exp; | 1860 | msg.m_precision_exp = G_precision_exp; |
@@ -2328,14 +2328,13 @@ set_freq(double freq) /* frequency update */ | |||
2328 | if (pps_enable) { | 2328 | if (pps_enable) { |
2329 | if (!(pll_status & STA_PPSTIME)) | 2329 | if (!(pll_status & STA_PPSTIME)) |
2330 | report_event(EVNT_KERN, | 2330 | report_event(EVNT_KERN, |
2331 | NULL, "PPS enabled"); | 2331 | NULL, "PPS enabled"); |
2332 | ntv.status |= STA_PPSTIME | STA_PPSFREQ; | 2332 | ntv.status |= STA_PPSTIME | STA_PPSFREQ; |
2333 | } else { | 2333 | } else { |
2334 | if (pll_status & STA_PPSTIME) | 2334 | if (pll_status & STA_PPSTIME) |
2335 | report_event(EVNT_KERN, | 2335 | report_event(EVNT_KERN, |
2336 | NULL, "PPS disabled"); | 2336 | NULL, "PPS disabled"); |
2337 | ntv.status &= ~(STA_PPSTIME | | 2337 | ntv.status &= ~(STA_PPSTIME | STA_PPSFREQ); |
2338 | STA_PPSFREQ); | ||
2339 | } | 2338 | } |
2340 | if (sys_leap == LEAP_ADDSECOND) | 2339 | if (sys_leap == LEAP_ADDSECOND) |
2341 | ntv.status |= STA_INS; | 2340 | ntv.status |= STA_INS; |
@@ -2351,7 +2350,7 @@ set_freq(double freq) /* frequency update */ | |||
2351 | if (ntp_adjtime(&ntv) == TIME_ERROR) { | 2350 | if (ntp_adjtime(&ntv) == TIME_ERROR) { |
2352 | if (!(ntv.status & STA_PPSSIGNAL)) | 2351 | if (!(ntv.status & STA_PPSSIGNAL)) |
2353 | report_event(EVNT_KERN, NULL, | 2352 | report_event(EVNT_KERN, NULL, |
2354 | "PPS no signal"); | 2353 | "PPS no signal"); |
2355 | } | 2354 | } |
2356 | pll_status = ntv.status; | 2355 | pll_status = ntv.status; |
2357 | #ifdef STA_NANO | 2356 | #ifdef STA_NANO |
diff --git a/networking/ntpd_simple.c b/networking/ntpd_simple.c index 1b7c66b84..55bded8ff 100644 --- a/networking/ntpd_simple.c +++ b/networking/ntpd_simple.c | |||
@@ -710,7 +710,7 @@ recv_and_process_client_pkt(void /*int fd*/) | |||
710 | msg.m_status = G.synced ? G.leap : LI_ALARM; | 710 | msg.m_status = G.synced ? G.leap : LI_ALARM; |
711 | msg.m_status |= (query_status & VERSION_MASK); | 711 | msg.m_status |= (query_status & VERSION_MASK); |
712 | msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? | 712 | msg.m_status |= ((query_status & MODE_MASK) == MODE_CLIENT) ? |
713 | MODE_SERVER : MODE_SYM_PAS; | 713 | MODE_SERVER : MODE_SYM_PAS; |
714 | msg.m_stratum = G.stratum; | 714 | msg.m_stratum = G.stratum; |
715 | msg.m_ppoll = query_ppoll; | 715 | msg.m_ppoll = query_ppoll; |
716 | msg.m_precision_exp = G_precision_exp; | 716 | msg.m_precision_exp = G_precision_exp; |
diff --git a/networking/ping.c b/networking/ping.c index b8a438ba8..3df67f5c3 100644 --- a/networking/ping.c +++ b/networking/ping.c | |||
@@ -724,7 +724,7 @@ static void ping6(len_and_sockaddr *lsa) | |||
724 | ICMP6_FILTER_SETPASSALL(&filt); | 724 | ICMP6_FILTER_SETPASSALL(&filt); |
725 | } | 725 | } |
726 | if (setsockopt(pingsock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, | 726 | if (setsockopt(pingsock, IPPROTO_ICMPV6, ICMP6_FILTER, &filt, |
727 | sizeof(filt)) < 0) | 727 | sizeof(filt)) < 0) |
728 | bb_error_msg_and_die("setsockopt(ICMP6_FILTER)"); | 728 | bb_error_msg_and_die("setsockopt(ICMP6_FILTER)"); |
729 | } | 729 | } |
730 | #endif /*ICMP6_FILTER*/ | 730 | #endif /*ICMP6_FILTER*/ |
diff --git a/networking/route.c b/networking/route.c index b7b5a02e6..45f2be542 100644 --- a/networking/route.c +++ b/networking/route.c | |||
@@ -409,7 +409,7 @@ static NOINLINE void INET6_setroute(int action, char **args) | |||
409 | bb_error_msg_and_die("resolving %s", args_m1); | 409 | bb_error_msg_and_die("resolving %s", args_m1); |
410 | } | 410 | } |
411 | memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr, | 411 | memcpy(&rt.rtmsg_gateway, sa6.sin6_addr.s6_addr, |
412 | sizeof(struct in6_addr)); | 412 | sizeof(struct in6_addr)); |
413 | rt.rtmsg_flags |= RTF_GATEWAY; | 413 | rt.rtmsg_flags |= RTF_GATEWAY; |
414 | continue; | 414 | continue; |
415 | } | 415 | } |
@@ -498,11 +498,11 @@ void FAST_FUNC bb_displayroutes(int noresolve, int netstatfmt) | |||
498 | FILE *fp = xfopen_for_read("/proc/net/route"); | 498 | FILE *fp = xfopen_for_read("/proc/net/route"); |
499 | 499 | ||
500 | printf("Kernel IP routing table\n" | 500 | printf("Kernel IP routing table\n" |
501 | "Destination Gateway Genmask Flags %s Iface\n", | 501 | "Destination Gateway Genmask Flags %s Iface\n", |
502 | netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); | 502 | netstatfmt ? " MSS Window irtt" : "Metric Ref Use"); |
503 | 503 | ||
504 | if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */ | 504 | if (fscanf(fp, "%*[^\n]\n") < 0) { /* Skip the first line. */ |
505 | goto ERROR; /* Empty or missing line, or read error. */ | 505 | goto ERROR; /* Empty or missing line, or read error. */ |
506 | } | 506 | } |
507 | while (1) { | 507 | while (1) { |
508 | int r; | 508 | int r; |
@@ -567,8 +567,8 @@ static void INET6_displayroutes(void) | |||
567 | FILE *fp = xfopen_for_read("/proc/net/ipv6_route"); | 567 | FILE *fp = xfopen_for_read("/proc/net/ipv6_route"); |
568 | 568 | ||
569 | printf("Kernel IPv6 routing table\n%-44s%-40s" | 569 | printf("Kernel IPv6 routing table\n%-44s%-40s" |
570 | "Flags Metric Ref Use Iface\n", | 570 | "Flags Metric Ref Use Iface\n", |
571 | "Destination", "Next Hop"); | 571 | "Destination", "Next Hop"); |
572 | 572 | ||
573 | while (1) { | 573 | while (1) { |
574 | int r; | 574 | int r; |
@@ -618,8 +618,8 @@ static void INET6_displayroutes(void) | |||
618 | (struct sockaddr *) &snaddr6.sin6_addr); | 618 | (struct sockaddr *) &snaddr6.sin6_addr); |
619 | snaddr6.sin6_family = AF_INET6; | 619 | snaddr6.sin6_family = AF_INET6; |
620 | naddr6 = INET6_rresolve((struct sockaddr_in6 *) &snaddr6, | 620 | naddr6 = INET6_rresolve((struct sockaddr_in6 *) &snaddr6, |
621 | 0x0fff /* Apparently, upstream never resolves. */ | 621 | 0x0fff /* Apparently, upstream never resolves. */ |
622 | ); | 622 | ); |
623 | 623 | ||
624 | if (!r) { /* 1st pass */ | 624 | if (!r) { /* 1st pass */ |
625 | snprintf(addr6, sizeof(addr6), "%s/%d", naddr6, prefix_len); | 625 | snprintf(addr6, sizeof(addr6), "%s/%d", naddr6, prefix_len); |