Radius::Dictionary(3pm) | User Contributed Perl Documentation | Radius::Dictionary(3pm) |
Net::Radius::Dictionary - RADIUS dictionary parser
use Net::Radius::Dictionary; my $dict = new Net::Radius::Dictionary "/etc/radius/dictionary"; $dict->readfile("/some/other/file"); my $num = $dict->attr_num('User-Name'); my $name = $dict->attr_name(1); my $vsa_num = $dict->vsattr_num(9, 'cisco-avpair'); my $vsa_name = $dict->vsattr_name(9, 1);
This is a simple module that reads a RADIUS dictionary file and parses it, allowing conversion between dictionary names and numbers. Vendor-Specific attributes are supported in a way consistent to the standards.
A few earlier versions of this module attempted to make dictionaries case-insensitive. This proved to be a very bad decision. From this version on, this tendency is reverted: Dictionaries and its contents are to be case-sensitive to prevent random, hard to debug failures in production code.
If given an (optional) list of filenames, it calls readfile for you for all of them, in the given order.
There is an equivalent family of accessor methods for Vendor-Specific attributes and its values. Those methods are identical to their standard attributes counterparts with two exceptions. Their names have a vsa prepended to the accessor name and the first argument to each one is the vendor code on which they apply.
This module is mostly for the internal use of Net::Radius::Packet, and may otherwise cause insanity and/or blindness if studied.
Christopher Masto <chris@netmonger.net>, Luis E. Muñoz <luismunoz@cpan.org> contributed the VSA code.
Net::Radius::Packet
2021-01-06 | perl v5.32.0 |