---
name: "umad_get_ca_portguids"
section: "3"
platform: "linux"
package: "rdma-core"
version: "65.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/umad_get_ca_portguids"
---

# umad\_get\_ca\_portguids(3)

get the InfiniBand device ports GUIDs

## NAME

umad\_get\_ca\_portguids - get the InfiniBand device ports GUIDs

## SYNOPSIS

```
#include <infiniband/umad.h>

int umad_get_ca_portguids(char *ca_name, __be64 *portguids, int max);
```

## DESCRIPTION

**umad\_get\_ca\_portguids()** fills the *portguids* array with up to *max* port GUIDs belonging the specified IB device *ca\_name* , or to the default IB device if *ca\_name* is NULL. The argument *portguids* is an array of *max* uint64\_t entries.

## RETURN VALUE

On success, **umad\_get\_ca\_portguids()** returns a non-negative value equal to the number of port GUIDs actually filled. Not all filled entries may be valid. Invalid entries will be 0. For example, on a CA node with only one port, this function returns a value of 2. In this case, the value at index 0 will be invalid as it is reserved for switches. On failure, a negative value is returned.

## SEE ALSO

[**umad\_get\_cas\_names**(3)](/umad_get_cas_names/3.md)

## AUTHORS

- Hal Rosenstock \<halr@voltaire.com\>

  - Dotan Barak \<dotanb@mellanox.co.il\>
