radcli_avp_get_by_num(3)
π radcli_avp_get_by_num(3) β like, the vintage lookup era
okay so bestie, this is a page from the Radius client library (yes, the radcli one π) and it's about finding an attribute in a list by its old-school numeric ID β the legacy way. She's iconic, she's a little retro, and she's here to help you grab the idx-th match. π
β¨ NAME β¨
radcli_avp_get_by_num β look up the idx-th occurrence of an attribute by legacy numeric ID. slay, that's the whole gig π
π¦ SYNOPSIS π¦
#include <radcli/>
const radcli_avp * radcli_avp_get_by_num(
const radcli_avp_list *list,
const radcli_ctx *ctx,
uint32_t attrid,
uint32_t vendor,
unsigned idx
);
copy that exactly, bestie, it's not a vibe you can freestyle πΈ
π DESCRIPTION π
π PARAMETERS π
listβ the list to search. yes, you have to tell her where to look, she's not psychic πctxβ a context with a dictionary loaded. no dictionary, no lookup, that's the whole deal πattridβ the attribute ID (aPW_*constant, or a vendor type ID whenvendoris non-zero). so like, are we searching standard or vendor territory? this param is the main character πvendorβ the vendor PEN, or0for a standard attribute. zero means "just a regular attribute bestie", a PEN means we're doing the vendor thing π§idxβ0for the first occurrence,1for the second, and so on. yes, it starts at zero. she's index-pilled π«Ά
π RETURN VALUE π
the matching attribute, or NULL if no such attribute is defined, or fewer than idx+1 occurrences exist in list.
so likeβ¦ if you ask for the third one and there's only two? NULL. π if the attribute straight up doesn't exist? also NULL. it's giving "no notes", it's giving "handle it yourself". π₯
β SEE ALSO β
the whole by-num family, all matching, all gorgeous, all here for you π
radcli_avp_get_bytes_by_num(3)radcli_avp_get_cstr_by_num(3)radcli_avp_get_ip4prefix_by_num(3)radcli_avp_get_ip6_by_num(3)radcli_avp_get_uint32_by_num(3)radcli_avp_get_uint64_by_num(3)
ngl bestie, keep thevendorparam straight in your head β0is standard, non-zero is a vendor PEN. mess that up and you'll getNULLand a whole lot of confusion π
okay that's the page!! π this beauty is radcli, dated 2026-10-10, and the manual page is named radcli_avp_get_by_num(3) β periodt, go forth and look up those attributes, you absolute legend πππ¦π
π¦ 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