radcli_avp_get_cstr_by_num(3)

radcli_avp_get_cstr_by_num3

Look up an attribute by legacy numeric id and read its first occurrence as a nul-terminated string.

Usage

#include <radcli/>

const char * radcli_avp_get_cstr_by_num(
    const radcli_avp_list  *list,
    const radcli_ctx       *ctx,
    uint32_t                attrid,
    uint32_t                vendor
);

Overview

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.

Return value

a pointer valid for list's lifetime (owned by list never freed by the caller), or NULL if no such attribute is defined, no occurrence exists, or as radcli_avp_get_cstr() (embedded NUL byte, or invalid UTF-8 for a RADCLI_TYPE_TEXT attribute).

From radcli 2.0.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.