radcli_ctx_get_opt_str(3)
π radcli_ctx_get_opt_str(3) β bestie edition π
okay so this is a page from the Radius client library man pages, and it's the radcli_ctx_get_opt_str(3) one β the little function that hands you back a string-typed config option you set earlier. it's giving "read receipt for your settings" energy and honestly? iconic. β¨
πΈ NAME πΈ
radcli_ctx_get_opt_str β read back a string-typed configuration option. that's literally it, that's the whole job. she reads, she returns, she slays. π
π¦ SYNOPSIS π¦
#include <radcli/>
const char * radcli_ctx_get_opt_str(
const radcli_ctx *ctx,
radcli_opt_id opt
);
no cap, that's the whole signature. two arguments, one const char * coming back at you. π«Ά
π DESCRIPTION π
so, unlike radcli_ctx_set_opt_str(), this one is only valid for an RADCLI_OPT_TYPE_STR opt. lowkey important, don't skip that part. π
and the tea on #RADCLI_OPT_AUTHSERVER/#RADCLI_OPT_ACCTSERVER? those are RADCLI_OPT_TYPE_SRV, and they store a parsed server list, not a string β so they are not readable through this call. not me warning you before you try it. π
β¨ PARAMETERS β¨
ctxβ a context fromradcli_ctx_new()orradcli_ctx_read_config(). basically your whole vibe, handed to you by someone else. π§optβ the option to read; it MUST beRADCLI_OPT_TYPE_STRinRC_OPTION_TABLE(think#RADCLI_OPT_DEFAULT_REALM,#RADCLI_OPT_DICTIONARY). main character option only, no impostors. π
π RETURN VALUE π
the option's value, or NULL if:
- it's unset,
ctxisNULL,optis out of range,- or
optis notRADCLI_OPT_TYPE_STR.
so likeβ¦ NULL is the "she's not available rn" of return values. π totally normal, not a crash, just check it fr fr. β
real talk: always vibe check that return value before you dereference it. NULL is a valid answer here, not a bug report. π
π SEE ALSO π
radcli_ctx_apply(3), radcli_ctx_free(3), radcli_ctx_get_opt_int(3), radcli_ctx_new(3), radcli_ctx_read_config(3), radcli_ctx_read_dictionary(3), radcli_ctx_read_dictionary_from_buffer(3), radcli_ctx_set_opt_int(3), radcli_ctx_set_opt_str(3), radcli_ctx_set_secret(3), radcli_ctx_set_tls_psk(3)
the whole friend group, honestly. go read them too, iykyk. πΈπ₯
okay that's the page!! this one's from the radcli source, dated 2026-10-10 β mwah, go read some docs bestie, you ate. π ππ¦
π¦ where this page comes from
- arch rolling: radcli 2.0.1-1 Β· BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms