Subject: Netstat bug/fix
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: James Jegers <jimj@miller.cs.uwm.edu>
List: current-users
Date: 12/21/1993 20:10:39
I'm not sure if this has been fixed since my latest sup about a week
ago.
I found a bug in the netstat program.!! eww wee.. I feel special.
According to the docs the -w option puts the program into a continous
mode to display data. In the getopt line the ":" was missing after the
w option as a count. According to the docs the -w options display a
summaray of devices, to make this work the "iflag" must also be
turned on.
in main.c
---old---
--> while ((ch = getopt(argc, argv, "Aadf:hI:iM:mN:np:rstuw")) != EOF)
switch((char)ch) {
case 'A':
stuff ....... stuff
break;
case 'w':
interval = atoi(optarg);
break;
case '?':
---new---
--> while ((ch = getopt(argc, argv, "Aadf:hI:iM:mN:np:rstuw:")) != EOF)
switch((char)ch) {
case 'A':
stuff ....... stuff
break;
case 'w':
interval = atoi(optarg);
--> iflag = 1;
break;
case '?':
--
_____________________________________________________________
/\ University of Wisconsin -- Milwaukee \
\_| jimj@miller.cs.uwm.edu James Jegers |
| jimj@cs.uwm.edu |
| _________________________________________________________|___
\_/____________________________________________________________/
------------------------------------------------------------------------------