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

.ds Aq ’

NAME

Net::Radius::Server::Set::Replace - Perform replacements on the RADIUS response

CONTENTS

SYNOPSIS



  use Net::Radius::Server::Base qw/:set/;
  use Net::Radius::Server::Set::Replace;

  my $replace = Net::Radius::Server::Set::Replace->new
    ({
      result => NRS_SET_RESPOND,
      vsattr => [
        [ Cisco, cisco-avpair => qr/datum=foo/ => bad=baz ],
      ],
      attr => [
        [ Reply-Message, qr/Login Succesful/ => "Welcome home!!!\r\n\r\n",
          Reply-Message, qr/Invalid/ => "Go away stranger\r\n\r\n",
         ],
      ]});
  my $replace_sub = $set->mk;



DESCRIPTION

Net::Radius::Server::Set::Replace provides a simple mechanism allowing changes to be made to RADIUS packets.

See Net::Radius::Server::Set for general usage guidelines. The relevant attributes that control the matching of RADIUS requests are:
attr Takes a listref containing groups of three elements: The first is the name of the attribute to replace. The second, is the replacement condition. It must be true in order for the replacement to be completed. The third element is the value to be stored in the named attribute.

The replacement condition can be of any of the following types:
<B>scalarB> An exact match will be attempted.
<B>regexpB> The value of the attribute must match the given regexp.
<B>NetAddr::IPB> The value of the attribute must be convertible into a NetAddr::IP(3) subnet. In this case, the comparison matches if the given NetAddr::IP(3) range contains the current attribute.

The comparison does not match if the attribute value cannot be converted into a NetAddr::IP(3) object.

result The result of the invocation of this set method. See Net::Radius::Server::Set for more information. The example shown in the synopsis would cause an inmediate return of the packet. Other set methods after the current one won’t be called at all.
vsattr Just as attr, but dealing with Net::Radius::Packet->set_vsattr() instead.

    EXPORT

None by default.

HISTORY



  $Log$
  Revision 1.4  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.3  2006/12/14 15:52:25  lem
  Fix CVS tags



SEE ALSO

Perl(1), NetAddr::IP(3), Net::Radius::Server(3), Net::Radius::Server::Set(3), Net::Radius::Packet(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 276: 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::SET::REPLACE (3) 2009-09-20

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