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::RULE (3)

.ds Aq ’

NAME

Net::Radius::Server::Rule - Rules for Net::Radius::Server

CONTENTS

SYNOPSIS



  use Net::Radius::Server::Rule;
  my $rule = new Net::Radius::Server::Rule({
    match_methods => \@match_methods,
    set_methods => \@set_methods,
  });

  # Deep within the bowels of a RADIUS server...
  my $ret = $rule->eval(\%info);
  ...



DESCRIPTION

Net::Radius::Server::Rule implements a simple mechanism to evaluate RADIUS request packets using match methods. After the match methods determine that the given rule applies to the request, the set methods can modify a response packet to be sent to the RADIUS client.

Evaluation and application of the rule is done by the ->eval() method. This is normally invoked within the server code. \%info is a hashref with the same structure described in Net::Radius::Server.

The following attributes are available for object creation or manipulation via accessors created with Class::Accessor:
match_methods A reference to a list of match methods to be invoked in order. All the provided methods must match (ie, return NRS_MATCH_OK) in order for the rule to be applied.
set_methods A reference to a list of match methods to be invoked in order, in case the rule can be applied to the current request. The return value of the last set method executed will be returned by the ->eval() method.

If no set methods are specified, Net::Radius::Server::Rule returns NRS_SET_DISCARD by default.

description This attribute is inherited, and allows for the specification of a name for this rule. Defaults to the class, file and line where this rule has been created.
The return value of the ->eval() method is defined by the last set method executed. undef is returned if the rule did not match.

    EXPORT

None by default.

HISTORY



  $Log$
  Revision 1.7  2006/12/14 16:33:17  lem
  Rules and methods will only report failures in log level 3 and
  above. Level 4 report success and failure, for deeper debugging

  Revision 1.6  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 146: 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::RULE (3) 2009-09-20

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