radcli_dae_...y_to_buffer(3)
π radcli_dae_reply_to_buffer(3) β like, the manual page, bestie
okay so this is a page from the Radius client library (radcli) and honestly? it's a little niche but it ATE. let's get into it π«Ά
β¨ NAME β¨
radcli_dae_reply_to_buffer β produce a reply as bytes instead of actually sending it. it's the L0 counterpart of radcli_dae_reply() / radcli_dae_reply_error(), and it's for a request that came out of radcli_dae_process(). no cap π
π¦ SYNOPSIS π¦
#include <radcli/>
int radcli_dae_reply_to_buffer(
radcli_dae_request *req,
int ack,
uint32_t error_cause,
void *buf,
size_t *len
);
πΈ DESCRIPTION πΈ
so here's the vibe. if radcli_dae_process() handed you back RADCLI_DAE_DUPLICATE for a request, then ack and error_cause are literally ignored. why? because a genuine retransmission always gets the same answer it originally got (that's RFC 5176 Β§2.3, periodt π₯) β never a fresh one. so the bytes you get out are always that cached decision's bytes. icon behaviour, honestly.
π PARAMETERS π
reqβ a request fromradcli_dae_process(), not yet replied to (unless it's aRADCLI_DAE_DUPLICATE, and in that case you can call this any number of times, go off π).ackβ non-zero for an ACK, zero for a NAK. ignored ifreqis aRADCLI_DAE_DUPLICATE.error_causeβ aradcli_error_causevalue for a NAK, or0for a bare one. ignored ifreqis aRADCLI_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 β
0on success, slay β¨-1on failure π β and that's when any argument isNULL, orreqwas already replied to and isn't aRADCLI_DAE_DUPLICATE, orbufis too small.
ngl, "buf too small" is the classic. size your buffers, bestie π
π₯ SEE ALSO π₯
radcli_ctx_dispatch(3), radcli_ctx_get_poll(3), radcli_dae_free(3), radcli_dae_new(3), radcli_dae_process(3), radcli_dae_reply(3), radcli_dae_reply_error(3), radcli_dae_req_attrs(3), radcli_dae_req_code(3), radcli_dae_req_framed_ip(3), radcli_dae_req_nas_port(3), radcli_dae_req_session_id(3), radcli_dae_req_user_name(3), radcli_dae_request_free(3), radcli_dae_set_handler(3), radcli_dae_start(3)
okay that's the whole page, mwah π this one's from radcli, dated 2026-10-10 β go read the other radcli_dae_* pages, iykyk ππ¦π
π¦ where this page comes from
- arch rolling: radcli 2.0.1-1 Β· BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms