Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
6158a5cc
Commit
6158a5cc
authored
Jan 07, 2013
by
André Hentschel
Committed by
Alexandre Julliard
Jan 08, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netstat: Implement -a option.
parent
a422d6b3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
netstat.c
programs/netstat/netstat.c
+10
-6
No files found.
programs/netstat/netstat.c
View file @
6158a5cc
...
...
@@ -145,7 +145,7 @@ static WCHAR *NETSTAT_host_name(UINT ip, WCHAR name[])
return
name
;
}
static
void
NETSTAT_
tcp
_header
(
void
)
static
void
NETSTAT_
conn
_header
(
void
)
{
WCHAR
local
[
22
],
remote
[
22
],
state
[
22
];
NETSTAT_wprintf
(
fmtnn
,
NETSTAT_load_message
(
IDS_TCP_ACTIVE_CONN
));
...
...
@@ -175,8 +175,6 @@ static void NETSTAT_tcp_table(void)
if
(
err
)
return
;
NETSTAT_tcp_header
();
for
(
i
=
0
;
i
<
table
->
dwNumEntries
;
i
++
)
{
if
((
table
->
table
[
i
].
u
.
dwState
==
MIB_TCP_STATE_CLOSE_WAIT
)
||
...
...
@@ -213,8 +211,6 @@ static void NETSTAT_udp_table(void)
if
(
err
)
return
;
NETSTAT_tcp_header
();
for
(
i
=
0
;
i
<
table
->
dwNumEntries
;
i
++
)
{
NETSTAT_host_name
(
table
->
table
[
i
].
dwLocalAddr
,
HostIp
);
...
...
@@ -252,6 +248,7 @@ int wmain(int argc, WCHAR *argv[])
if
(
argc
==
1
)
{
/* No options */
NETSTAT_conn_header
();
NETSTAT_tcp_table
();
return
0
;
}
...
...
@@ -260,21 +257,28 @@ int wmain(int argc, WCHAR *argv[])
{
switch
(
argv
[
1
][
1
])
{
case
'a'
:
NETSTAT_conn_header
();
NETSTAT_tcp_table
();
NETSTAT_udp_table
();
return
0
;
case
'p'
:
argv
++
;
argc
--
;
if
(
argc
==
1
)
return
1
;
switch
(
NETSTAT_get_protocol
(
argv
[
1
]))
{
case
PROT_TCP
:
NETSTAT_conn_header
();
NETSTAT_tcp_table
();
break
;
case
PROT_UDP
:
NETSTAT_conn_header
();
NETSTAT_udp_table
();
break
;
default:
WINE_FIXME
(
"Protocol not yet implemented: %s
\n
"
,
debugstr_w
(
argv
[
1
]));
}
break
;
return
0
;
default:
WINE_FIXME
(
"Unknown option: %s
\n
"
,
debugstr_w
(
argv
[
1
]));
return
1
;
...
...
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