Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
bc8876f9
Commit
bc8876f9
authored
Sep 07, 2012
by
Hans Leidekker
Committed by
Alexandre Julliard
Sep 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
iphlpapi: Add partial support for UDP_TABLE_OWNER_MODULE in GetExtendedUdpTable.
parent
18ba68ea
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
iphlpapi_main.c
dlls/iphlpapi/iphlpapi_main.c
+5
-1
ipstats.c
dlls/iphlpapi/ipstats.c
+11
-4
udpmib.h
include/udpmib.h
+23
-0
No files found.
dlls/iphlpapi/iphlpapi_main.c
View file @
bc8876f9
...
...
@@ -1935,11 +1935,15 @@ DWORD WINAPI GetExtendedUdpTable(PVOID pUdpTable, PDWORD pdwSize, BOOL bOrder,
if
(
!
pdwSize
)
return
ERROR_INVALID_PARAMETER
;
if
(
ulAf
!=
AF_INET
||
(
TableClass
!=
UDP_TABLE_BASIC
&&
TableClass
!=
UDP_TABLE_OWNER_PID
))
(
TableClass
!=
UDP_TABLE_BASIC
&&
TableClass
!=
UDP_TABLE_OWNER_PID
&&
TableClass
!=
UDP_TABLE_OWNER_MODULE
))
{
FIXME
(
"ulAf = %u, TableClass = %u not supported
\n
"
,
ulAf
,
TableClass
);
return
ERROR_NOT_SUPPORTED
;
}
if
(
TableClass
==
UDP_TABLE_OWNER_MODULE
)
FIXME
(
"UDP_TABLE_OWNER_MODULE not fully supported
\n
"
);
if
((
ret
=
build_udp_table
(
TableClass
,
&
table
,
bOrder
,
GetProcessHeap
(),
0
,
&
size
)))
return
ret
;
...
...
dlls/iphlpapi/ipstats.c
View file @
bc8876f9
...
...
@@ -1837,6 +1837,12 @@ static DWORD get_udp_table_sizes( UDP_TABLE_CLASS class, DWORD row_count, DWORD
if
(
row_size
)
*
row_size
=
sizeof
(
MIB_UDPROW_OWNER_PID
);
break
;
}
case
UDP_TABLE_OWNER_MODULE
:
{
table_size
=
FIELD_OFFSET
(
MIB_UDPTABLE_OWNER_MODULE
,
table
[
row_count
]);
if
(
row_size
)
*
row_size
=
sizeof
(
MIB_UDPROW_OWNER_MODULE
);
break
;
}
default:
ERR
(
"unhandled class %u
\n
"
,
class
);
return
0
;
...
...
@@ -1846,7 +1852,7 @@ static DWORD get_udp_table_sizes( UDP_TABLE_CLASS class, DWORD row_count, DWORD
static
MIB_UDPTABLE
*
append_udp_row
(
UDP_TABLE_CLASS
class
,
HANDLE
heap
,
DWORD
flags
,
MIB_UDPTABLE
*
table
,
DWORD
*
count
,
const
MIB_UDPROW_OWNER_
PID
*
row
,
DWORD
row_size
)
const
MIB_UDPROW_OWNER_
MODULE
*
row
,
DWORD
row_size
)
{
if
(
table
->
dwNumEntries
>=
*
count
)
{
...
...
@@ -1881,7 +1887,7 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
DWORD
*
size
)
{
MIB_UDPTABLE
*
table
;
MIB_UDPROW_OWNER_
PID
row
;
MIB_UDPROW_OWNER_
MODULE
row
;
DWORD
ret
=
NO_ERROR
,
count
=
16
,
table_size
,
row_size
;
if
(
!
(
table_size
=
get_udp_table_sizes
(
class
,
count
,
&
row_size
)))
...
...
@@ -1904,7 +1910,8 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
unsigned
int
dummy
,
num_entries
=
0
;
int
inode
;
if
(
class
==
UDP_TABLE_OWNER_PID
)
map
=
get_pid_map
(
&
num_entries
);
if
(
class
==
UDP_TABLE_OWNER_PID
||
class
==
UDP_TABLE_OWNER_MODULE
)
map
=
get_pid_map
(
&
num_entries
);
/* skip header line */
ptr
=
fgets
(
buf
,
sizeof
(
buf
),
fp
);
...
...
@@ -1914,7 +1921,7 @@ DWORD build_udp_table( UDP_TABLE_CLASS class, void **tablep, BOOL order, HANDLE
&
row
.
dwLocalAddr
,
&
row
.
dwLocalPort
,
&
inode
)
!=
4
)
continue
;
row
.
dwLocalPort
=
htons
(
row
.
dwLocalPort
);
if
(
class
==
UDP_TABLE_OWNER_PID
)
if
(
class
==
UDP_TABLE_OWNER_PID
||
class
==
UDP_TABLE_OWNER_MODULE
)
row
.
dwOwningPid
=
find_owning_pid
(
map
,
num_entries
,
inode
);
if
(
!
(
table
=
append_udp_row
(
class
,
heap
,
flags
,
table
,
&
count
,
&
row
,
row_size
)))
break
;
...
...
include/udpmib.h
View file @
bc8876f9
...
...
@@ -48,6 +48,29 @@ typedef struct _MIB_UDPTABLE_OWNER_PID
MIB_UDPROW_OWNER_PID
table
[
1
];
}
MIB_UDPTABLE_OWNER_PID
,
*
PMIB_UDPTABLE_OWNER_PID
;
typedef
struct
_MIB_UDPROW_OWNER_MODULE
{
DWORD
dwLocalAddr
;
DWORD
dwLocalPort
;
DWORD
dwOwningPid
;
LARGE_INTEGER
liCreateTimestamp
;
__C89_NAMELESS
union
{
__C89_NAMELESS
struct
{
int
SpecificPortBind
:
1
;
}
__C89_NAMELESSSTRUCTNAME
;
int
dwFlags
;
}
__C89_NAMELESSUNIONNAME
;
ULONGLONG
OwningModuleInfo
[
TCPIP_OWNING_MODULE_SIZE
];
}
MIB_UDPROW_OWNER_MODULE
,
*
PMIB_UDPROW_OWNER_MODULE
;
typedef
struct
_MIB_UDPTABLE_OWNER_MODULE
{
DWORD
dwNumEntries
;
MIB_UDPROW_OWNER_MODULE
table
[
1
];
}
MIB_UDPTABLE_OWNER_MODULE
,
*
PMIB_UDPTABLE_OWNER_MODULE
;
/* UDP statistics */
typedef
struct
_MIB_UDPSTATS
...
...
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