diff options
Diffstat (limited to 'networking/interface.c')
-rw-r--r-- | networking/interface.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/networking/interface.c b/networking/interface.c index 79c322ec0..9ae8b3f03 100644 --- a/networking/interface.c +++ b/networking/interface.c | |||
@@ -27,7 +27,7 @@ | |||
27 | * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> | 27 | * {1.34} - 19980630 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> |
28 | * - gettext instead of catgets for i18n | 28 | * - gettext instead of catgets for i18n |
29 | * 10/1998 - Andi Kleen. Use interface list primitives. | 29 | * 10/1998 - Andi Kleen. Use interface list primitives. |
30 | * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu | 30 | * 20001008 - Bernd Eckenfels, Patch from RH for setting mtu |
31 | * (default AF was wrong) | 31 | * (default AF was wrong) |
32 | */ | 32 | */ |
33 | 33 | ||
@@ -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 | ||