Parsing octets string via rlm_expr

Alan DeKok aland at deployingradius.com
Tue Dec 11 16:13:38 CET 2018


On Dec 11, 2018, at 9:27 AM, Lotkov Svyatoslav <ellezdi at gmail.com> wrote:
> We are trying to parse byte-string from Nokia ALU device accounting.
> 
> AV-pairs looks like:
> 
> Alc-Acct-O-Inprof-Octets-64 = 0x00030000000000000001

  Yeah, they're pretty terrible.

> We need to obtain second byte from Alc-Acct-O-Inprof-Octets-64 (this byte
> represents traffic-class number)
> 
> Also, we need last 8 bytes from the same pair (this counter represents
> bytes counter itself)
> ...
> How can we obtain this counters without using an rlm_perl or rlm_python for
> av-pair parsing?

  See the "unpack" module.  mods-available/unpack

  Alan DeKok.




More information about the Freeradius-Users mailing list