radcli_request_perform(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… radcli_request_perform(3) πŸ’…

okay bestie, welcome to the radcli manual, page radcli_request_perform(3). this one's about actually sending your request out into the world. let's go πŸš€


✨ NAME ✨

radcli_request_perform β€” send a request, and optionally stick around waiting for the reply. it's giving "text sent, do i wait for them to answer or nah" energy πŸ’Œ


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <radcli/>

int radcli_request_perform(
    radcli_request  *r,
    unsigned         flags
);

🌸 DESCRIPTION 🌸

so like, by default (when flags == RADCLI_REQUEST_NONE), this function sends r and then waits for the reply. simple, classic, does what it says πŸ’–

but then there's RADCLI_REQUEST_SENDONLY β€” and this one is the main character of the option world. with it, radcli_request_perform transmits r exactly a single time and comes back as soon as the packet is handed to the network. no blocking for a reply, no waiting around, periodt. you'd do this in one of two vibes:

  • as a total fire-and-forget notification, where you literally don't care about the outcome and never act on it β€” in that case you just call radcli_request_free() and never call radcli_ctx_dispatch(). (fun fact: radcli.h's rc_acct_async() is the equivalent call in the legacy API πŸ‘€)
  • or so you can read the reply later via radcli_request_done(), driven by your own radcli_ctx_get_poll()/radcli_ctx_dispatch() loop (lib/dae.c). diy era ✨
⚠️ ngl this is important: this function can be called only once per request. that's it, one and done. if you want to retransmit with different content, you gotta construct a brand new radcli_request β€” no reusing, no recycling πŸ™…β€β™€οΈ

πŸŽ€ PARAMETERS πŸŽ€

  • r β€” a request from radcli_request_new(). your lil baby request πŸ₯Ί
  • flags β€” a bitwise OR of radcli_request_flags. mix and match, iykyk 🌈

πŸ‘‘ RETURN VALUE πŸ‘‘

lowkey depends on what flags you passed:

  • with RADCLI_REQUEST_NONE: you get RADCLI_OK if a validated reply was received (peep radcli_request_code() to see which one πŸ’…), RADCLI_TIMEOUT if none of the server's addresses replied 😭, or RADCLI_ERROR on failure.
  • with RADCLI_REQUEST_SENDONLY: you get RADCLI_OK once the packet is handed to the network, or RADCLI_ERROR on failure (like if name resolution or encoding failed πŸ’€). and it never returns RADCLI_TIMEOUT. not ever. not today. 🚫

πŸ’œ SEE ALSO πŸ’œ

go read those too, bestie, they're literally the whole friend group 🫢


and that's the page!! mwah πŸ’‹ this radcli manual entry is dated 2026-10-10 β€” so go forth and slay your radius requests, you've got this πŸ§šβ€β™€οΈβ­πŸ“

πŸ“¦ where this page comes from