Binds an RDMA identifier to a source address.
#include <rdma/rdma_cma.h> int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr);
The rdma_bind_addr function associates a source address with an rdma_cm_id. The address might be a wildcard value. If an rdma_cm_id is bound to a local address, the identifier is also bound to a local RDMA device.
id | Specifies the RDMA identifier. |
addr | Specifies the local address information. Wildcard values are permitted. |
0 | On success. |
-1 | Error, see errno. |
-EINVAL | If the id parameter is NULL or the family is a Bad Protocol family. |
-ENODATA | The write operation on id->channel->fd failed. |
-ENOMEM | The memory is not enough to allocate by malloc. |