Share via


GetTcp6Table (Compact 2013)

3/26/2014

This function retrieves the TCP connection table for IPv6.

Syntax

ULONG WINAPI GetTcp6Table(
  __out    PMIB_TCP6TABLE TcpTable,
  __inout  PULONG SizePointer,
  __in     BOOL Order
);

Parameters

  • TcpTable
    A pointer to a buffer that receives the TCP connection table for IPv6 as a MIB_TCP6TABLE structure.
  • SizePointer
    On input, specifies the size in bytes of the buffer pointed to by the TcpTable parameter.

    On output, if the buffer is not large enough to hold the returned TCP connection table, the function sets this parameter equal to the required buffer size in bytes.

  • Order
    A Boolean value that specifies whether the TCP connection table should be sorted. If this parameter is TRUE, the table is sorted in ascending order, starting with the lowest local IP address. If this parameter is FALSE, the table appears in the order in which they were retrieved.

    The following values are compared (as listed) when ordering the TCP endpoints:

    1. Local IPv6 address
    2. Local scope ID
    3. Local port
    4. Remote IPv6 address
    5. Remote scope ID
    6. Remote port

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Return code

Description

ERROR_INSUFFICIENT_BUFFER

The buffer pointed to by the TcpTable parameter is not large enough. The required size is returned in the variable pointed to by the SizePointer parameter.

ERROR_INVALID_PARAMETER

The SizePointer parameter is NULL, or GetTcp6Table is unable to write to the memory pointed to by the SizePointer parameter.

ERROR_NOT_SUPPORTED

This function is not supported on the operating system that is used on the local system.

Other

Use FormatMessage to obtain the message string for the returned error.

See Also

Reference

IP Helper Functions
GetExtendedTcpTable
GetOwnerModuleFromTcp6Entry
GetTcp6Table2
GetTcpStatisticsEx
GetTcpTable2
MIB_TCP6ROW
MIB_TCP6ROW_OWNER_MODULE
MIB_TCP6ROW_OWNER_PID
MIB_TCP6TABLE
MIB_TCP6TABLE_OWNER_MODULE
MIB_TCP6TABLE_OWNER_PID