---
name: "rdma_get_request"
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_request"
---

# rdma\_get\_request(3)

Retrieves the next pending connection request event.

## NAME

rdma\_get\_request - Retrieves the next pending connection request event.

## SYNOPSIS

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

**int rdma\_get\_request** **(struct rdma\_cm\_id \****listen***,** **struct rdma\_cm\_id \*\****id***);**

## ARGUMENTS

- listen

  Listening rdma\_cm\_id.

- id

  rdma\_cm\_id associated with the new connection.

## DESCRIPTION

Retrieves a connection request event.  If no requests are pending, the call will block until an event is received.

## 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 may only be used on listening rdma\_cm\_id's operating synchronously.  On success, a new rdma\_cm\_id representing the connection request will be returned to the user.  The new rdma\_cm\_id will reference event information associated with the request until the user calls rdma\_reject, rdma\_accept, or rdma\_destroy\_id on the newly created identifier.  For a description of the event data, see rdma\_get\_cm\_event.

If QP attributes are associated with the listening endpoint, the returned rdma\_cm\_id will also reference an allocated QP.

## SEE ALSO

[rdma\_get\_cm\_event(3)](/rdma_get_cm_event/3.md), [rdma\_accept(3)](/rdma_accept/3.md), [rdma\_reject(3)](/rdma_reject/3.md), [rdma\_connect(3)](/rdma_connect/3.md), [rdma\_listen(3)](/rdma_listen/3.md), [rdma\_destroy\_id(3)](/rdma_destroy_id/3.md)
