64 bit integers to be used in comparisons in unlang stattements

Arran Cudbard-Bell a.cudbardb at freeradius.org
Thu Oct 4 12:19:33 CEST 2018



> On Oct 4, 2018, at 1:16 PM, Ali Arslan via Freeradius-Users <freeradius-users at lists.freeradius.org> wrote:
> 
> Hi,
> 
> In unlang statements i need to store input and output octet sums from accounting table to keep if conditions simple and readable, but unlang does not support 64 bit integers

Are you referring to the expr expansion explicitly? The base arithmetic type is an int64.  It's pretty unlikely you'll need something larger than that.

> so i need another integer variable to keep gigaword carry which needs the same sql query to be executed multiple times.

Tmp-Integer64-0?

> Isn't it possible to add "long integer" support to unlang to be used in calculations, not to be sent on wire?

Yes. It's already there.

> Results can be stored in string variables, but again we need casting to long integer in comparison.

Um.

> As being a newbie in freeradius world i may be missing some other simple workarounds for the problem stated above, if so i need some suggestions to hande this problem.

Workarounds like using the built in 64bit integer type, and pre-defined internal attributes?

-Arran




More information about the Freeradius-Users mailing list