radcli_dae_reply_to_buffer(3)

radcli_dae_reply_to_buffer3

Produce a reply as bytes instead of sending it the l0 counterpart of radcli_dae_reply()/radcli_dae_reply_error(), for a request that came from radcli_dae_process().

Usage

#include <radcli/>

int radcli_dae_reply_to_buffer(
    radcli_dae_request  *req,
    int                  ack,
    uint32_t             error_cause,
    void                *buf,
    size_t              *len
);

Overview

For a request radcli_dae_process() returned RADCLI_DAE_DUPLICATE for, ack and error_cause are ignored: a genuine retransmission always gets the same answer it originally got (RFC 5176 SS2.3), never a fresh one, so the bytes produced are always that cached decision's.

Parameters

req

a request from radcli_dae_process(), not yet replied to (unless RADCLI_DAE_DUPLICATE, which may be called any number of times).

ack

non-zero for an ACK, zero for a NAK ignored if req is a RADCLI_DAE_DUPLICATE.

error_cause

a radcli_error_cause value for a NAK, or 0 for a bare one ignored if req is a RADCLI_DAE_DUPLICATE.

buf

filled with the reply's bytes on success.

len

buf's capacity on entry; the reply's actual length on success.

Return value

0 on success, -1 on failure (any argument NULL, req already replied to and not a RADCLI_DAE_DUPLICATE, or buf too small).

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