RADIUS Client - Dictionary
The dictionary file maps descriptive names to attribute numbers in a packet. Each packet contains an encoded version of an attribute. The encoded version is binary data and non-readable. It is also used to define data types for an attribute.
On the client side, the dictionary file is used to determine the attribute type, and encoding or decoding of attribute values based on the type. For example, the attribute is interpreted as a User-Name attribute of type string when the header contains Type field as 1. Each RADIUS attribute contains a header with Type, Length, and Value fields. For standard attributes, the type is fixed; for VSA attributes, the type is 26. For VSA attributes, there are two headers - the outermost is a normal RADIUS attribute header, and the inner header contains information such as VSAType, Length, Vendor-Id, and Attribute Value.
The dictionary file is defined based on the RFC .dct file format. The following is an example of the RADIUS dictionary file:
# radius standard attributes, vsa with enum values
# format is based on rfc .dct files
# Standard attributes
ATTRIBUTE User-Name Standard(1) string
ATTRIBUTE User-Password Standard(2) octets
ATTRIBUTE Service-Type Standard(6) integer
VALUE Service-Type Login-User 1
VALUE Service-Type Framed-User 2
VALUE Service-Type Callback-Login-User 3
VALUE Service-Type Callback-Framed-User 4
VALUE Service-Type Outbound-User 5
VALUE Service-Type Administrative-User 6
VALUE Service-Type NAS-Prompt-User 7
VALUE Service-Type Authenticate-Only 8
VALUE Service-Type Callback-NAS-Prompt 9
VALUE Service-Type Call-Check 10
VALUE Service-Type Callback-Administrative 11
# VSA
ATTRIBUTE 3GPP-IMSI 3GPP-VSA(1) string
ATTRIBUTE 3GPP-IMSI-MCC-MNC 3GPP-VSA(8) string
ATTRIBUTE 3GPP-User-Location-Info 3GPP-VSA(22) UeLocType
ATTRIBUTE 3GPP-MS-Time-Zone 3GPP-VSA(23) octets
The first column denotes if the entry is an ATTRIBUTE or a VALUE to indicate an attribute or enum value of an attribute respectively. The second column contains the name of the attribute in case of both ATTRIBUTE and VALUE entries. For ATTRIBUTE entries, the third column denotes if the attribute is a standard attribute with attribute type number, and in case of VSA attribute, it contains the VendorName with vendor attribute type number. For VALUE entries, the third column contains the enum description. The last column denotes the data type of the attribute or the enum value of an attribute.