radcli_avp_get_ip4prefix_by_num3
Look up an ipv4-prefix-typed attribute by legacy numeric id and read its first occurrence.
Usage
#include <radcli/>
int radcli_avp_get_ip4prefix_by_num(
const radcli_avp_list *list,
const radcli_ctx *ctx,
uint32_t attrid,
uint32_t vendor,
struct in_addr *out,
unsigned *prefix
);
Overview
Parameters
list-
the list to search.
ctx-
a context with a dictionary loaded.
attrid-
the attribute ID (a PW_* constant, or a vendor type ID when vendor is non-zero).
vendor-
the vendor PEN, or 0 for a standard attribute.
out-
where to write the address. May be NULL.
prefix-
where to write the prefix length. May be NULL.
Return value
0 on success, -1 on failure (no such attribute, no occurrence, or as radcli_avp_get_ip4prefix()).