MIB_TCPROW_OWNER_MODULE structure (tcpmib.h)
The MIB_TCPROW_OWNER_MODULE structure contains information that describes an IPv4 TCP connection with ownership data, IPv4 addresses, ports used by the TCP connection, and the specific process ID (PID) associated with connection.
Syntax
typedef struct _MIB_TCPROW_OWNER_MODULE {
DWORD dwState;
DWORD dwLocalAddr;
DWORD dwLocalPort;
DWORD dwRemoteAddr;
DWORD dwRemotePort;
DWORD dwOwningPid;
LARGE_INTEGER liCreateTimestamp;
ULONGLONG OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE];
} MIB_TCPROW_OWNER_MODULE, *PMIB_TCPROW_OWNER_MODULE;
Members
dwState
Type: DWORD
dwState
Type: DWORD The state of the TCP connection. This member can be one of the values defined in the Iprtrmib.h header file.
On the Windows SDK released for Windows Vista and later, the organization of header files has changed. This member can be one of the values from the MIB_TCP_STATE enumeration defined in the Tcpmib.h header file, not in the Iprtrmib.h header file. Note that the Tcpmib.h header file is automatically included in Iprtrmib.h, which is automatically included in the Iphlpapi.h header file. The Tcpmib.h and Iprtrmib.h header files should never be used directly.
dwLocalAddr
Type: DWORD
The local IPv4 address for the TCP connection on the local computer. A value of zero indicates the listener can accept a connection on any interface.
dwLocalPort
Type: DWORD
The local port number in network byte order for the TCP connection on the local computer.
dwRemoteAddr
Type: DWORD
The IPv4 address for the TCP connection on the remote computer. When the dwState member is MIB_TCP_STATE_LISTEN, this value has no meaning.
dwRemotePort
Type: DWORD
The remote port number in network byte order for the TCP connection on the remote computer. When the dwState member is MIB_TCP_STATE_LISTEN, this member has no meaning.
dwOwningPid
Type: DWORD
The PID of the process that issued a context bind for this TCP connection.
liCreateTimestamp
Type: LARGE_INTEGER
A FILETIME structure that indicates when the context bind operation that created this TCP link occurred.
OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE]
Type: ULONGLONG[TCPIP_OWNING_MODULE_SIZE]
An array of opaque data that contains ownership information.
Remarks
The MIB_TCPROW_OWNER_MODULE structure is returned by a call to GetExtendedTcpTable with the TableClass parameter set to TCP_TABLE_OWNER_MODULE_LISTENER, TCP_TABLE_OWNER_MODULE_CONNECTIONS, or TCP_TABLE_OWNER_MODULE_ALL from the TCP_TABLE_CLASS enumeration and the ulAf parameter set to AF_INET4.
The dwState member indicates the state of the TCP entry in a TCP state diagram. A TCP connection progresses through a series of states during its lifetime. The states are: LISTEN, SYN-SENT, SYN-RECEIVED, ESTABLISHED, FIN-WAIT-1, FIN-WAIT-2, CLOSE-WAIT, CLOSING, LAST-ACK, TIME-WAIT, and the fictional state CLOSED. The CLOSED state is fictional because it represents the state when there is no Transmission Control Block, and therefore, no connection. The TCP protocol is described in RFC 793. For more information, see http://www.ietf.org/rfc/rfc793.txt.
The dwLocalPort, and dwRemotePort members are in network byte order. In order to use the dwLocalPort or dwRemotePort members, the ntohs or inet_ntoa functions in Windows Sockets or similar functions may be needed. The dwLocalAddr and dwRemoteAddr members are stored as a DWORD in the same format as the in_addr structure. In order to use the dwLocalAddr or dwRemoteAddr members, the ntohl or inet_ntoa functions in Windows Sockets or similar functions may be needed. On Windows Vista and later, the RtlIpv4AddressToString or RtlIpv4AddressToStringEx functions may be used to convert the IPv4 address in the dwLocalAddr or dwRemoteAddr members to a string without loading the Windows Sockets DLL.
On the Windows SDK released for Windows Vista and later, the organization of header files has changed. This structure is defined in the Tcpmib.h header file, not in the Iprtrmib.h header file. Note that the Tcpmib.h header file is automatically included in Iprtrmib.h, which is automatically included in the Iphlpapi.h header file. The Tcpmib.h and Iprtrmib.h header files should never be used directly.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista, Windows XP with SP2 [desktop apps only] |
Minimum supported server | Windows Server 2008, Windows Server 2003 with SP1 [desktop apps only] |
Header | tcpmib.h (include Iphlpapi.h) |