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

# rdma\_resolve\_addrinfo(3)

Resolve RDMA addresses which supports both DNS and IB SA.

## Name

RDMA\_RESOLVE\_ADDRINFO - Resolve RDMA addresses which supports both DNS and IB SA.

## SYNOPSIS

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

int rdma\_resolve\_addrinfo(struct rdma\_cm\_id \*id, const char \*node, const char \*service, const struct rdma\_addrinfo \*hints);

## ARGUMENTS

id      RDMA identifier.

node    Optional, name, dotted-decimal IPv4, or IPv6 hex address to resolve.

service The service name or port number of address.

hints   Reference to an rdma\_addrinfo structure containing hints about the type of service the caller supports.

## DESCRIPTION

This call submits an asynchronous address resolution request. The behavior is similar to rdma\_getaddrinfo(), except that the operation is asynchronous, generating an event on the RDMA CM event channel that is associated with the specified rdma\_cm\_id when complete. The %node, %service, and %hints parameters are defined similarly to rdma\_getaddrinfo().

## RETURN VALUE

Returns 0 on success. Success indicates that asynchronous address resolution was initiated. The result of the resolution, whether successful or failed, will be reported as an event on the related event channel.

Returns -1 on error, errno will be set to indicate the failure reason. The address resolution was not started, and no event will be generated on the event channel.

## NOTES

- **This call supports both DNS and IB SA resolution, depends on the hints.ai\_flags:**

  - •

    RAI\_DNS: Performs address resolution using DNS.

  - •

    RAI\_SA: Performs address resolution using the Infiniband SA. The rdma\_cm\_id associated with the call must be bound to an Infiniband port, or an error will occur. The %node parameter must be null (not supported). %Service should be an IB service name or ID.

These 2 flags are mutual-exclusive; If none of them is set then DNS is the default.

The cm event RDMA\_CM\_EVENT\_ADDRINFO\_RESOLVED (on success) or RDMA\_CM\_EVENT\_ADDRINFO\_ERROR (on failure) is generated.

## SEE ALSO

[rdma\_getaddrinfo(3)](/rdma_getaddrinfo/3.md), [rdma\_query\_addrinfo(3)](/rdma_query_addrinfo/3.md)

## AUTHOR

Mark Zhang \<\<markzhang@nvidia.com\>\>
