Grouping of sub attributes in seperate VSAs
Бенджамин Томпсон
b.thompson at latera.ru
Thu Apr 12 17:07:33 CEST 2018
Hi
We have a device which sends individual traffic counters for several
different services. The dicitionary is as follows:
VENDOR VasExperts 43823
BEGIN-VENDOR VasExperts
...
ATTRIBUTE VasExperts-Acct-Traffic-Class-Name 16 string
ATTRIBUTE VasExperts-Acct-Traffic-Class-Input-Octets 17 integer64
ATTRIBUTE VasExperts-Acct-Traffic-Class-Output-Octets 18 integer64
ATTRIBUTE VasExperts-Acct-Traffic-Class-Input-Packets 19 integer64
ATTRIBUTE VasExperts-Acct-Traffic-Class-Output-Packets 20 integer64
...
In the accounting packet these attribtues are grouped into individual VSAs
as follows:
AVP: l=51 t=Vendor-Specific(26) v=VAS Experts(43823)
AVP Type: 26
AVP Length: 51
VSA: l=5 t=VasExperts-Acct-Traffic-Class-Name(16): cs0
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Input-Octets(17): 0000000000000000
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Output-Octets(18): 00000000002128bc
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Input-Packets(19): 0000000000000000
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Output-Packets(20): 00000000000007a4
AVP: l=51 t=Vendor-Specific(26) v=VAS Experts(43823)
AVP Type: 26
AVP Length: 51
VSA: l=5 t=VasExperts-Acct-Traffic-Class-Name(16): cs1
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Input-Octets(17): 0000000000000000
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Output-Octets(18): 0000000000000000
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Input-Packets(19): 0000000000000000
VSA: l=10
t=VasExperts-Acct-Traffic-Class-Output-Packets(20): 0000000000000000
Here the fact that the five attributes are gouped together in a single VSA
means that they all contain data which pertains to the same service.
When FreeRADIUS processes the packet the attribtues are as I understand it
added to one long list and I can access them individually by their index.
However, as I understand it the ordering of RADIUS attributes is not
something which is normally guaranteed and I would like to ask is whether
there is any way in unlang or by other means to figure out which which sub
attribtues came from the same parent attribute.
More information about the Freeradius-Users
mailing list