INDProvider::OpenAdapter Method

Retrieves an interface to a local Network Direct adapter.

Syntax

HRESULT OpenAdapter(
  [in]   const struct sockaddr *pAddress,
  [in]   SIZE_T AddressLength,
  [out]  INDAdapter **phAdapter
);

Parameters

  • pAddress [in]
    A sockaddr structure that specifies the address of a local Network Direct adapter to open. Typically, this is a sockaddr_in structure for IPv4 addresses and a sockaddr_in6 structure for IPv6 addresses.

    The sin_port and sin6_port members are ignored for sockaddr_in and sockaddr_in6 address structures, respectively.

  • AddressLength [in]
    The size, in bytes, of the pAddress buffer.

  • phAdapter [out]
    An INDAdapter interface to the opened adapter.

Return Value

When you implement this method, you should return the following return values. If you return others, try to use well-known values to aid in debugging issues.

Return code Description
ND_SUCCESS

The call succeeded and the handle to the opened adapter is returned in the phAdapter parameter.

ND_NO_MEMORY

There was not enough memory to open the adapter.

ND_INVALID_ADDRESS

The address specified by the pAddress parameter is not supported by the Network Direct provider.

 

Implementation Notes

After getting an interface to the adapter, the application may release the INDProvider interface. Providers must ensure that they remain loaded while resources are allocated.

Requirements

Product

Microsoft Message Passing Interface (MS-MPI)

Header

Ndspi.h

See Also

INDProvider

INDProvider::QueryAddressList

 

 

Send comments about this topic to Microsoft

Build date: 7/2/2010