---
name: "rpma_mr_remote_from_descriptor"
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_mr_remote_from_descriptor"
---

# rpma\_mr\_remote\_from\_descriptor(3)

create a memory region from a descriptor

## NAME

**rpma\_mr\_remote\_from\_descriptor** - create a memory region from a descriptor

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_mr_remote;
      int rpma_mr_remote_from_descriptor(const void *desc, size_t desc_size,
                      struct rpma_mr_remote **mr_ptr);
```

## DESCRIPTION

Create a remote memory region's structure based on the provided descriptor with a network-transferable description of the memory region local to the remote peer.

## SECURITY WARNING

An attacker might modify the serialized remote memory registration configuration while it is transferred via an unsecured connection (e.g. rdma\_cm private data), which might cause data corruption when writing to a different location. 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\_mr\_remote\_from\_descriptor**() function returns 0 on success or a negative error code on failure. **rpma\_mr\_remote\_from\_descriptor**() does not set \*mr\_ptr value on failure.

## ERRORS

**rpma\_mr\_remote\_from\_descriptor**() can fail with the following errors:

- •

  RPMA\_E\_INVAL - desc or mr\_ptr is NULL

- •

  RPMA\_E\_INVAL - incompatible descriptor size

- •

  RPMA\_E\_NOSUPP - deserialized information does not represent a valid memory region

- •

  RPMA\_E\_NOMEM - out of memory

## SEE ALSO

[**rpma\_mr\_remote\_delete**(3)](/rpma_mr_remote_delete/3.md), [**rpma\_mr\_remote\_get\_flush\_type**(3)](/rpma_mr_remote_get_flush_type/3.md), [**rpma\_mr\_remote\_get\_size**(3)](/rpma_mr_remote_get_size/3.md), [**rpma\_flush**(3)](/rpma_flush/3.md), [**rpma\_read**(3)](/rpma_read/3.md), [**rpma\_write**(3)](/rpma_write/3.md), [**rpma\_atomic\_write**(3)](/rpma_atomic_write/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
