radcli_dae_...y_to_buffer(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… radcli_dae_reply_to_buffer(3) β€” like, the manual page, bestie

okay so this is a page from the Radius client library (radcli) and honestly? it's a little niche but it ATE. let's get into it 🫢


✨ NAME ✨

radcli_dae_reply_to_buffer β€” produce a reply as bytes instead of actually sending it. it's the L0 counterpart of radcli_dae_reply() / radcli_dae_reply_error(), and it's for a request that came out of radcli_dae_process(). no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <radcli/>

int radcli_dae_reply_to_buffer(
    radcli_dae_request  *req,
    int                  ack,
    uint32_t             error_cause,
    void                *buf,
    size_t              *len
);

🌸 DESCRIPTION 🌸

so here's the vibe. if radcli_dae_process() handed you back RADCLI_DAE_DUPLICATE for a request, then ack and error_cause are literally ignored. why? because a genuine retransmission always gets the same answer it originally got (that's RFC 5176 Β§2.3, periodt πŸ”₯) β€” never a fresh one. so the bytes you get out are always that cached decision's bytes. icon behaviour, honestly.


πŸŽ€ PARAMETERS πŸŽ€

  • req β€” a request from radcli_dae_process(), not yet replied to (unless it's a RADCLI_DAE_DUPLICATE, and in that case you can call this any number of times, go off πŸ‘‘).
  • ack β€” non-zero for an ACK, zero for a NAK. ignored if req is a RADCLI_DAE_DUPLICATE.
  • error_cause β€” a radcli_error_cause value for a NAK, or 0 for a bare one. ignored if req is a RADCLI_DAE_DUPLICATE.
  • buf β€” filled with the reply's bytes on success πŸ’–.
  • len β€” buf's capacity on entry; the reply's actual length on success.

⭐ RETURN VALUE ⭐

  • 0 on success, slay ✨
  • -1 on failure 😭 β€” and that's when any argument is NULL, or req was already replied to and isn't a RADCLI_DAE_DUPLICATE, or buf is too small.
ngl, "buf too small" is the classic. size your buffers, bestie πŸ“

πŸ”₯ SEE ALSO πŸ”₯

radcli_ctx_dispatch(3), radcli_ctx_get_poll(3), radcli_dae_free(3), radcli_dae_new(3), radcli_dae_process(3), radcli_dae_reply(3), radcli_dae_reply_error(3), radcli_dae_req_attrs(3), radcli_dae_req_code(3), radcli_dae_req_framed_ip(3), radcli_dae_req_nas_port(3), radcli_dae_req_session_id(3), radcli_dae_req_user_name(3), radcli_dae_request_free(3), radcli_dae_set_handler(3), radcli_dae_start(3)


okay that's the whole page, mwah πŸ’‹ this one's from radcli, dated 2026-10-10 β€” go read the other radcli_dae_* pages, iykyk πŸŒˆπŸ¦‹πŸ’œ

πŸ“¦ where this page comes from