radcli_avp_add_ip6(3)

πŸ“¦ version 2.0.1, in arch rolling

✨ NAME ✨

radcli_avp_add_ip6 β€” append an IPv6-address-typed or IPv6-prefix-typed attribute. That's the whole assignment, bestie: you have an IPv6 thing and you want it added to the list, and this function is literally the one for that. Also hiiii, this is the radcli_avp_add_ip6(3) page from the Radius client library πŸ’–


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <radcli/>

int radcli_avp_add_ip6(
    radcli_avp_list        *list,
    const radcli_attr_def  *def,
    const struct in6_addr  *value,
    unsigned                prefix
);

πŸŽ€ DESCRIPTION πŸŽ€

Okay so here's the tea β˜•: for RADCLI_TYPE_IPV6ADDR, prefix MUST be 0 β€” a plain address has no prefix, periodt. For RADCLI_TYPE_IPV6PREFIX, the RFC 3162 wire format gets built internally: a reserved zero octet, the prefix length, and the full 16-octet address. The function handles the byte situation for you, which is honestly iconic ✨


πŸ’… PARAMETERS πŸ’…

  • list β€” destination list. That's where the new attribute is headed 🫢
  • def β€” the attribute; must be RADCLI_TYPE_IPV6ADDR or RADCLI_TYPE_IPV6PREFIX. No other type is invited to this party πŸ™…β€β™€οΈ
  • value β€” the address.
  • prefix β€” the prefix length (0-128); ignored/must be 0 for RADCLI_TYPE_IPV6ADDR.

🌈 RETURN VALUE 🌈

It gives you 0 on success and -1 on failure. The failure vibes are: wrong type, prefix out of range, or as radcli_avp_add_bytes() πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

The whole squad pulls up, fr fr:


xoxo, this page was brought to you by radcli, dated 2026-10-10, and it's the radcli_avp_add_ip6(3) page β€” mwah πŸ’‹πŸŽ€

πŸ“¦ where this page comes from