Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
net-tools
Commits
6498edeb
Commit
6498edeb
authored
Feb 20, 2000
by
Phil Blundell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix netstat -ci (#6904 in RedHat bugzilla)
Patch from Jeff Johnson
parent
052e8394
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
lib/interface.c
lib/interface.c
+2
-1
netstat.c
netstat.c
+11
-7
No files found.
lib/interface.c
View file @
6498edeb
...
...
@@ -4,7 +4,7 @@
10/1998 partly rewriten by Andi Kleen to support an interface list.
I don't claim that the list operations are efficient @).
$Id: interface.c,v 1.
7 1999/12/11 13:35:59 freitag
Exp $
$Id: interface.c,v 1.
8 2000/02/20 17:50:08 philip
Exp $
*/
#include "config.h"
...
...
@@ -322,6 +322,7 @@ int if_readlist(void)
#if 0
free(fmt);
#endif
fclose
(
fh
);
return
err
;
}
...
...
netstat.c
View file @
6498edeb
...
...
@@ -6,7 +6,7 @@
* NET-3 Networking Distribution for the LINUX operating
* system.
*
* Version: $Id: netstat.c,v 1.3
1 1999/11/20 22:49:18
philip Exp $
* Version: $Id: netstat.c,v 1.3
2 2000/02/20 17:50:01
philip Exp $
*
* Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
...
...
@@ -1393,11 +1393,13 @@ void ife_print(struct interface *ptr)
static
int
iface_info
(
void
)
{
if
((
skfd
=
sockets_open
(
0
))
<
0
)
{
perror
(
"socket"
);
exit
(
1
);
if
(
skfd
<
0
)
{
if
((
skfd
=
sockets_open
(
0
))
<
0
)
{
perror
(
"socket"
);
exit
(
1
);
}
printf
(
_
(
"Kernel Interface table
\n
"
));
}
printf
(
_
(
"Kernel Interface table
\n
"
));
printf
(
_
(
"Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
\n
"
));
if
(
for_all_interfaces
(
do_if_print
,
&
flag_all
)
<
0
)
{
...
...
@@ -1406,8 +1408,10 @@ static int iface_info(void)
}
if
(
flag_cnt
)
free_interface_list
();
close
(
skfd
);
skfd
=
-
1
;
else
{
close
(
skfd
);
skfd
=
-
1
;
}
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment