DrtCreateIpv6UdpTransport function (drt.h)

The DrtCreateIpv6UdpTransport function creates a transport based on the IPv6 UDP protocol.

Syntax

HRESULT DrtCreateIpv6UdpTransport(
            DRT_SCOPE      scope,
            ULONG          dwScopeId,
            ULONG          dwLocalityThreshold,
  [in, out] USHORT         *pwPort,
  [out]     HDRT_TRANSPORT *phTransport
);

Parameters

scope

The DRT_SCOPE enumeration that specifies the IPv6 scope in which the DRT is to operate.

dwScopeId

The identifier that uniquely specifies the interface the scope is associated with.

For the Global scope this parameter is always the "GLOBAL_" ID and is optional when using only the global scope. For the link local scope, this parameter represents the interface associated with the Network Interface Card on which the link local scope exists.

dwLocalityThreshold

The identifier that specifies how Locality information based on IpV6 addresses is used when caching neighbors. By default, the DRT gives preference to neighbors that have an IPv6 address with a prefix in common with the local machine.

[in, out] pwPort

Pointer to the port utilized by the local DRT instance.

[out] phTransport

Pointer to a DRT transport handle specified in the DRT_SETTINGS structure.

Return value

This function returns S_OK on success. Other possible values include:

Return code Description
E_OUTOFMEMORY
The system cannot allocate memory for the provider.
DRT_E_INVALID_PORT
pwPort is NULL.
DRT_E_INVALID_TRANSPORT_PROVIDER
hTransport is NULL.
DRT_E_INVALID_SCOPE
The specified scope is not DRT_GLOBAL_SCOPE, DRT_SITE_LOCAL_SCOPE or DRT_LINK_LOCAL_SCOPE.
DRT_E_TRANSPORT_UNEXPECTED
An unexpected error has occurred. See TraceError for reason.
 
 

Remarks

The default IPv6 UDP Transport created by this function is specific to the DRT it is created for. As a result it cannot be re-used across multiple DRTs.

When using the Distributed Routing Table API in Windows XP with Service Pack 2 (SP2), support of the IPv6 protocol must be enabled for the creation of a transport using DrtCreateIpv6UdpTransport to be successful.

Requirements

Requirement Value
Minimum supported client Windows 7 Professional [desktop apps only]
Minimum supported server Windows Server 2008 R2 [desktop apps only]
Target Platform Windows
Header drt.h
Library Drttransport.lib
DLL Drt.dll

See also

DRT_SETTINGS

DrtDeleteIpv6UdpTransport