---
name: "radcli_avp_get_bytes_by_num"
section: "3"
platform: "linux"
package: "radcli"
version: "2.0.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/radcli_avp_get_bytes_by_num"
---

# radcli\_avp\_get\_bytes\_by\_num(3)

Look up an attribute by legacy numeric ID and read its first occurrence's raw bytes.

## NAME

radcli\_avp\_get\_bytes\_by\_num - Look up an attribute by legacy numeric ID and read its first occurrence's raw bytes.

## SYNOPSIS

```
#include <radcli/>

int radcli_avp_get_bytes_by_num(
    const radcli_avp_list  *list,
    const radcli_ctx       *ctx,
    uint32_t                attrid,
    uint32_t                vendor,
    const void            **out,
    size_t                 *len
);
```

## DESCRIPTION

## PARAMETERS

- **list**

  the list to search.

- **ctx**

  a context with a dictionary loaded.

- **attrid**

  the attribute ID (a PW\_\* constant, or a vendor type ID when vendor is non-zero).

- **vendor**

  the vendor PEN, or 0 for a standard attribute.

- **out**

  where to write a pointer to the value; valid for list's lifetime. May be NULL.

- **len**

  where to write the value's length in bytes. May be NULL.

## RETURN VALUE

0 on success, -1 on failure (no such attribute, or no occurrence).

## SEE ALSO

[*radcli\_avp\_get\_by\_num*(3)](/radcli_avp_get_by_num/3.md), [*radcli\_avp\_get\_cstr\_by\_num*(3)](/radcli_avp_get_cstr_by_num/3.md), [*radcli\_avp\_get\_ip4prefix\_by\_num*(3)](/radcli_avp_get_ip4prefix_by_num/3.md), [*radcli\_avp\_get\_ip6\_by\_num*(3)](/radcli_avp_get_ip6_by_num/3.md), [*radcli\_avp\_get\_uint32\_by\_num*(3)](/radcli_avp_get_uint32_by_num/3.md), [*radcli\_avp\_get\_uint64\_by\_num*(3)](/radcli_avp_get_uint64_by_num/3.md)
