radcli_ctx_dispatch(3)
💅 radcli_ctx_dispatch — ok so here's the whole vibe (radcli manual, section 3)
✨ NAME ✨
radcli_ctx_dispatch — reads whatever's ready on ctx's descriptor(s), validates it, and invokes the registered handler for anything that passes (peep radcli_dae_set_handler() for that part). Also: it drains any in-flight RADCLI_REQUEST_SENDONLY exchange's reply and services its retransmit/timeout deadline (that's net2.md's REQ-NET2-SEND-013/016 bestie), and, once it's due, it sends the RFC 5997 watchdog on an established RadSec session (watchdog.md's REQ-WATCHDOG-NET-001) — and it does all of that unconditionally, every single call, no cap, regardless of whether an active radcli_dae even exists. Like… this is now the single entry point that radcli_ctx_get_poll() drives, for everything ctx owns. Not a DAE-only call anymore, periodt. 👑
🦋 SYNOPSIS 🦋
#include <radcli/>
int radcli_ctx_dispatch(
radcli_ctx *ctx
);
🌸 DESCRIPTION 🌸
Okay so on the DAE side specifically: it reads exactly one datagram per call (non-blocking, natch), so a burst of requests re-arms the caller's loop instead of starving it 😌 — and then it runs that datagram through process_packet()'s validation pipeline before ever invoking the registered handler. The way every rejection short of "authorized sender" is just… silent 🙈: no reply, no Error-Cause, no log of the secret or either authenticator (REQ-DAE-SEC-009). Iconic and security-conscious, we love to see it.
Not reentrant, bestie. Calling this,radcli_dae_start(), orradcli_dae_free()from within a handler thatradcli_ctx_dispatch()itself invoked is undefined. Just don't. 😭
🎀 PARAMETERS 🎀
ctx— a context that was previously reported ready byradcli_ctx_get_poll(). That's the one. 🫶
⭐ RETURN VALUE ⭐
0— success, and yes that includes the "nothing was ready" case, it's giving chill 💜-1— failure (e.g.ctxisNULL, or you called it reentrantly 🙃)
🌈 SEE ALSO 🌈
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_reply_to_buffer(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)
and that's the page, bestie 🎀 go read all sixteen of those SEE ALSOs, iykyk. this whole thing is brought to you by radcli, version-dated 2026-10-10, living its best life as radcli_ctx_dispatch(3) — mwah 💋✨
📦 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