Decoding complex CableLabs-Event-Message

Alan DeKok aland at deployingradius.com
Tue Jan 31 09:51:20 CET 2012


Laurent Debacker wrote:
> We would like to use FreeRadius to decode Cablelabs accounting messages,
> as specified in
> http://www.cablelabs.com/packetcable/downloads/specs/PKT-SP-EM-I12-05812.pdf.

  Why do people do that?  It's ridiculous.

> FreeRadius has a CableLabs dictionary, which works fine, but...
> The value of one of the AVP, CableLabs-Event-Message, is actually an HEX
> value containing additional fields.

  Because it wouldn't make sense to send it as binary data, right?

  Ugh.

> The FreeRadius does not decode that value to get all details.
> For example, bytes 4 to 28
> (d2d2026d303100000000000030303130303030000e812333) is actually the BCID
> (Billing Correlation ID) field.
> The BCID itself contains 4 "sub" fields: NTP time reference (4 first
> bytes), Element ID (next 8 bytes), Time Zone (next 8 bytes), and Event
> counter (ast 4 bytes).
> See the packet cable specifications for more details.
>  
> I understood the only way would be to write a perl module to decode
> those values.

  Or write it in C.  It should only be ~100 LoC.  It should go into
rlm_preprocess, just like the other functions that mangle stupid vendor
formats.

> Before I start writing, does anyone know of any implementation of such a
> perl module? I would not like spending my time rewriting something that
> already exists.

  If one existed, it would be included with FreeRADIUS.

  Alan DeKok.



More information about the Freeradius-Users mailing list