rdma_bind_addr

Binds an remote direct memory access (RDMA) identifier to a source address.

Syntax

#include <rdma/rdma_cma.h>
int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr);

Description

The rdma_bind_addr function associates a source address with an rdma_cm_id identifier. The address can be a wildcard value. If an rdma_cm_id identifier has a local address, the identifier also has a local RDMA device.

Notes:
  • The rdma_bind_addr operation is run before the rdma_listen operation to bind to a specific port number. The rdma_bind_addr operation is run on the active side of a connection before the rdma_resolve_addr routine runs to bind to a specific address.
  • If the rdma_bind_addr operation is used to bind to port 0, the rdma_cm function selects an available port that can be retrieved with the rdma_get_src_port operation.

Parameters

Item Description
id Specifies the RDMA identifier.
addr Specifies the local address information. Wildcard values are permitted.

Return Values

The rdma_bind_addr function returns the following values:
Item Description
0 On success.
-1 Error, see errno.