radcli_avp...efix_by_num(3)
πΈ radcli_avp_add_ip4prefix_by_num(3) πΈ
okay so bestie, welcome to the Radius client library docs β yes, that's the manual name, and yes, this page is about exactly one iconic little function. buckle up π
π NAME
radcli_avp_add_ip4prefix_by_num β look up an IPv4-prefix-typed attribute by its legacy numeric ID and append it. that's it, that's the whole vibe. β¨
π¦ SYNOPSIS
#include <radcli/>
int radcli_avp_add_ip4prefix_by_num(
radcli_avp_list *list,
const radcli_ctx *ctx,
uint32_t attrid,
uint32_t vendor,
struct in_addr value,
unsigned prefix
);
π DESCRIPTION
it's giving "find the attribute, add the attribute." this one goes hunting through the dictionary for an IPv4-prefix-typed attribute using the old-school numeric ID, then appends it to your list. no cap, that's the whole plot. π
π PARAMETERS
listβ the destination list, aka where the good stuff gets dropped off. π«Άctxβ a context with a dictionary loaded. it literally cannot do the lookup without it, so don't skip this one. πattridβ the attribute ID. this is either aPW_*constant, or a vendor type ID whenvendoris non-zero. iykyk. βvendorβ the vendor PEN, or0for a standard attribute. zero means "no vendor, we're normal about this." πvalueβ the address. the actualstruct in_addr. π¦prefixβ the prefix length, and it's0-32. that's a hard range, bestie, don't push it. π₯
π RETURN VALUE
0on success β slay, it worked. π-1on failure β that's either no such attribute, or it fails the same wayradcli_avp_add_ip4prefix()does. π
ngl, a -1 can mean two different things here, so if you're debugging, keep both possibilities in mind. π§
β¨ SEE ALSO
radcli_avp_add_bytes_by_num(3)radcli_avp_add_ip4_by_num(3)radcli_avp_add_ip6_by_num(3)radcli_avp_add_str_by_num(3)radcli_avp_add_uint32_by_num(3)radcli_avp_add_uint64_by_num(3)
the whole _by_num friend group, honestly. go read them all. π
and that's the page, bestie β brought to you by radcli, dated 2026-10-10, footer energy and all. go forth and prefix responsibly πΈπ
π¦ 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