rc_avpair_get_uint32(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_avpair_get_uint32 πŸ’–

okay so bestie, welcome to the rc_avpair_get_uint32(3) page of the Radius client library β€” yes it's section 3, the library-calls section, we're in the cool part of the manual fr fr πŸŽ€


✨ NAME ✨

rc_avpair_get_uint32 β€” that's literally it, that's the whole name, the original page leaves the description blank and honestly? mysterious queen behavior πŸ’…


🌸 SYNOPSIS 🌸

#include <radcli/radcli.h>

int rc_avpair_get_uint32(
    VALUE_PAIR  *vp,
    uint32_t    *res
);

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does she do? She grabs the integer value of the attribute value-pair you hand her. That's it, that's the job, and she eats every time πŸ”₯

This function is valid for PW_TYPE_INTEGER, PW_TYPE_IPADDR, and PW_TYPE_DATE. And heads up: when it's PW_TYPE_IPADDR, that value is gonna hold the IPv4 address in host byte order. iykyk πŸ‘‘


πŸ’œ PARAMETERS πŸ’œ

  • vp β€” a pointer to a VALUE_PAIR structure. give her the pair, she'll do the rest 🫢
  • res β€” the integer value that gets returned. this is where the tea lands, bestie ✨

πŸŽ€ STRUCTURES πŸŽ€

⚠️ okay listen. Avoid using this structure directly. Just use the rc_avpair_get_ functions, please, I'm begging πŸ™ˆ
struct rc_value_pair {
  char                   name[RC_NAME_LENGTH+1];      // attribute name if known.
  uint64_t               attribute; // attribute numeric value of type rc_attr_id including vendor; use VENDOR() and ATTRID() to separate.
  rc_attr_type           type;      // attribute type.
  uint32_t               lvalue;    // attribute value if type is PW_TYPE_INTEGER, PW_TYPE_DATE or PW_TYPE_IPADDR.
  char                   strvalue[AUTH_STRING_LEN+1];  // contains attribute value in other cases.
  struct rc_value_pair  *next;
  char                   pad[32];       // unused pad
};

🌈 RETURN VALUE 🌈

  • zero on success πŸ’–
  • -1 on failure 😭

that's the whole vibe check, no cap.


⭐ SEE ALSO ⭐

the whole radcli friend group, assembled, iconic, no one's left out πŸ‘‘


and that's the page, bestie!! πŸ¦‹βœ¨ this one comes courtesy of radcli, dated 2023-01-29, and yes the page is still called rc_avpair_get_uint32(3) β€” mwah, go read the rest of the man pages, ily, bye πŸ’–πŸŽ€

πŸ“¦ where this page comes from