INDConnector::GetPeerAddress Method
Retrieves the address of the peer's Network Direct adapter. To succeed, the endpoint must be connected.
Syntax
HRESULT GetPeerAddress(
[out, optional] struct sockaddr *pAddress,
[in, out] SIZE_T *pAddressLength
);
Parameters
pAddress [out, optional]
A sockaddr buffer that will receive the remote address. May be NULL if pAddressLength is zero.pAddressLength [in, out]
The size, in bytes, of the pAddress buffer. If the buffer is too small, the method fails with ND_BUFFER_OVERFLOW and sets this parameter to the required buffer size. If the buffer in too big, the method sets this parameter to the size used on output.
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 operation succeeded. |
ND_BUFFER_OVERFLOW | The pAddress buffer is not large enough to hold the address—the buffer was not modified. The pAddressLength parameter is updated with the required buffer size. |
ND_CONNECTION_INVALID | The endpoint is not connected. |
Requirements
Product |
Microsoft Message Passing Interface (MS-MPI) |
Header |
Ndspi.h |
See Also
Send comments about this topic to Microsoft
Build date: 7/2/2010