top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to determine max and min length for standard Diameter AVP and 3GPP AVP

+3 votes

I want some reference how to determine the max and min length for Standard Diameter AVPs and 3GPP Diameter AVPs based on Seagull dictionary which is open source. How I can determine max and min length for different data types let say UTF8 String, Octet String, Unsigned32,String,Address etc. Any reference highly appreciated.

posted Dec 24, 2015 by Chinmoy Padhi

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Chinmoy, note that datatypes like Unsigned32,Address (V4 or V6) and most of the subscriber id related AVPs have predefined length. You don't have to do anything there - unlike you are developing your own Diameter library.

String fields (UTF8, OctetString) are of variable length, so application has to initiate both the data as well as the length properly. But depending on the usage, in the application you can always define an upper limit (for programming purpose). For example, for hostname (Origin-Hostname, Destination-Hostname), probably 256 bytes will be OK.

When you receive a PDU, AVP length is part of the header, so to the extent possible, you should not make any assumptions about the length, but extract it from the PDU.

answer Dec 28, 2015 by Rathnakumar Kayyar
The above answer seems clarify your doubts. Just to add my thoughts with regard to c++ implemenation,
- Regarding the UTF8String and DiameterId type AVPs you can try to define a string type to store the value.
- OctetString type, you can have a temporary buffer whose size can be malloced based on the length the input stream. I think you can use the unsinged 32 type is big enough to allocate the buffer.
- Uint32, Enum types, you can use the u32 to hold the parsed value, as well as store the value within the input class.
- Int64 you can use the signed 64 etc.
Great to see CEOs of startup are taking time and solving people's problem. To be proud of :)
@Salil, you are being CEO, ur are not supposed to pull my legs of poor ppl like me :)
I was not pulling was appreciating rk for helping people.
Fyi - rk is a ceo of a diameter startup.
Thanks a lot Salil for your kind words. As I already mentioned earlier, this forum has helped me a lot and thanks a lot for that. And hope I can do a bit to help others with my limited knowledge.
Similar Questions
+4 votes


What are the possible Result-Codes for Multiple-Services-Credit-Control AVP.
Is there any other result codes from 2001, 4012? If so, please mention the scenario
Any reference would be highly appreciable

+4 votes

From Wireshark Packet capture how the Diameter "Length' field calculation value arrive for the diameter message size.
My query is :
1. Does it take into account all the AVPs used in the Diameter Request/Response Message.

+1 vote

I have read 3GPP standards and I found many parameter determination with "spare1" or "spare2", etc.
I want to ask what is its's meaning in this part.

Illustration of an example in 3GPP standard

0 votes

Radio Resource Manager is one of the main component of an eNodeB. I want to know, Is there any specification which mentions the detail of messages ? If RRM is vendor specific then it means an eNodeB from a vendor "A" would not be inter-operable with RRM of vendor "B". Is my understanding correct in terms of vendor specific RRM implementation ?