| radcli_dae_process(3) | Radius client library | radcli_dae_process(3) |
NAME
radcli_dae_process - Validate a caller-supplied packet, without a radcli-owned socket the L0 counterpart of radcli_ctx_dispatch(), running 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.
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
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, -1 if the packet failed validation (discarded silently, exactly as radcli_ctx_dispatch() would), dae is a RadSec listener, or any argument is invalid.
SEE ALSO
radcli_ctx_dispatch(3), radcli_ctx_get_poll(3), radcli_dae_free(3), radcli_dae_new(3), radcli_dae_reply(3), radcli_dae_reply_error(3), radcli_dae_reply_to_buffer(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)
| 2026-09-03 | radcli |