MIB_TCP6ROW_OWNER_MODULE structure (tcpmib.h)

The MIB_TCP6ROW_OWNER_MODULE structure contains information that describes an IPv6 TCP connection bound to a specific process ID (PID) with ownership data.

Syntax

typedef struct _MIB_TCP6ROW_OWNER_MODULE {
  UCHAR         ucLocalAddr[16];
  DWORD         dwLocalScopeId;
  DWORD         dwLocalPort;
  UCHAR         ucRemoteAddr[16];
  DWORD         dwRemoteScopeId;
  DWORD         dwRemotePort;
  DWORD         dwState;
  DWORD         dwOwningPid;
  LARGE_INTEGER liCreateTimestamp;
  ULONGLONG     OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE];
} MIB_TCP6ROW_OWNER_MODULE, *PMIB_TCP6ROW_OWNER_MODULE;

Members

ucLocalAddr[16]

Type: UCHAR[16]

The IPv6 address for the local endpoint of the TCP connection on the local computer. A value of zero indicates the listener can accept a connection on any interface.

dwLocalScopeId

Type: DWORD

The scope ID in network byte order for the local IPv6 address.

dwLocalPort

Type: DWORD

The port number in network byte order for the local endpoint of the TCP connection on the local computer.

ucRemoteAddr[16]

Type: UCHAR[16]

The IPv6 address of the remote endpoint of the TCP connection on the remote computer. When the dwState member is MIB_TCP_STATE_LISTEN, this value has no meaning.

dwRemoteScopeId

Type: DWORD

The scope ID in network byte order for the remote IPv6 address.

dwRemotePort

Type: DWORD

The port number in network byte order for the remote endpoint of the TCP connection on the remote computer.

dwState

Type: DWORD

The state of the TCP connection. This member can be one of the values from the MIB_TCP_STATE enumeration defined in the Tcpmib.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.

Value Meaning
MIB_TCP_STATE_CLOSED
1
The TCP connection is in the CLOSED state that represents no connection state at all.
MIB_TCP_STATE_LISTEN
2
The TCP connection is in the LISTEN state waiting for a connection request from any remote TCP and port.
MIB_TCP_STATE_SYN_SENT
3
The TCP connection is in the SYN-SENT state waiting for a matching connection request after having sent a connection request (SYN packet).
MIB_TCP_STATE_SYN_RCVD
4
The TCP connection is in the SYN-RECEIVED state waiting for a confirming connection request acknowledgment after having both received and sent a connection request (SYN packet).
MIB_TCP_STATE_ESTAB
5
The TCP connection is in the ESTABLISHED state that represents an open connection, data received can be delivered to the user. This is the normal state for the data transfer phase of the TCP connection.
MIB_TCP_STATE_FIN_WAIT1
6
The TCP connection is FIN-WAIT-1 state waiting for a connection termination request from the remote TCP, or an acknowledgment of the connection termination request previously sent.
MIB_TCP_STATE_FIN_WAIT2
7
The TCP connection is FIN-WAIT-1 state waiting for a connection termination request from the remote TCP.
MIB_TCP_STATE_CLOSE_WAIT
8
The TCP connection is in the CLOSE-WAIT state waiting for a connection termination request from the local user.
MIB_TCP_STATE_CLOSING
9
The TCP connection is in the CLOSING state waiting for a connection termination request acknowledgment from the remote TCP.
MIB_TCP_STATE_LAST_ACK
10
The TCP connection is in the LAST-ACK state waiting for an acknowledgment of the connection termination request previously sent to the remote TCP (which includes an acknowledgment of its connection termination request).
MIB_TCP_STATE_TIME_WAIT
11
The TCP connection is in the TIME-WAIT state waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request.
MIB_TCP_STATE_DELETE_TCB
12
The TCP connection is in the delete TCB state that represents the deletion of the Transmission Control Block (TCB), a data structure used to maintain information on each TCP entry.

dwOwningPid

Type: DWORD

The PID of the local 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 connection occurred.

OwningModuleInfo[TCPIP_OWNING_MODULE_SIZE]

Type: ULONGLONG[TCPIP_OWNING_MODULE_SIZE]

An array of opaque data that contains ownership information.

Remarks

The MIB_TCP6TABLE_OWNER_MODULE structure is returned by a call to GetExtendedTcpTable with the TableClass parameter set to a 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_INET6. The MIB_TCP6TABLE_OWNER_MODULE structure contains an array of MIB_TCP6ROW_OWNER_MODULE structures.

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 ucLocalAddr and ucRemoteAddr members are stored in a character array in network byte order. The RtlIpv6AddressToString or RtlIpv6AddressToStringEx functions may be used to convert the IPv6 address in the ucLocalAddr or ucRemoteAddr members to a string without loading the Windows Sockets DLL.

The dwLocalScopeId, and dwRemoteScopeId members are in network byte order. In order to use the dwLocalScopeId or dwRemoteScopeId members, the ntohl or inet_ntoa functions in Windows Sockets or similar functions may be needed.

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.

On the Microsoft Windows Software Development Kit (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)

See also

GetExtendedTcpTable

RtlIpv6AddressToString

RtlIpv6AddressToStringEx

SYSTEMTIME

TCP_TABLE_CLASS

inet_ntoa

ntohl

ntohs