---
name: "rdma_reject"
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_reject"
---

# rdma\_reject(3)

Called to reject a connection request.

## NAME

rdma\_reject - Called to reject a connection request.

## SYNOPSIS

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

**int rdma\_reject** **(struct rdma\_cm\_id \****id***,** **const void \****private\_data***,** **uint8\_t** *private\_data\_len***);**

## ARGUMENTS

- id

  Connection identifier associated with the request.

- private\_data

  Optional private data to send with the reject message.

- private\_data\_len

  Specifies the size of the user-controlled data buffer.  Note that the actual amount of data transferred to the remote side is transport dependent and may be larger than that requested.

## DESCRIPTION

Called from the listening side to reject a connection or datagram service lookup request.

## RETURN VALUE

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

## NOTES

After receiving a connection request event, a user may call rdma\_reject to reject the request.  If the underlying RDMA transport supports private data in the reject message, the specified data will be passed to the remote side.

## SEE ALSO

[rdma\_listen(3)](/rdma_listen/3.md), [rdma\_accept(3)](/rdma_accept/3.md), [rdma\_get\_cm\_event(3)](/rdma_get_cm_event/3.md)
