.\" File automatically generated by doxy2man0.3 .\" Generation date: Thu Sep 3 2026 .TH radcli_ctx_read_config 3 2026-09-03 "radcli" "Radius client library" .SH "NAME" radcli_ctx_read_config \- Create a context by parsing a config file the main, recommended way to configure radcli. .SH SYNOPSIS .nf .B #include .sp \fBradcli_ctx * radcli_ctx_read_config\fP( \fBconst char *\fP\fIfilename\fP, \fBunsigned \fP\fIflags\fP ); .fi .SH DESCRIPTION .PP 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. .SH PARAMETERS .TP .B filename path to the configuration file. .TP .B flags a bitwise OR of radcli_ctx_flags, or 0 for the common case. .SH RETURN VALUE .PP the new context, or NULL on failure (missing/unreadable file, invalid option, an unknown flags bit, or transport initialisation failure). .SH SEE ALSO .PP .nh .ad l \fIradcli_ctx_apply\fP(3), \fIradcli_ctx_free\fP(3), \fIradcli_ctx_get_opt_int\fP(3), \fIradcli_ctx_get_opt_str\fP(3), \fIradcli_ctx_new\fP(3), \fIradcli_ctx_read_dictionary\fP(3), \fIradcli_ctx_read_dictionary_from_buffer\fP(3), \fIradcli_ctx_set_opt_int\fP(3), \fIradcli_ctx_set_opt_str\fP(3), \fIradcli_ctx_set_secret\fP(3), \fIradcli_ctx_set_tls_psk\fP(3) .ad .hy