GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Radius::Dictionary(3) User Contributed Perl Documentation Radius::Dictionary(3)

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.

new($dict_file, ...)
Returns a new instance of a Net::Radius::Dictionary object. This object will have no attributes defined, as expected.

If given an (optional) list of filenames, it calls readfile for you for all of them, in the given order.

->readfile($dict_file)
Parses a dictionary file and learns the mappings to use. It can be called multiple times for the same object. The result will be that new entries will override older ones, thus you could load a default dictionary and then have a smaller dictionary that override specific entries.
->vendor_num($vendorname)
Return the vendor number for the given vendor name.
->attr_num($attrname)
Returns the number of the named attribute.
->attr_type($attrname)
Returns the type (string, integer, ipaddr, or time) of the named attribute.
->attr_name($attrnum)
Returns the name of the attribute with the given number.
->attr_numtype($attrnum)
Returns the type of the attribute with the given number.
->attr_has_val($attrnum)
Returns a true or false value, depending on whether or not the numbered attribute has any known value constants.
->val_has_name($attrnum)
Alternate (bad) name for attr_has_val.
->val_num($attrnum, $valname)
Returns the number of the named value for the attribute number supplied.
->val_name($attrnum, $valnumber)
Returns the name of the numbered value for the attribute number supplied.

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

Hey! The above document had some coding errors, which are explained below:
Around line 380:
Non-ASCII character seen before =encoding in 'Muñoz'. Assuming UTF-8
2009-08-25 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.