rc_add_config(3)

πŸ“¦
version 1.5.2 Β· 4 versions
, in alpine 3.24, epel 10, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0

rc_add_config πŸ’–

ok so bestie, we're in section 3 of the manual (that's the library-functions girlypop section, iykyk) and this lil page lives in the Radius client library β€” yes, the radcli one. grab a strawberry πŸ“ and let's get into it.


✨ NAME ✨

rc_add_config -

ngl the name line here is literally just the function name and a lil dash with nothing after it. the manpage author left it blank fr. no description, just vibes. we move. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

#include <radcli/radcli.h>

int rc_add_config(
    rc_handle   *rh,
    char const  *option_name,
    char const  *option_val,
    char const  *source,
    int          line
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the whole point of this function is letting a config option get added to an rc_handle from inside your program. like, from within the code. no external file, no setup ritual, just you and your handle. ✨

and the reason that's iconic? because it means your program can set up a handle without loading a configuration file. that's it, that's the whole serve. main character handle creation energy. πŸ‘‘


🌸 PARAMETERS 🌸

  • rh β€” a handle to parsed configuration. your lil handle bestie.
  • option_name β€” the name of the option. like what you're calling it.
  • option_val β€” the value to be added. the actual content, the moment, the ~value~.
  • source β€” typically should be FILE or func, and it's there for logging purposes. it's giving receipts. 🧾
  • line β€” LINE for logging purposes. yes, also for the logs. the logs are eating today.

πŸ’œ RETURN VALUE πŸ’œ

  • 0 on success πŸŽ‰ slay, we ate
  • -1 on failure πŸ’€ not slay, we did not eat

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, assembled. say hi to everybody:


ok that's the whole page bestie, ily, go add some config πŸ’–βœ¨

this has been brought to you by radcli, dated 2023-01-29 β€” yes she's a lil vintage but she still slays. bye pookie 🫢🌸

πŸ“¦ where this page comes from