radcli_request_new(3)

πŸ“¦ version 2.0.1, in arch rolling

✨ 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 β€” either RADCLI_CODE_ACCESS_REQUEST or RADCLI_CODE_ACCOUNTING_REQUEST. those are the options, no cap.
  • send β€” the attributes to send. and yes, they get copied in, so send may 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 πŸ’€
  • ctx has no server configured for that code's type πŸ™ˆ

so like, check your return value. please. 🫢


🌈 SEE ALSO 🌈

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