---
name: "rpma_conn_req_new"
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_conn_req_new"
---

# rpma\_conn\_req\_new(3)

create a new outgoing connection request object

## NAME

**rpma\_conn\_req\_new** - create a new outgoing connection request object

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_peer;
      struct rpma_conn_cfg;
      struct rpma_conn_req;
      int rpma_conn_req_new(struct rpma_peer *peer, const char *addr, const char *port,
                      const struct rpma_conn_cfg *cfg, struct rpma_conn_req **req_ptr);
```

## DESCRIPTION

**rpma\_conn\_req\_new**() creates a new outgoing connection request object using reliable, connection-oriented and message-based (RDMA\_PS\_TCP) QP communication.

## RETURN VALUE

The **rpma\_conn\_req\_new**() function returns 0 on success or a negative error code on failure. **rpma\_conn\_req\_new**() does not set \*req\_ptr value on failure. If cfg is NULL, then the default values are used

- •

  see [**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md) for more details.

## ERRORS

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

- •

  RPMA\_E\_INVAL - peer, addr, port or req\_ptr is NULL

- •

  RPMA\_E\_NOMEM - out of memory

- •

  RPMA\_E\_PROVIDER - [**rdma\_create\_id**(3)](/rdma_create_id/3.md), [**rdma\_resolve\_addr**(3)](/rdma_resolve_addr/3.md), [**rdma\_resolve\_route**(3)](/rdma_resolve_route/3.md) or [**ibv\_create\_cq**(3)](/ibv_create_cq/3.md) failed

## SEE ALSO

[**rpma\_conn\_cfg\_new**(3)](/rpma_conn_cfg_new/3.md), [**rpma\_conn\_req\_connect**(3)](/rpma_conn_req_connect/3.md), [**rpma\_conn\_req\_delete**(3)](/rpma_conn_req_delete/3.md), [**rpma\_conn\_req\_recv**(3)](/rpma_conn_req_recv/3.md), [**rpma\_ep\_next\_conn\_req**(3)](/rpma_ep_next_conn_req/3.md), [**rpma\_peer\_new**(3)](/rpma_peer_new/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
