radcli_avp_add_ip4_by_num(3)

πŸ“¦ version 2.0.1, in arch rolling

✨ NAME ✨

okay so bestie, this is radcli_avp_add_ip4_by_num β€” from the radcli Radius client library β€” and what it does is look up an IPv4-address-typed attribute by its legacy numeric ID and then append it. that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

#include <radcli/>

int radcli_avp_add_ip4_by_num(
    radcli_avp_list   *list,
    const radcli_ctx  *ctx,
    uint32_t           attrid,
    uint32_t           vendor,
    struct in_addr     value
);

like, that's the whole incantation. no cap. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so the description section is literally just the parameter breakdown, and honestly? iconic of it. let's get into it πŸ‘‡

πŸŽ€ PARAMETERS πŸŽ€

  • list β€” the destination list, queen. this is where the attribute is headed. ✨
  • ctx β€” a context with a dictionary loaded. yes, it needs the dictionary β€” that's the whole point of the lookup, iykyk. πŸ“–
  • attrid β€” the attribute ID. this can be a PW_* constant, or a vendor type ID when vendor is non-zero. your call, bestie. πŸ’œ
  • vendor β€” the vendor PEN, or 0 for a standard attribute. zero means "no vendor, just a regular one". πŸ“
  • value β€” the address, in the usual network byte order that struct in_addr carries. don't come at it with host byte order, I'm begging 😭

πŸ”₯ RETURN VALUE πŸ”₯

  • 0 on success β€” slay, it worked πŸŽ‰
  • -1 on failure β€” either there's no such attribute, or it failed the same way radcli_avp_add_ip4() does. πŸ’€
so yeah, -1 is doing double duty here. if things go sideways, that's where you'll see it. not me being dramatic, it's just what the page says 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

the whole by-num friend group, fr fr:


and that's the page!! πŸ’– brought to you by radcli, dated 2026-10-10, filed under radcli_avp_add_ip4_by_num(3) β€” go forth and append those IPv4 attributes, bestie. πŸŒˆβœ¨πŸŽ€

πŸ“¦ where this page comes from