radcli_avp_...cstr_by_num(3)
π radcli_avp_...cstr_by_num(3) β the radcli girlies' guide
okay so bestie, welcome to the radcli_avp_...cstr_by_num page from the Radius client library (that's the manual section, mwah) π this one's a little lookup queen and she is lowkey iconic.
β¨ NAME β¨
radcli_avp_get_cstr_by_num β look up an attribute by its legacy numeric ID and read its first occurrence as a NUL-terminated string. that's it, that's the vibe π
πΈ SYNOPSIS πΈ
#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
);
like yes, she takes four things, she gives you a const char *, no cap π«Ά
π¦ DESCRIPTION π¦
bestie this is the function for when you've got a legacy numeric attribute ID and you want the first occurrence of it as a NUL-terminated string. the parameters are right below, keep scrolling β¨
β PARAMETERS β
listβ the list to search. she's gonna go through it, respectfully πctxβ a context with a dictionary loaded. no dictionary, no vibes, fr fr πattridβ the attribute ID (aPW_*constant, or a vendor type ID whenvendoris non-zero). yep, either/or, depending on the vendor situation πvendorβ the vendor PEN, or0for a standard attribute.0means "just a normal one, nothing fancy" π
π RETURN VALUE π
a pointer valid for list's lifetime β she's owned by list, never freed by the caller, okay? do NOT free her, that's not your job, periodt π
and she returns NULL if:
- no such attribute is defined π
- no occurrence exists π
- or as
radcli_avp_get_cstr()(embedded NUL byte, or invalid UTF-8 for aRADCLI_TYPE_TEXTattribute) π₯
so like, check for NULL before you do anything unhinged with that pointer, iykyk π§
π SEE ALSO π
radcli_avp_get_by_num(3)radcli_avp_get_bytes_by_num(3)radcli_avp_get_ip4prefix_by_num(3)radcli_avp_get_ip6_by_num(3)radcli_avp_get_uint32_by_num(3)radcli_avp_get_uint64_by_num(3)
the whole get-by-num friend group, go say hi π
ok that's the page!! mwah π this one's from radcli, dated 2026-10-10 β stan, and go read the other pages bestie πΈβ¨
π¦ where this page comes from
- arch rolling: radcli 2.0.1-1 Β· BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms