---
name: "rpma_conn_get_private_data"
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_get_private_data"
---

# rpma\_conn\_get\_private\_data(3)

get a pointer to the connection's private data

## NAME

**rpma\_conn\_get\_private\_data** - get a pointer to the connection's private data

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_conn;
      struct rpma_conn_private_data;
      int rpma_conn_get_private_data(const struct rpma_conn *conn,
                      struct rpma_conn_private_data *pdata);
```

## DESCRIPTION

**rpma\_conn\_get\_private\_data**() obtains the pointer to the private data given by the other side of the connection.

## SECURITY WARNING

The connection's private data is insecure. An attacker might modify all data transferred via the rdma\_cm private data. Users should avoid using [**rpma\_conn\_get\_private\_data**(3)](/rpma_conn_get_private_data/3.md) and [**rpma\_conn\_req\_get\_private\_data**(3)](/rpma_conn_req_get_private_data/3.md) API calls and they should utilize TLS/SSL connections to transfer all configuration data between peers instead.

## RETURN VALUE

The **rpma\_conn\_get\_private\_data**() function returns 0 on success or a negative error code on failure. **rpma\_conn\_get\_private\_data**() does not set \*pdata value on failure.

## ERRORS

**rpma\_conn\_get\_private\_data**() can fail with the following error:

- •

  RPMA\_E\_INVAL - conn or pdata is NULL

## SEE ALSO

[**rpma\_conn\_req\_connect**(3)](/rpma_conn_req_connect/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
