radcli_avp_get_ip4prefix(3)

radcli_avp_get_ip4prefix3

Read an attribute's value as an ipv4 prefix.

Usage

#include <radcli/>

int radcli_avp_get_ip4prefix(
    const radcli_avp  *a,
    struct in_addr    *out,
    unsigned          *prefix
);

Overview

Parameters

a

the attribute; radcli_avp_def(a) must be RADCLI_TYPE_IPV4PREFIX.

out

where to write the address (zero-padded beyond the prefix length); may be NULL.

prefix

where to write the prefix length; may be NULL.

Return value

0 on success, -1 if a's type does not match.

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