radcli_ctx_dispatch(3) Radius client library radcli_ctx_dispatch(3) NAME radcli_ctx_dispatch - Read what is ready on ctx's descriptor(s), validate it, and invoke the registered handler for anything that passes see radcli_dae_set_handler(). Also: drains any in-flight RADCLI_REQUEST_SENDONLY exchange's reply and services its retransmit/ timeout deadline (net2.md's REQ-NET2-SEND-013/016), and, once due, sends the RFC 5997 watchdog on an established RadSec session (watchdog.md's REQ-WATCHDOG-NET-001) all unconditionally, every call, regardless of whether an active radcli_dae exists at all: this is now the single entry point radcli_ctx_get_poll() drives, for everything ctx owns, not a DAE-only call. SYNOPSIS #include int radcli_ctx_dispatch( radcli_ctx *ctx ); DESCRIPTION On the DAE side specifically, reads exactly one datagram per call (non- blocking), so a burst of requests re-arms the caller's loop rather than starving it, and runs it through process_packet()'s validation pipeline before ever invoking the registered handler. Every rejection short of "authorized sender" is silent: no reply, no Error-Cause, no log of the secret or either authenticator (REQ-DAE-SEC-009). Not reentrant: calling this, radcli_dae_start(), or radcli_dae_free() from within a handler radcli_ctx_dispatch() itself invoked is undefined. PARAMETERS ctx a context previously reported ready by radcli_ctx_get_poll(). RETURN VALUE 0 on success (including "nothing was ready"), -1 on failure (e.g. ctx is NULL, or called 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) radcli 2026-09-03 radcli_ctx_dispatch(3)