---
name: "umad_get_ca"
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"
---

# umad\_get\_ca(3)

get and release InfiniBand device port attributes

## NAME

umad\_get\_ca, umad\_release\_ca - get and release InfiniBand device port attributes

## SYNOPSIS

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

int umad_get_ca(char *ca_name, umad_ca_t *ca);

int umad_release_ca(umad_ca_t *ca);
```

## DESCRIPTION

**umad\_get\_ca()** gets the attributes of the InfiniBand device *ca\_name.* It fills the *ca* structure with the device attributes specified by the *ca\_name* or with the default device attributes if *ca\_name* is NULL. **umad\_release\_ca()** should be called before the *ca* structure is deallocated. The argument *ca* is an *umad\_ca\_t* struct, as specified in \<infiniband/umad.h\>.

```
typedef struct umad_ca {
char ca_name[UMAD_CA_NAME_LEN];                 /* Name of the device */
uint node_type;                                 /* Type of the device */
int numports;                                   /* Number of physical ports */
char fw_ver[20];                                /* FW version */
char ca_type[40];                               /* CA type (e.g. MT23108, etc.) */
char hw_ver[20];                                /* Hardware version */
uint64_t node_guid;                             /* Node GUID */
uint64_t system_guid;                           /* System image GUID */
umad_port_t *ports[UMAD_CA_MAX_PORTS];          /* Array of device port properties */
} umad_ca_t;
```

**umad\_release\_ca()** releases the resources that were allocated in the function **umad\_get\_ca().**

## RETURN VALUE

**umad\_get\_ca()** and **umad\_release\_ca()** return 0 on success, and a negative value on error.

## AUTHORS

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

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