---
name: "rdma_resolve_addr"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/rdma_resolve_addr"
---

# rdma\_resolve\_addr(3)

Resolve destination and optional source addresses.

## NAME

rdma\_resolve\_addr - Resolve destination and optional source addresses.

## SYNOPSIS

**#include \<rdma/rdma\_cma.h\>**

**int rdma\_resolve\_addr** **(struct rdma\_cm\_id \****id***,** **struct sockaddr \****src\_addr***,** **struct sockaddr \****dst\_addr***,** **int** *timeout\_ms***);**

## ARGUMENTS

- id

  RDMA identifier.

- src\_addr

  Source address information.  This parameter may be NULL.

- dst\_addr

  Destination address information.

- timeout\_ms

  Time to wait for resolution to complete.

## DESCRIPTION

Resolve destination and optional source addresses from IP addresses to an RDMA address.  If successful, the specified rdma\_cm\_id will be bound to a local device.

## RETURN VALUE

Returns 0 on success, or -1 on error.  If an error occurs, errno will be set to indicate the failure reason.

## NOTES

This call is used to map a given destination IP address to a usable RDMA address.  The IP to RDMA address mapping is done using the local routing tables, or via ARP. If a source address is given, the rdma\_cm\_id is bound to that address, the same as if rdma\_bind\_addr were called.  If no source address is given, and the rdma\_cm\_id has not yet been bound to a device, then the rdma\_cm\_id will be bound to a source address based on the local routing tables.  After this call, the rdma\_cm\_id will be bound to an RDMA device.  This call is typically made from the active side of a connection before calling rdma\_resolve\_route and rdma\_connect.

## INFINIBAND SPECIFIC

This call maps the destination and, if given, source IP addresses to GIDs. In order to perform the mapping, IPoIB must be running on both the local and remote nodes.

## SEE ALSO

[rdma\_create\_id(3)](/rdma_create_id/3.md), [rdma\_resolve\_route(3)](/rdma_resolve_route/3.md), [rdma\_connect(3)](/rdma_connect/3.md), [rdma\_create\_qp(3)](/rdma_create_qp/3.md), [rdma\_get\_cm\_event(3)](/rdma_get_cm_event/3.md), [rdma\_bind\_addr(3)](/rdma_bind_addr/3.md), [rdma\_get\_src\_port(3)](/rdma_get_src_port/3.md), [rdma\_get\_dst\_port(3)](/rdma_get_dst_port/3.md), [rdma\_get\_local\_addr(3)](/rdma_get_local_addr/3.md), [rdma\_get\_peer\_addr(3)](/rdma_get_peer_addr/3.md)
