rc_avpair_add(3)

rc_avpair_add3

Adds an attribute-value pair to the given list.

Usage

#include <radcli/>

VALUE_PAIR * rc_avpair_add(
    rc_handle const  *rh,
    VALUE_PAIR      **list,
    uint32_t          attrid,
    void const       *pval,
    int               len,
    uint32_t          vendorspec
);

Overview

See rc_avpair_assign() for the format of the data.

Parameters

rh

a handle to parsed configuration.

list

a VALUE_PAIR array of values; initially must be NULL.

attrid

The attribute of the pair to add (e.g., PW_USER_NAME).

pval

the value (e.g., the actual username).

len

the length of pval, or -1 if to calculate (in case of strings).

vendorspec

The vendor ID in case of a vendor specific value - 0 otherwise.

Return value

pointer to added a/v pair upon success, NULL pointer upon failure.

Releases

4 releases since Debian 11 (Bullseye); the text changed 1 time.

  1. 11–13
  2. Arch

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