---
name: "rpma_ep_next_conn_req"
section: "3"
platform: "linux"
package: "librpma-dev"
version: "1.3.0-2+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/rpma_ep_next_conn_req"
---

# rpma\_ep\_next\_conn\_req(3)

obtain an incoming connection request

## NAME

**rpma\_ep\_next\_conn\_req** - obtain an incoming connection request

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_ep;
      struct rpma_conn_cfg;
      struct rpma_conn_req;
      int rpma_ep_next_conn_req(struct rpma_ep *ep, const struct rpma_conn_cfg *cfg,
                      struct rpma_conn_req **req_ptr);
```

## DESCRIPTION

**rpma\_ep\_next\_conn\_req**() obtains the next connection request from the endpoint.

## RETURN VALUE

The **rpma\_ep\_next\_conn\_req**() function returns 0 on success or a negative error code on failure. **rpma\_ep\_next\_conn\_req**() does not set \*req\_ptr value on failure.

## ERRORS

**rpma\_ep\_next\_conn\_req**() can fail with the following errors:

- •

  RPMA\_E\_INVAL - ep or req\_ptr is NULL

- •

  RPMA\_E\_INVAL - obtained an event different than a connection request

- •

  RPMA\_E\_PROVIDER - [**rdma\_get\_cm\_event**(3)](/rdma_get_cm_event/3.md) failed

- •

  RPMA\_E\_NOMEM - out of memory

- •

  RPMA\_E\_NO\_EVENT - no next connection request available

## SEE ALSO

[**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md), [**rpma\_conn\_req\_delete**(3)](/rpma_conn_req_delete/3.md), [**rpma\_conn\_req\_connect**(3)](/rpma_conn_req_connect/3.md), [**rpma\_ep\_listen**(3)](/rpma_ep_listen/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
