radcli_avp_...cstr_by_num(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… 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 (a PW_* constant, or a vendor type ID when vendor is non-zero). yep, either/or, depending on the vendor situation πŸ’…
  • vendor β€” the vendor PEN, or 0 for a standard attribute. 0 means "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 a RADCLI_TYPE_TEXT attribute) πŸ”₯

so like, check for NULL before you do anything unhinged with that pointer, iykyk 🧚


🌈 SEE ALSO 🌈

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