radcli_dae_process(3)

πŸ“¦ version 2.0.1, in arch rolling

🌸 NAME 🌸

radcli_dae_process(3) β€” bestie, this is the Radius client library page for validating a caller-supplied packet without a radcli-owned socket. It's the L0 counterpart of radcli_ctx_dispatch(), and it runs the identical validation pipeline (REQ-DAE-NET-003) on a buffer and source address the caller supplies instead of reading them from radcli_dae_start()'s socket. A request this produces is otherwise indistinguishable from one radcli_ctx_dispatch() would have delivered to a handler. Periodt. πŸ’…

✨ SYNOPSIS ✨

#include <radcli/>

int radcli_dae_process(
    radcli_dae             *dae,
    const void             *buf,
    size_t                  len,
    const struct sockaddr  *from,
    socklen_t               fromlen,
    radcli_dae_request    **req
);

πŸ’… DESCRIPTION πŸ’…

okay so the whole function is basically: you bring the packet and the source address, it brings the identical validation pipeline. The parameter tea is right below β€” including the RadSec rejection and the fromlen sanity rules, so don't skip it. 🫢

πŸŽ€ PARAMETERS πŸŽ€

  • dae β€” a listener from radcli_dae_new() (radcli_dae_start() need never have been called: this function reads no socket). Rejected outright (-1) if dae is following serv-type=tls/dtls (RadSec): that transport trusts the record's origin entirely to the already-verified TLS/DTLS session (REQ-DAE-SEC-015), which this buffer/address pair is not, and has no source-address check of its own to apply to it.
  • buf β€” the received packet, header included.
  • len β€” buf's length.
  • from β€” the packet's source address, for the dae-server authorization check.
  • fromlen β€” from's length. Must be at least sizeof(struct sockaddr_in) and at most sizeof(struct sockaddr_storage), and consistent with the family from->sa_family declares (AF_INET or AF_INET6 only, matching what dae-server can authorize). An application relaying from and fromlen from an untrusted producer (e.g. over IPC from a privileged listener) must not assume this function corrects a mismatch; it only rejects one.
  • req β€” set to the validated request on success (RADCLI_DAE_NEW or RADCLI_DAE_DUPLICATE), left NULL on failure.

πŸ’– RETURN VALUE πŸ’–

RADCLI_DAE_NEW or RADCLI_DAE_DUPLICATE on success. And -1 if the packet failed validation (discarded silently, exactly as radcli_ctx_dispatch() would), if dae is a RadSec listener, or if any argument is invalid. No cap. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹


signed, sealed, and slaying by radcli β€” dated 2026-10-10, and this is the radcli_dae_process(3) page πŸ’œβœ¨

πŸ“¦ where this page comes from