radcli_avp_iter_next(3)

radcli_avp_iter_next3

Return the current attribute and advance.

Usage

#include <radcli/>

const radcli_avp * radcli_avp_iter_next(
    radcli_avp_iter  *it
);

Overview

Parameters

it

an iterator from radcli_avp_list_iter().

Structures

Iterator over a radcli_avp_list.

A plain value: construct with radcli_avp_list_iter(), advance with radcli_avp_iter_next(). No allocation, safe to copy, safe to run several independent iterators over the same list concurrently (as long as nothing mutates the list while any of them are in use see radcli_avp_list_st's locking note in lib/avp.c). Fields are an implementation detail; do not access them directly. Deliberately not opaque via an incomplete type: a two-pointer cursor belongs on the caller's stack at zero cost, the way any ccan/list or kernel list cursor does, not behind a heap allocation.

Usage: radcli_avp_iterit=radcli_avp_list_iter(list);

constradcli_avp*a;

while((a=radcli_avp_iter_next(&it))!=NULL){

}

struct radcli_avp_iter {
  const radcli_avp_list  *list;
  const radcli_avp       *cur;
};

Return value

the current attribute, or NULL once the list is exhausted every subsequent call on the same it also returns NULL; it does not restart.

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