radcli_ctx_read_config(3)

radcli_ctx_read_config3

Create a context by parsing a config file the main, recommended way to configure radcli.

Usage

#include <radcli/>

radcli_ctx * radcli_ctx_read_config(
    const char  *filename,
    unsigned     flags
);

Overview

Parses filename, validates every option, initialises the transport (including the TLS/DTLS handshake for TLS/DTLS transports), and loads the built-in RFC 2865/2866/2869 dictionary plus the file's own dictionary= option, if set radcli_ctx_read_dictionary() need not be called separately for the common case, unless RADCLI_CTX_NO_BUILTIN_DICT is set in flags. Uses the same file format and recognised options as radcli.h's rc_read_config(), so an existing radiusclient.conf written for the legacy API loads unchanged.

Parameters

filename

path to the configuration file.

flags

a bitwise OR of radcli_ctx_flags, or 0 for the common case.

Return value

the new context, or NULL on failure (missing/unreadable file, invalid option, an unknown flags bit, or transport initialisation failure).

From radcli 2.0.1-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.