| radcli_request_new(3) | Radius client library | radcli_request_new(3) |
NAME
radcli_request_new - Create a request to send.
SYNOPSIS
#include <radcli/>
radcli_request * radcli_request_new(
radcli_ctx *ctx,
radcli_code code,
const radcli_avp_list *send
);
DESCRIPTION
Reads the destination server, its shared secret, and the timeout/retry counts from ctx's configuration the same "authserver"/"acctserver", "radius_timeout", and "radius_retries" settings rc_auth()/rc_acct() (radcli.h) use. Unlike rc_auth()/rc_acct(), which fail over across every configured entry, this uses only the first: the new API carries one server per context, with redundancy delegated to DNS (several A/AAAA records for one name, tried in order within the request's timeout by radcli_transport_exchange()) rather than a configured list of distinct servers. A warning is logged, not an error, if more than one entry is configured, so a caller migrating one entry point at a time from the legacy API isn't broken by the leftover entries.
PARAMETERS
RETURN VALUE
the new request, or NULL on allocation failure, an invalid code, or if ctx has no server configured for that code's type.
SEE ALSO
radcli_aaa(3), radcli_request_attrs(3), radcli_request_code(3), radcli_request_done(3), radcli_request_free(3), radcli_request_perform(3), radcli_request_server(3)
| 2026-09-03 | radcli |