radcli_ctx_new(3)

πŸ“¦ version 2.0.1, in arch rolling

✨ radcli_ctx_new(3) ✨

okay bestie, so this is a page from the Radius client library manual (that's the radcli fam πŸ’œ) and it's literally all about making a brand-new, sparkly-empty context. no cap, it's giving "blank canvas main character energy" πŸŽ€


🌸 NAME 🌸

radcli_ctx_new β€” create an empty context, all ready for radcli_ctx_set_opt_str()/_set_opt_int() and radcli_ctx_apply(). that's the fully programmatic ("backup") way to configure radcli with no config file on disk β€” like, zero files, just vibes ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <radcli/>

radcli_ctx * radcli_ctx_new(
    unsigned flags
);

πŸ’… DESCRIPTION πŸ’…

So what it does: it allocates a context that has no server, no secret, and no transport configured yet β€” literally none, it's a fresh baby context 🍼. and important: radcli_ctx_apply() must succeed before it's usable for a request. like, that's not optional, bestie, that's the whole vibe check πŸ”₯

It also loads the built-in RFC 2865/2866/2869 dictionary β€” the exact same one radcli_ctx_read_config() always loads β€” unless RADCLI_CTX_NO_BUILTIN_DICT is set in flags. which means radcli_dict_lookup_num() is non-NULL for well-known attributes right away, without you needing a separate radcli_ctx_read_dictionary() call. iconic behaviour, honestly πŸ‘‘


🧚 PARAMETERS 🧚

  • flags β€” a bitwise OR of radcli_ctx_flags, or just 0 for the common case. that's it, that's the whole parameter 🫢

⭐ RETURN VALUE ⭐

You get the new context back πŸ’– β€” or NULL if any of these happen:

  • allocation failure 😭
  • an unknown flags bit πŸ™ˆ
  • a failure loading the built-in dictionary πŸ’€
ngl, always check for NULL, bestie. it's giving responsible queen energy πŸ‘‘ and it's literally one if.

🌈 SEE ALSO 🌈


and that's the page, bestie πŸ“ this lil gem comes courtesy of radcli, dated 2026-10-10 β€” go forth and build contexts, slay πŸ’…βœ¨

πŸ“¦ where this page comes from