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
2e572c25
Commit
2e572c25
authored
Oct 03, 2008
by
Bernd Eckenfels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support netstat -s with -6tuw options (incl. usage())
parent
50165b20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
netstat.c
netstat.c
+19
-19
No files found.
netstat.c
View file @
2e572c25
...
...
@@ -6,7 +6,7 @@
* NET-3 Networking Distribution for the LINUX operating
* system.
*
* Version: $Id: netstat.c,v 1.5
7 2008/10/03 00:05:20
ecki Exp $
* Version: $Id: netstat.c,v 1.5
8 2008/10/03 01:06:33
ecki Exp $
*
* Authors: Fred Baumgarten, <dc6iq@insu1.etec.uni-karlsruhe.de>
* Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
...
...
@@ -1507,7 +1507,7 @@ static void usage(void)
{
fprintf
(
stderr
,
_
(
"usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
\n
"
));
fprintf
(
stderr
,
_
(
" netstat [-vnNcaeol] [<Socket> ...]
\n
"
));
fprintf
(
stderr
,
_
(
" netstat { [-veenNac] -i | [-cnNe] -M | -s }
\n\n
"
));
fprintf
(
stderr
,
_
(
" netstat { [-veenNac] -i | [-cnNe] -M | -s
[-6tuw]
}
\n\n
"
));
fprintf
(
stderr
,
_
(
" -r, --route display routing table
\n
"
));
fprintf
(
stderr
,
_
(
" -i, --interfaces display interface table
\n
"
));
...
...
@@ -1718,36 +1718,36 @@ int main
sleep
(
1
);
}
#else
ENOSUPP
(
"netstat
.c
"
,
"FW_MASQUERADE"
);
ENOSUPP
(
"netstat"
,
"FW_MASQUERADE"
);
i
=
-
1
;
#endif
return
(
i
);
}
if
(
flag_sta
)
{
char
*
tmp1
,
*
tmp2
;
char
buf
[
256
];
if
(
!
afname
[
0
])
{
if
(
!
afname
[
0
])
strcpy
(
afname
,
DFLT_AF
);
if
(
!
strcmp
(
afname
,
"inet"
))
{
#if HAVE_AFINET
inittab
();
parsesnmp
(
flag_raw
,
flag_tcp
,
flag_udp
);
}
else
{
safe_strncpy
(
buf
,
afname
,
sizeof
(
buf
));
tmp1
=
buf
;
if
((
tmp2
=
index
(
tmp1
,
','
)))
printf
(
"Multiple interface
\n
"
);
else
if
(
!
strncmp
(
buf
,
"inet6"
,
5
))
{
#else
ENOSUPP
(
"netstat"
,
"AF INET"
);
#endif
}
else
if
(
!
strcmp
(
afname
,
"inet6"
))
{
#if HAVE_AFINET6
inittab6
();
parsesnmp6
(
flag_raw
,
flag_tcp
,
flag_udp
);
#else
printf
(
"Address type not supported for stats
\n
"
);
ENOSUPP
(
"netstat"
,
"AF INET6
"
);
#endif
}
else
printf
(
"Address type not supported for stats
\n
"
);
}
}
else
{
printf
(
_
(
"netstat: No statistics support for specified address family: %s
\n
"
),
afname
);
exit
(
1
);
}
exit
(
0
);
}
if
(
flag_rou
)
{
int
options
=
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