radcli_avp_add_str_by_num(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… 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 a PW_* constant, or a vendor type ID when vendor is non-zero. so like, context matters, bestie πŸ”₯
  • vendor β€” the vendor PEN, or 0 for 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. \0 at the end or she doesn't know where to stop 😭

πŸ’œ RETURN VALUE πŸ’œ

  • 0 on success πŸŽ‰ slay, it worked, we ate
  • -1 on 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:


🫢 quick vibe check reminder: ctx genuinely needs a dictionary loaded or the lookup part can't happen, and value genuinely 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