Answer the question
In order to leave comments, you need to log in
How to find out through Python which ports are occupied by applications in Windows?
What library can provide such functionality? (Which ports applications use)
Needed to collect information for the subsequent separation of traffic through the router.
Answer the question
In order to leave comments, you need to log in
On Windows? If yes, then use WinAPI to access this information.
Dig in this direction. Namespaces: Windows, Winsock, Winsock2.
GetTcpTable: function(pTcpTable: PMIB_TCPTABLE; var pdwSize: DWORD; bOrder: BOOL): DWORD; stdcall;
{$EXTERNALSYM GetTcpTable}
GetUdpTable: function(pUdpTable: PMIB_UDPTABLE; var pdwSize: DWORD; bOrder: BOOL): DWORD; stdcall;
{$EXTERNALSYM GetUdpTable}
GetExtendedTcpTable: function(pTcpTable: PMIB_TCPEXTABLE; var pdwSize: DWORD; bOrder: BOOL; ulAf: ULONG; TableClass: TCP_TABLE_CLASS; Reserved: ULONG): DWORD; stdcall;
{$EXTERNALSYM GetExtendedTcpTable}
GetExtendedUdpTable: function(pTcpTable: PMIB_UDPEXTABLE; var pdwSize: DWORD; bOrder: BOOL; ulAf: ULONG; TableClass: UDP_TABLE_CLASS; Reserved: ULONG): DWORD; stdcall;
{$EXTERNALSYM GetExtendedUdpTable}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question