radcli_ctx_get_opt_str(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… 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 from radcli_ctx_new() or radcli_ctx_read_config(). basically your whole vibe, handed to you by someone else. 🧚
  • opt β€” the option to read; it MUST be RADCLI_OPT_TYPE_STR in RC_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,
  • ctx is NULL,
  • opt is out of range,
  • or opt is not RADCLI_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