radcli_request_new(3)
β¨ radcli_request_new(3) β¨
okay so this is a page from the Radius client library (radcli) manpage set, and bestie, it's literally the "make me a request" function. let's get into it π
πΈ NAME πΈ
radcli_request_new β create a request to send. that's it, that's the whole vibe. β¨
π SYNOPSIS π
#include <radcli/>
radcli_request * radcli_request_new(
radcli_ctx *ctx,
radcli_code code,
const radcli_avp_list *send
);
look at that signature, so clean, so iconic π«Ά
π¦ DESCRIPTION π¦
so what does it actually do? it 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 that rc_auth()/rc_acct() (radcli.h) use. same settings, same energy. π
but here's the plot twist π unlike rc_auth()/rc_acct(), which fail over across every configured entry, this one uses only the first one. why? because the new API carries one server per context, and delegates the redundancy thing to DNS instead β like, several A/AAAA records for one name, tried in order within the request's timeout by radcli_transport_exchange(). so instead of a configured list of distinct servers, it's DNS doing the heavy lifting. main character energy, honestly. π
and if you've got more than one entry configured? that's a warning logged, not an error. the whole point is that if you're migrating one entry point at a time off the legacy API, those leftover entries don't break you. considerate king behavior fr fr π
π PARAMETERS π
ctxβ a context with configuration loaded. like, it's gotta have its settings already, bestie, don't come empty-handed πcodeβ eitherRADCLI_CODE_ACCESS_REQUESTorRADCLI_CODE_ACCOUNTING_REQUEST. those are the options, no cap.sendβ the attributes to send. and yes, they get copied in, sosendmay be freed or reused by the caller immediately after this call returns. obsessed with that for you π
π₯ RETURN VALUE π₯
you get the new request back! β¨ or NULL if:
- allocation failed π
- the code was invalid π
ctxhas no server configured for that code's type π
so like, check your return value. please. π«Ά
π 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)
go read those too, iykyk π
and that's the page!! this one's from radcli, dated 2026-10-10, and yeah β radcli_request_new(3). mwah, go build something slay πβ¨
π¦ 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