This is a simple class that can read RADIUS dictionary files and parse
them, allowing conversion between dictionary names and numbers.
Vendor-specific attributes are supported in a way consistent with the
standards.
This class is patterned after the Net::Radius::Dictionary Perl module
written by Christopher Masto (chris@netmonger.net) and Luis E.
Munoz (lem@cantv.net)
Parse a dictionary file from an IO object and learn the name<->number
mappings from it. Only the /first/ definition will apply if multiple
definitions are seen. This method may be called multiple times with
different IO objects, reading from several files.
Parameters
fp:
IO object from which to read the data
Return
None. Any strangeness in the file results in a message being printed to
stderr.
Given an attribute number, return the name corresponding to it, based on
the dictionary file(s) that have been read, the reverse of the attr_num method.
Parameters
attrname:
Name of the attribute whose number is desired.
Return Value
The number corresponding to the appropriate attribute name given.
Obtains the code of a vendor-specific attribute given the Vendor-Id and the
name of the vendor-specific attribute (e.g. 9 for Cisco and
'cisco-avpair').
Parameters
vendorid:
the Vendor-Id
name:
the name of the vendor-specific attribute to query