radcli_ctx_new(3)
β¨ 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 ofradcli_ctx_flags, or just0for 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 forNULL, bestie. it's giving responsible queen energy π and it's literally oneif.
π SEE ALSO π
radcli_ctx_apply(3)radcli_ctx_free(3)radcli_ctx_get_opt_int(3)radcli_ctx_get_opt_str(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)
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
- 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