radcli_avp_add_ip6(3)

radcli_avp_add_ip63

Append an ipv6-address or ipv6-prefix-typed attribute.

Usage

#include <radcli/>

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

Overview

For RADCLI_TYPE_IPV6ADDR, prefix MUST be 0 (a plain address has no prefix). For RADCLI_TYPE_IPV6PREFIX, the RFC 3162 wire format is built internally: a reserved zero octet, the prefix length, and the full 16-octet address.

Parameters

list

destination list.

def

the attribute; must be RADCLI_TYPE_IPV6ADDR or RADCLI_TYPE_IPV6PREFIX.

value

the address.

prefix

the prefix length (0-128); ignored/must be 0 for RADCLI_TYPE_IPV6ADDR.

Return value

0 on success, -1 on failure (wrong type, prefix out of range, or as radcli_avp_add_bytes()).

From radcli 2.0.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.