TdiDeregisterNetAddress function

The TdiDeregisterNetAddress function is the reciprocal of TdiRegisterNetAddress. It removes a transport-supplied network address from the list of valid network addresses registered with TDI.

Syntax

NTSTATUS TdiDeregisterNetAddress(
  _In_ HANDLE AddrRegistrationHandle
);

Parameters

  • AddrRegistrationHandle [in]
    Specifies the handle returned by a preceding call to TdiRegisterNetAddress.

Return value

TdiDeregisterNetAddress returns STATUS_SUCCESS if the registration was released and all bound clients were notified. Otherwise, it can return STATUS_INSUFFICIENT_RESOURCES. (Because the availability of system resources is dynamic, a subsequent call from the same transport can succeed.)

Remarks

A TDI transport calls TdiDeregisterNetAddress when a disconnection from a remote node on the network occurs, whether the disconnection was initiated at the remote node or because the transport itself initiated this operation, possibly because it is tearing down a binding to the underlying NIC. In either case, the transport must tear down the state it was maintaining about the network address that it previously registered with TdiRegisterNetAddress.

TdiDeregisterNetAddress notifies the calling transport's clients that they can no longer send data to nor expect to receive data from the formerly registered network address. When this call occurs, TDI calls the ClientPnPDelNetAddress functions of all clients that have registered themselves with TdiRegisterPnPHandlers to receive these notifications. If a client has the given address open when this call to ClientPnPDelNetAddress occurs, it must close that address.

If TdiDeregisterNetAddress returns STATUS_INSUFFICIENT_RESOURCES, the transport should fail any subsequent incoming client sends directed to its still registered network address. When convenient, the transport should call TdiDeregisterNetAddress again because a temporary shortage of available system memory might have caused its original call to fail.

Note   The TDI feature is deprecated and will be removed in future versions of Microsoft Windows. Depending on how you use TDI, use either the Winsock Kernel (WSK) or Windows Filtering Platform (WFP). For more information about WFP and WSK, see Windows Filtering Platform and Winsock Kernel. For a Windows Core Networking blog entry about WSK and TDI, see Introduction to Winsock Kernel (WSK).

 

Requirements

Target platform

Universal

Header

Tdikrnl.h (include TdiKrnl.h)

Library

Tdi.lib

IRQL

< DISPATCH_LEVEL

See also

ClientPnPDelNetAddress

TdiRegisterNetAddress

TdiRegisterPnPHandlers

 

 

Send comments about this topic to Microsoft