---
name: "rpma_ep_get_fd"
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_get_fd"
---

# rpma\_ep\_get\_fd(3)

get a file descriptor of the endpoint

## NAME

**rpma\_ep\_get\_fd** - get a file descriptor of the endpoint

## SYNOPSIS

```
      #include <librpma.h>
      struct rpma_ep;
      int rpma_ep_get_fd(const struct rpma_ep *ep, int *fd);
```

## DESCRIPTION

**rpma\_ep\_get\_fd**() gets the file descriptor of the endpoint.

## RETURN VALUE

The **rpma\_ep\_get\_fd**() function returns 0 on success or a negative error code on failure. **rpma\_ep\_get\_fd**() does not set \*fd value on failure.

## ERRORS

**rpma\_ep\_get\_fd**() can fail with the following error:

- •

  RPMA\_E\_INVAL - ep or fd is NULL

## SEE ALSO

[**rpma\_ep\_listen**(3)](/rpma_ep_listen/3.md), [**librpma**(7)](/librpma/7.md) and https://pmem.io/rpma/
