.\" File automatically generated by doxy2man0.3 .\" Generation date: Thu Sep 3 2026 .TH radcli_ctx_get_poll 3 2026-09-03 "radcli" "Radius client library" .SH "NAME" radcli_ctx_get_poll \- Report what to wait for on ctx's behalf, for the caller's own event loop radcli never calls poll()/select()/epoll_wait() itself. .SH SYNOPSIS .nf .B #include .sp \fBint radcli_ctx_get_poll\fP( \fBradcli_ctx *\fP\fIctx\fP, \fBstruct pollfd *\fP\fIpfds\fP, \fBsize_t \fP\fImax_pfds\fP, \fBsize_t *\fP\fInfds\fP, \fBint *\fP\fItimeout_ms\fP ); .fi .SH DESCRIPTION .PP There is no per-object descriptor accessor (e.g. no radcli_dae_fd(), no per-radcli_request one either net2.md's REQ-NET2-SEND-013): every descriptor this reports belongs to ctx, not to any one radcli_dae or radcli_request, so that a transport sharing one descriptor between dynamic authorization and ordinary requests (already true for TLS/DTLS) never leaves an application holding a watcher on a descriptor that has quietly started meaning something else. .PP For TLS/DTLS, or for a UDP ctx with no active radcli_dae, this is always exactly one descriptor: the session fd (TLS/DTLS, also carrying any in-flight RADCLI_REQUEST_SENDONLY traffic) or the request-registry socket (UDP, REQ-NET2-SEND-016). A UDP ctx with an active radcli_dae reports a second, independent descriptor for the DAE listener alongside it the two are genuinely different local sockets/ports and cannot be merged into one without changing the wire protocol; RADCLI_CTX_MAX_POLLFDS (2) is the maximum this API ever needs. *timeout_ms folds together every deadline source that applies (DAE queued-work, RadSec watchdog, and any in-flight RADCLI_REQUEST_SENDONLY exchange's own retransmit/timeout) into one caller-facing value, so the caller never computes a min() itself. .PP A descriptor is closed or replaced only during a call the application itself makes (radcli_ctx_dispatch(), radcli_dae_free(), radcli_request_perform(), rc_destroy()), never asynchronously but re-query after any of those regardless, since one may replace it. .SH PARAMETERS .TP .B ctx a context, with or without an active radcli_dae. .TP .B pfds filled with up to RADCLI_CTX_MAX_POLLFDS entries (fd/events; revents is left for the caller's poll() to fill in). .TP .B max_pfds pfds's capacity; MUST be at least RADCLI_CTX_MAX_POLLFDS. .TP .B nfds set to how many of pfds were filled in (0 if there is nothing to watch yet). .TP .B timeout_ms milliseconds after which to call radcli_ctx_dispatch() even without I/O readiness; -1 for "no timeout needed". .SH RETURN VALUE .PP 0 on success, -1 if ctx or an out-parameter is NULL, or max_pfds is too small. .SH SEE ALSO .PP .nh .ad l \fIradcli_ctx_dispatch\fP(3), \fIradcli_dae_free\fP(3), \fIradcli_dae_new\fP(3), \fIradcli_dae_process\fP(3), \fIradcli_dae_reply\fP(3), \fIradcli_dae_reply_error\fP(3), \fIradcli_dae_reply_to_buffer\fP(3), \fIradcli_dae_req_attrs\fP(3), \fIradcli_dae_req_code\fP(3), \fIradcli_dae_req_framed_ip\fP(3), \fIradcli_dae_req_nas_port\fP(3), \fIradcli_dae_req_session_id\fP(3), \fIradcli_dae_req_user_name\fP(3), \fIradcli_dae_request_free\fP(3), \fIradcli_dae_set_handler\fP(3), \fIradcli_dae_start\fP(3) .ad .hy