mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[TCPIP] Implement enumerating UDP connections with owner PID
This commit is contained in:
parent
2b55073360
commit
13de7f08af
3 changed files with 14 additions and 5 deletions
|
@ -121,7 +121,8 @@ TDI_STATUS InfoTdiQueryGetConnectionTcpTable( PADDRESS_FILE AddrFile,
|
|||
|
||||
TDI_STATUS InfoTdiQueryGetConnectionUdpTable( PADDRESS_FILE AddrFile,
|
||||
PNDIS_BUFFER Buffer,
|
||||
PUINT BufferSize);
|
||||
PUINT BufferSize,
|
||||
BOOLEAN Extended);
|
||||
|
||||
TDI_STATUS InfoTdiSetRoute(PIP_INTERFACE IF,
|
||||
PVOID Buffer,
|
||||
|
|
|
@ -271,6 +271,11 @@ TDI_STATUS InfoTdiQueryInformationEx(
|
|||
return InfoTdiQueryGetConnectionTcpTable(EntityListContext, Buffer, BufferSize, TRUE);
|
||||
else
|
||||
return TDI_INVALID_PARAMETER;
|
||||
else if (ID->toi_entity.tei_entity == CL_TL_ENTITY)
|
||||
if ((EntityListContext = GetContext(ID->toi_entity)))
|
||||
return InfoTdiQueryGetConnectionUdpTable(EntityListContext, Buffer, BufferSize, TRUE);
|
||||
else
|
||||
return TDI_INVALID_PARAMETER;
|
||||
else
|
||||
return TDI_INVALID_PARAMETER;
|
||||
|
||||
|
@ -297,7 +302,7 @@ TDI_STATUS InfoTdiQueryInformationEx(
|
|||
return TDI_INVALID_PARAMETER;
|
||||
else if (ID->toi_entity.tei_entity == CL_TL_ENTITY)
|
||||
if ((EntityListContext = GetContext(ID->toi_entity)))
|
||||
return InfoTdiQueryGetConnectionUdpTable(EntityListContext, Buffer, BufferSize);
|
||||
return InfoTdiQueryGetConnectionUdpTable(EntityListContext, Buffer, BufferSize, FALSE);
|
||||
else
|
||||
return TDI_INVALID_PARAMETER;
|
||||
else
|
||||
|
|
|
@ -249,17 +249,20 @@ TDI_STATUS InfoTdiQueryGetConnectionTcpTable(PADDRESS_FILE AddrFile,
|
|||
|
||||
TDI_STATUS InfoTdiQueryGetConnectionUdpTable(PADDRESS_FILE AddrFile,
|
||||
PNDIS_BUFFER Buffer,
|
||||
PUINT BufferSize)
|
||||
PUINT BufferSize,
|
||||
BOOLEAN Extended)
|
||||
{
|
||||
MIB_UDPROW UdpRow;
|
||||
MIB_UDPROW_OWNER_PID UdpRow;
|
||||
TDI_STATUS Status = TDI_INVALID_REQUEST;
|
||||
|
||||
TI_DbgPrint(DEBUG_INFO, ("Called.\n"));
|
||||
|
||||
UdpRow.dwLocalAddr = AddrFile->Address.Address.IPv4Address;
|
||||
UdpRow.dwLocalPort = AddrFile->Port;
|
||||
UdpRow.dwOwningPid = (DWORD)AddrFile->ProcessId;
|
||||
|
||||
Status = InfoCopyOut( (PCHAR)&UdpRow, sizeof(UdpRow),
|
||||
Status = InfoCopyOut( (PCHAR)&UdpRow,
|
||||
(Extended ? sizeof(MIB_UDPROW_OWNER_PID) : sizeof(MIB_UDPROW)),
|
||||
Buffer, BufferSize );
|
||||
|
||||
TI_DbgPrint(DEBUG_INFO, ("Returning %08x\n", Status));
|
||||
|
|
Loading…
Reference in a new issue