radcli_avp_add_ip4(3)
π radcli_avp_add_ip4 β ok so this is the glow-up for IPv4 attributes
Hey bestie, welcome to radcli_avp_add_ip4(3) β it's a radcli manual page and it's literally about appending an IPv4-address-typed attribute from a struct in_addr. Yes, that's the whole vibe. π¦
β¨ SYNOPSIS β¨
#include <radcli/>
int radcli_avp_add_ip4(
radcli_avp_list *list,
const radcli_attr_def *def,
struct in_addr value
);
πΈ DESCRIPTION πΈ
Okay so real talk: this function slaps an IPv4-address-typed attribute onto your list, and it takes that address straight out of a struct in_addr. That's it. That's the whole function. Short, sweet, iconic. π
π PARAMETERS π
listβ the destination list, aka where the attribute is going. Drop it in, bestie. πdefβ the attribute itself, and heads up: it must beRADCLI_TYPE_IPADDR. No exceptions, no cap. If it's not, this whole thing flops. πvalueβ the address, in the usual network byte order thatstruct in_addrcarries. So don't go flipping bytes around, she already knows what she's doing. β¨
π₯ RETURN VALUE π₯
0β slay, it worked, success, we love to see it. π-1β it failed. Which happens ifdefis notRADCLI_TYPE_IPADDR, or for the same reasons asradcli_avp_add_bytes(). F in the chat. π
π¦ SEE ALSO π¦
The whole friend group, fr fr β go read these too:
radcli_avp_add_bytes(3)radcli_avp_add_bytes_by_num(3)radcli_avp_add_gigawords64(3)radcli_avp_add_gigawords64_by_num(3)radcli_avp_add_ip4_by_num(3)radcli_avp_add_ip4prefix(3)radcli_avp_add_ip4prefix_by_num(3)radcli_avp_add_ip6(3)radcli_avp_add_ip6_by_num(3)radcli_avp_add_str(3)radcli_avp_add_str_by_num(3)radcli_avp_add_uint32(3)radcli_avp_add_uint32_by_num(3)radcli_avp_add_uint64(3)radcli_avp_add_uint64_by_num(3)radcli_avp_add_username(3)radcli_avp_concat_str(3)radcli_avp_concat_str_by_num(3)radcli_avp_def(3)radcli_avp_get(3)radcli_avp_get_by_num(3)radcli_avp_get_bytes(3)radcli_avp_get_bytes_by_num(3)radcli_avp_get_cstr(3)radcli_avp_get_cstr_by_num(3)radcli_avp_get_gigawords64(3)radcli_avp_get_gigawords64_by_num(3)radcli_avp_get_ip4prefix(3)radcli_avp_get_ip4prefix_by_num(3)radcli_avp_get_ip6(3)radcli_avp_get_ip6_by_num(3)radcli_avp_get_uint32(3)radcli_avp_get_uint32_by_num(3)radcli_avp_get_uint64(3)radcli_avp_get_uint64_by_num(3)radcli_avp_iter_next(3)radcli_avp_list_error(3)radcli_avp_list_free(3)radcli_avp_list_iter(3)radcli_avp_list_new(3)
ngl, the "must be RADCLI_TYPE_IPADDR" thing is the one rule you cannot break. Check your type before you call, okay? π«Ά
and that's the page!! mwah π This lil masterpiece is brought to you by radcli, dated 2026-10-10 β stan the docs, 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