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


Manual Reference Pages  -  NET::RADIUS::SERVER::BASE (3)

.ds Aq ’

NAME

Net::Radius::Server::Base - Base definitions and utility methods and factories

CONTENTS

SYNOPSIS



  package My::Radius::Thing;
  use base Net::Radius::Server::Base;

  # Alternatively...

  use Net::Radius::Server::Base qw(:match);

  ...



DESCRIPTION

Net::Radius::Server::Base provides a number of utility methods and services useful for match and set sub-classes of Net::Radius::Server.

The following methods are provided or overriden:
->new(...) This method is modified so that SUPER::new() is invoked and then, the value of the description property is initialized. Class::Accessor is used as a base class, so we’ll inherit the new() method defined there.
->description() This is an accessor to an object property of the same name, that stores te description of this object. It is automagically initialized to the class name of the object, the file name and line number where it was created.

This is used in errors and warnings to make it easier to spot problems.

->log($level, $msg, ...) A simple logging facility. The current implementation causes messages to be sent to warn() when the $level is lower than or equal to the current ->log_level.
->log_level($level) Specifies the current logging level. This is a number (defaults to 2) that controls how verbose are the logs generated by a given object. Only messages with a level lower or equal to the current log level are produced.

As a general rule, the following are guidelines about how to set the log level:
<B>Level 1B> Only exceptions and failures - Events that cause a process to fail.
<B>Level 2B> Includes less severe exceptions and rejects.
<B>Level 3B> Includes general internal conditions within the code. Generally useful to determine the execution thread within a class.
<B>Level 4B> Most detailed data, including normal behavior. This is used for debugging purposes.

    EXPORT

Usually, constants are imported using one of the following keywords:
<B>:matchB> Export the constants that are useful for <B>matchB> methods and classes, namely:
NRS_MATCH_FAIL This should be returned when the match method did not match the given request. An example would be a match method looking for a certain domain in the Username field of the RADIUS request. If the required value is not present, the match method could return NRS_MATCH_FAIL to tell the server that the rule should not apply to this request.
NRS_MATCH_OK When the match method does match the given request, NRS_MATCH_OK should be returned. This causes the next match method to be invoked. After all the match methods have returned NRS_MATCH_OK, the packet will be passed to the set methods for processing.
<B>:setB> Export the constants that are useful for <B>setB> methods and classes, namely:
NRS_SET_CONTINUE Causes the next set method within this rule to be invoked. This is the default return code for set methods.
NRS_SET_SKIP Causes the remaining set methods in the current rule to be skipped. The next rule will be evaluated, starting with the match methods.
NRS_SET_RESPOND Causes the current response packet to be returned to the RADIUS client as the response to its request.
NRS_SET_DISCARD Causes the current response packet to be abandonned. No further processing will occur and no response will be sent. This is a silent packet discard.
<B>:allB> Includes all of the above. Included just for completion, as it is seldom necessary.

HISTORY



  $Log$
  Revision 1.4  2006/12/14 15:52:25  lem
  Fix CVS tags



SEE ALSO

Perl(1), Class::Accessor(3), Net::Radius::Server(3).

AUTHOR

Luis E. Munõz, <luismunoz@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2006 by Luis E. Munõz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl 5.8.6 itself.

POD ERRORS

Hey! <B>The above document had some coding errors, which are explained below:B>
Around line 247: Non-ASCII character seen before =encoding in ’Munõz,’. Assuming UTF-8
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::RADIUS::SERVER::BASE (3) 2009-09-20

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