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
|
destination list. |
|---|---|
|
the attribute; must be RADCLI_TYPE_IPV6ADDR or RADCLI_TYPE_IPV6PREFIX. |
|
the address. |
|
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()).