radcli_avp_...gigawords64(3)

πŸ“¦ version 2.0.1, in arch rolling

πŸ’– radcli_avp_...gigawords64(3) πŸ’–

okay so this is the page for radcli_avp_add_gigawords64 from the Radius client library, and it's literally the function that appends a 64-bit counter as an Octets/Gigawords attribute pair. βœ¨πŸ’…

🌸 NAME 🌸

radcli_avp_add_gigawords64 β€” append a 64-bit counter as an Octets/Gigawords attribute pair. πŸ’–

✨ SYNOPSIS ✨

#include <radcli/>

int radcli_avp_add_gigawords64(
    radcli_ctx             *ctx,
    radcli_avp_list        *list,
    const radcli_attr_def  *octets,
    uint64_t                value
);

🫢 DESCRIPTION 🫢

No standard RADIUS attribute counts octets as a 64-bit integer β€” no cap. Real 64-bit accounting is done with a pair of 32-bit attributes, e.g. Acct-Input-Octets (the low 32 bits) and Acct-Input-Gigawords (the high 32 bits), which is what every deployed server actually implements. This is the one call an accounting caller needs instead of computing and adding both halves by hand. πŸ”₯

It implements the Acct-Input/Output-Octets (RFC 2866 SS5.3/5.4) plus Acct-Input/Output-Gigawords (RFC 2869 SS5.1/5.2) pairing: Gigawords holds the number of times its Octets counterpart has wrapped past 2^32, so the pair together give a 64-bit octet count. Not RADCLI_TYPE_INTEGER64/RFC 8044 β€” no standard accounting attribute uses that type. πŸ’€

The Gigawords counterpart for octets is looked up from the dictionary (an ATTRIBUTE line's gigawords= option, etc/dictionary), not derived from its name, so passing an attribute with no such counterpart configured is an error rather than a silent truncation to 32 bits. The gigawords attribute is omitted from list when it would be zero (value fits in 32 bits), matching how a real NAS sends it. πŸ‘‘

πŸŽ€ PARAMETERS πŸŽ€

  • ctx β€” the context octets was looked up from. The gigawords= pairing is recorded per dictionary, not on radcli_attr_def itself (that would need a public struct field, and the struct is frozen ABI), so finding it means searching ctx's loaded dictionary. 🫢
  • list β€” destination list. πŸ’Œ
  • octets β€” the octets attribute (e.g. Acct-Input-Octets); its dictionary entry must declare a gigawords= counterpart. πŸŽ€
  • value β€” the full 64-bit count. πŸ”’

πŸ”₯ RETURN VALUE πŸ”₯

0 on success, -1 on failure (octets has no configured gigawords counterpart, or as radcli_avp_add_bytes()). 😭

🌈 SEE ALSO 🌈

Bestie, the whole squad is here β€” go read these next, iykyk:


That's the whole tea β˜•: this page is from radcli, dated 2026-10-10. Now go add those gigawords and slay your accounting code, bestie. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from