radcli_ctx_new(3)

radcli_ctx_new3

Create an empty context, ready for radcli_ctx_set_opt_str()/ _set_opt_int() and radcli_ctx_apply() the fully programmatic ("backup") way to configure radcli without a config file on disk.

Usage

#include <radcli/>

radcli_ctx * radcli_ctx_new(
    unsigned flags
);

Overview

Allocates a context with no server, secret, or transport configured yet radcli_ctx_apply() must succeed before it is usable for a request. Also loads the built-in RFC 2865/2866/2869 dictionary, the same one radcli_ctx_read_config() always loads, unless RADCLI_CTX_NO_BUILTIN_DICT is set in flags so radcli_dict_lookup_num() is non-NULL for well-known attributes right away, without a separate radcli_ctx_read_dictionary() call.

Parameters

flags

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

Return value

the new context, or NULL on allocation failure, an unknown flags bit, or a failure loading the built-in dictionary.

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