radcli_avp_add_ip4(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… 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 be RADCLI_TYPE_IPADDR. No exceptions, no cap. If it's not, this whole thing flops. πŸ’€
  • value β€” the address, in the usual network byte order that struct in_addr carries. 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 if def is not RADCLI_TYPE_IPADDR, or for the same reasons as radcli_avp_add_bytes(). F in the chat. 😭

πŸ¦‹ SEE ALSO πŸ¦‹

The whole friend group, fr fr β€” go read these too:


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