.\" File automatically generated by doxy2man0.3 .\" Generation date: Thu Sep 3 2026 .TH radcli_avp_add_gigawords64 3 2026-09-03 "radcli" "Radius client library" .SH "NAME" radcli_avp_add_gigawords64 \- Append a 64-bit counter as an Octets/Gigawords attribute pair. .SH SYNOPSIS .nf .B #include .sp \fBint radcli_avp_add_gigawords64\fP( \fBradcli_ctx *\fP\fIctx\fP, \fBradcli_avp_list *\fP\fIlist\fP, \fBconst radcli_attr_def *\fP\fIoctets\fP, \fBuint64_t \fP\fIvalue\fP ); .fi .SH DESCRIPTION .PP No standard RADIUS attribute counts octets as a 64-bit integer; 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. .PP 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. .PP octets' Gigawords counterpart 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. .SH PARAMETERS .TP .B 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. .TP .B list destination list. .TP .B octets the octets attribute (e.g. Acct-Input-Octets); its dictionary entry must declare a gigawords= counterpart. .TP .B value the full 64-bit count. .SH RETURN VALUE .PP 0 on success, -1 on failure (octets has no configured gigawords counterpart, or as radcli_avp_add_bytes()). .SH SEE ALSO .PP .nh .ad l \fIradcli_avp_add_bytes\fP(3), \fIradcli_avp_add_bytes_by_num\fP(3), \fIradcli_avp_add_gigawords64_by_num\fP(3), \fIradcli_avp_add_ip4\fP(3), \fIradcli_avp_add_ip4_by_num\fP(3), \fIradcli_avp_add_ip4prefix\fP(3), \fIradcli_avp_add_ip4prefix_by_num\fP(3), \fIradcli_avp_add_ip6\fP(3), \fIradcli_avp_add_ip6_by_num\fP(3), \fIradcli_avp_add_str\fP(3), \fIradcli_avp_add_str_by_num\fP(3), \fIradcli_avp_add_uint32\fP(3), \fIradcli_avp_add_uint32_by_num\fP(3), \fIradcli_avp_add_uint64\fP(3), \fIradcli_avp_add_uint64_by_num\fP(3), \fIradcli_avp_add_username\fP(3), \fIradcli_avp_concat_str\fP(3), \fIradcli_avp_concat_str_by_num\fP(3), \fIradcli_avp_def\fP(3), \fIradcli_avp_get\fP(3), \fIradcli_avp_get_by_num\fP(3), \fIradcli_avp_get_bytes\fP(3), \fIradcli_avp_get_bytes_by_num\fP(3), \fIradcli_avp_get_cstr\fP(3), \fIradcli_avp_get_cstr_by_num\fP(3), \fIradcli_avp_get_gigawords64\fP(3), \fIradcli_avp_get_gigawords64_by_num\fP(3), \fIradcli_avp_get_ip4prefix\fP(3), \fIradcli_avp_get_ip4prefix_by_num\fP(3), \fIradcli_avp_get_ip6\fP(3), \fIradcli_avp_get_ip6_by_num\fP(3), \fIradcli_avp_get_uint32\fP(3), \fIradcli_avp_get_uint32_by_num\fP(3), \fIradcli_avp_get_uint64\fP(3), \fIradcli_avp_get_uint64_by_num\fP(3), \fIradcli_avp_iter_next\fP(3), \fIradcli_avp_list_error\fP(3), \fIradcli_avp_list_free\fP(3), \fIradcli_avp_list_iter\fP(3), \fIradcli_avp_list_new\fP(3) .ad .hy