[Patch] Net-Tools ifconfig

Michael Remski (mremski@ix.netcom.com)
Sat, 28 Mar 1998 00:01:31 +0000


Hi all.
Patch to net-tools-980213.tar.gz so that ifconfig reports correctly.
Will probably work against earlier versions also.

m

--- Patch follows:

-- --- net-tools/ifconfig.c Fri Feb 13 16:57:57 1998
+++ net-tools.mod/ifconfig.c Fri Mar 27 14:02:35 1998
@@ -88,6 +88,7 @@
unsigned long tx_errors; /* packet transmit problems
*/
unsigned long rx_dropped; /* no space in linux buffers
*/
unsigned long tx_dropped; /* no space available in linux
*/
+ unsigned long rx_compressed;
unsigned long multicast; /* multicast packets received
*/
unsigned long collisions;

@@ -104,6 +105,7 @@
unsigned long tx_fifo_errors;
unsigned long tx_heartbeat_errors;
unsigned long tx_window_errors;
+ unsigned long tx_compressed;
};

struct interface {
@@ -403,22 +405,24 @@
bp=strchr(bp,':');
bp++;
if (have_byte_counters) {
- sscanf(bp,"%ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld",
+ sscanf(bp,"%ld %ld %ld%ld %ld %ld %ld %ld %ld %ld %ld %ld %ld
%ld %ld %ld",
&ife->stats.rx_bytes,
&ife->stats.rx_packets,
&ife->stats.rx_errors,
&ife->stats.rx_dropped,
&ife->stats.rx_fifo_errors,
&ife->stats.rx_frame_errors,
-
+ &ife->stats.rx_compressed,
+ &ife->stats.multicast,
+
&ife->stats.tx_bytes,
&ife->stats.tx_packets,
&ife->stats.tx_errors,
&ife->stats.tx_dropped,
&ife->stats.tx_fifo_errors,
- &ife->stats.collisions,
-
- &ife->stats.tx_carrier_errors
+ &ife->stats.collisions,
+ &ife->stats.tx_carrier_errors,
+ &ife->stats.tx_compressed
);
} else {
sscanf(bp,"%ld %ld %ld %ld %ld %ld %ld %ld %ld %ld %ld",

Having Microsoft give us advice on open standards is like W.C. Fields
giving moral advice to the Mormon Tabernacle Choir
Scott McNealy, Sun Microsystems Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu