---
name: "rdma_get_dst_port"
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_get_dst_port"
---

# rdma\_get\_dst\_port(3)

Returns the remote port number of a bound rdma\_cm\_id.

## NAME

rdma\_get\_dst\_port - Returns the remote port number of a bound rdma\_cm\_id.

## SYNOPSIS

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

**uint16\_t rdma\_get\_dst\_port** **(struct rdma\_cm\_id \****id***);**

## ARGUMENTS

- id

  RDMA identifier.

## DESCRIPTION

Returns the remote port number for an rdma\_cm\_id that has been bound to a remote address.

## RETURN VALUE

Returns the 16-bit port identifier associated with the peer endpoint.  If the rdma\_cm\_id is not connected, the returned value is 0.

## SEE ALSO

[rdma\_connect(3)](/rdma_connect/3.md), [rdma\_accept(3)](/rdma_accept/3.md), [rdma\_get\_cm\_event(3)](/rdma_get_cm_event/3.md), [rdma\_get\_src\_port(3)](/rdma_get_src_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)
