radcli_avp_add_str_by_num(3)
π radcli_avp_add_str_by_num(3) β like, the whole page, bestie
okay so real quick before we dive in: manual name is radcli_avp_add_str_by_num, and it lives in section 3 of the Radius client library docs. that's the vibe. now let's get into it β¨
πΈ NAME πΈ
radcli_avp_add_str_by_num β look up a string-typed attribute by its legacy numeric ID and append it. that's literally the whole job. she's a lookup girlie who also does the appending. multitasking icon π
π SYNOPSIS π
bestie. the include. don't forget the include:
#include <radcli/>
int radcli_avp_add_str_by_num(
radcli_avp_list *list,
const radcli_ctx *ctx,
uint32_t attrid,
uint32_t vendor,
const char *value
);
it gives back an int, and we'll get to what that number means in a sec π«Ά
π¦ DESCRIPTION π¦
lowkey the description section on this page is just vibes (empty), so we go straight into the parameters. not me skipping ahead π β but fr fr, the parameters are the description here.
β¨ PARAMETERS β¨
listβ your destination list. this is where the good stuff lands. think of it as the group chat you're adding the message to πctxβ a context with a dictionary loaded. no dictionary, no lookups, iykyk. this is the source of truth for what attributes even exist.attridβ the attribute ID. it's either aPW_*constant, or a vendor type ID whenvendoris non-zero. so like, context matters, bestie π₯vendorβ the vendor PEN, or0for a standard attribute. zero means "no vendor, just a normal one" β she's lowkey the flag for "is this a vendor thing or not" πvalueβ a null-terminated string. null-terminated. say it with me.\0at the end or she doesn't know where to stop π
π RETURN VALUE π
0on success π slay, it worked, we ate-1on failure π
and when it fails it's because either there's no such attribute, or it failed the same way radcli_avp_add_str() fails. that's the whole failure menu, no cap.
π SEE ALSO π
the whole by-num family reunion, they're all icons and they all need their moment:
radcli_avp_add_bytes_by_num(3)radcli_avp_add_ip4_by_num(3)radcli_avp_add_ip4prefix_by_num(3)radcli_avp_add_ip6_by_num(3)radcli_avp_add_uint32_by_num(3)radcli_avp_add_uint64_by_num(3)
π«Ά quick vibe check reminder:ctxgenuinely needs a dictionary loaded or the lookup part can't happen, andvaluegenuinely needs that null terminator. no cap. don't come for me, i'm just the messenger π
okay that's the page!! this one's from radcli, dated 2026-10-10, and it's the radcli_avp_add_str_by_num(3) page β mwah, go forth and append your strings by number, 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