radcli_dict_lookup_value(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’… NAME

radcli_dict_lookup_value β€” bestie, this is how you resolve a dictionary VALUE by name, scoped to exactly one attribute πŸ‘‘


✨ SYNOPSIS ✨

#include <radcli/>

int radcli_dict_lookup_value(
    const radcli_ctx       *ctx,
    const radcli_attr_def  *def,
    const char             *name,
    uint32_t               *out
);

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so listen πŸ’– β€” this is the runtime, VALUE-name counterpart to radcli_dict_lookup(). The way that works is: it covers a vendor-specific or supplemental-dictionary VALUE that has, like, no compiled-in constant in radcli-defs.h (and jsyk, radcli-defs.h only covers RFC 2865/2866/2869 standard VALUEs β€” it's giving limited edition πŸ‘€).

Here's the thing though, and this is the iconic part: a VALUE name is only meaningful together with the attribute it was defined under. Like, two different attributes may each define a VALUE named e.g. "Yes" 😭 so def fixes that scope for you. Same way radcli_dict_value_by_attr()/rc_dict_getval() already scope a numeric VALUE lookup by attribute rather than matching across the whole entire dictionary. Consistency slay πŸ’…


πŸŽ€ PARAMETERS πŸŽ€

  • ctx β€” a context with a dictionary loaded. Gotta have the dictionary, no cap πŸ“š
  • def β€” the attribute the VALUE belongs to, and you get it from radcli_dict_lookup() or a sibling. This is your scope, bestie 🫢
  • name β€” the VALUE's name, exactly as it appears in a VALUE dictionary line ✍️
  • out β€” the VALUE's numeric value. It gets set only on success ⭐

🌈 RETURN VALUE 🌈

  • 0 on success β€” ate, no notes πŸ’…
  • -1 if ctx/def/name/out is NULL, or if no such VALUE is defined for def 😭

🌸 SEE ALSO 🌸

radcli_attr_def_name(3), radcli_attr_def_oid(3), radcli_attr_def_type(3), radcli_dict_lookup(3), radcli_dict_lookup_num(3), radcli_dict_lookup_oid(3)


fr fr go read the whole crew, they're all lowkey iconic 🧚

mwah πŸ’‹ this page brought to you by radcli (the Radius client library, main character energy πŸ”₯), dated 2026-10-10 β€” radcli_dict_lookup_value(3), periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from