adding new entry in dictionar

Alan DeKok aland at deployingradius.com
Tue Apr 28 12:34:41 CEST 2015


On Apr 28, 2015, at 2:29 AM, Juan Pablo L. <jpablolorenzetti at hotmail.com> wrote:
Hi everybody, i have added a new entry in dictionary.3gpp2. 
> the new entry is part of a TLV that i had created in the past and been using for years successfully, 
> but now i needed to add a new field and it does not work, i do not know the reasons 
> as i m adding it as i did the rest of the fields in the tlv long time ago (or so i think)

  This question is better suited for the developers list, as you're looking at the server internals.

> The new field is 3GPP2-Prepaid-Acct-Quota-VolumeQuotaOverflow. The radius logs still showing this field
> as "Attr-26.5535.90.3 = 0x0000",

  Probably because it's being created incorrectly.

> and programatically i m trying to access it as i do  the others
> and all i get is garbage. this is how i m trying to access it:
> 
> i try to get an id to it from the dictoinary:
> 
> inst->vqo = dict_attrbyname("3GPP2-Prepaid-Acct-Quota-VolumeQuotaOverflow");

  Yes, that works.

> and then try to access it like this:
> 
> volume_quota_overflow = pairfind(request->packet->vps,instance->vqo->attr,_3GPP2_VENDOR,TAG_ANY);

  That works, too.

> but all i get is garbage (it is actually the whole field as a decimal number which a big number,144907816),

  No, you get a pointer to the VALUE_PAIR.

  You shouldn't look at the internal fields of a DICT_ATTR unless you need to do that.  The "garbage" value you're referring to is a real value which has meaning.  Go read src/lib/dict.c for explanations.

  The problem seems to be that you're not creating the attribute properly.  Since you didn't include that code here, I can't tell what you're doing wrong.

  Alan DeKok.





More information about the Freeradius-Users mailing list