rc_read_dic...from_buffer(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_read_dic...from_buffer(3) πŸ’–

okay bestie, welcome to the radcli radius client library manual, section 3, and today's main character is rc_read_dic...from_buffer(3). yes the title is literally abbreviated like that, that's just how it is, we don't question the icon. πŸŽ€


✨ NAME ✨

rc_read_dictionary_from_buffer -

(yeah bestie the description line is empty in the original, and I'm not about to invent lore. it does what its name says. iykyk. πŸ™ˆ)


🌸 SYNOPSIS 🌸

#include <radcli/radcli.h>

int rc_read_dictionary_from_buffer(
    rc_handle   *rh,
    char const  *buf,
    size_t       size
);

like. that's the whole vibe. three args, one int coming back at you. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Initialize the dictionary from Buffer πŸ’«

So what's actually happening: it reads all ATTRIBUTES into the dictionary_attributes list. Then it reads all VALUES into the dictionary_values list. That's it, that's the whole job β€” no cap. Two lists, fully populated, one function call. slay. πŸ”₯


πŸ’œ PARAMETERS πŸ’œ

  • rh β€” a handle to parsed configuration. this is your ride-or-die context, you gotta have it already set up.
  • buf β€” buffer holding Dictionary info. literally the raw text of the dictionary, sitting in memory. πŸ“¦
  • size β€” size of buffer. how many bytes of that buffer we're actually looking at. don't lie about this one bestie.

⭐ RETURN VALUE ⭐

  • 0 on success β€” we ate. πŸ‘‘
  • -1 on failure β€” it's giving error, check your inputs. 😭
fr fr, always check the return value. 0 is the good timeline, -1 is not.

🌈 SEE ALSO 🌈

okay so this is the whole extended universe, the entire friend group, everybody's here:


and that's the page bestie!! this one's from the radcli era, dated 2023-01-29 β€” a lil vintage, still iconic. go read your dictionary from a buffer and thrive. mwah πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from