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

.ds Aq ’

NAME

Net::Radius::Server::Match::Simple - Simple match methods for RADIUS requests

CONTENTS

SYNOPSIS



  use Net::Radius::Server::Match::Simple;

  my $match = Net::Radius::Server::Match::Simple->new
    ({
      code => Access-Request,
      attr => [
        User-Name => qr/(?i)\@my\.domain\.?$/,
        NAS-IP-Address => NetAddr::IP->new(127.0.0.0/24),
        Framed-Protocol => PPP,
      ],
    });
  my $match_sub = $match->mk;



DESCRIPTION

Net::Radius::Server::Match::Simple implements simple but effective packet matcher method factories for use in Net::Radius::Server rules.

See Net::Radius::Server::Match for general usage guidelines. The relevant attributes that control the matching of RADIUS requests are:
attr Controls matching of a given attribute in the request packet. Must be called with a listref where even elements represent the name of a RADIUS attribute to match. The odd elements can be any of the following:
o A scalar, in which case an exact match with the attribute contents must occur for this method to return NRS_MATCH_OK.
o A regexp, in which case the attribute’s content must match the regexp for this method to return NRS_MATCH_OK.
o A NetAddr::IP subnet, in which case the attribute matches if its value can be converted to a NetAddr::IP object and it is contained in the given subnet. This is very useful to perform sanity check on your RADIUS requests.

All the conditions specified in this way must match in order for the method to return NRS_MATCH_OK. Otherwise, NRS_MATCH_FAIL will be returned.

This would match if the User-Name attribute in the RADIUS request contains a (case insensitive) @foo.domain realm AND the NAS-IP-Address attribute contains ’127.0.0.1’.

code Matches the RADIUS packet code. The following types of attributes can be specified:
o A scalar, in which case an exact match with the code must occur for this method to return NRS_MATCH_OK.
o A regexp, in which case the code’s name must match the regexp for this method to return NRS_MATCH_OK.

See Net::Radius::Packet(3) for more information on atribute and type representation.

peer_addr and addr Match the address of either the peer or the local socket used to receive the request. The following specifications can be used for the match:
o A scalar, in which case an exact match with the address must occur for this method to return NRS_MATCH_OK.
o A regexp, in which case the address must match the regexp for this method to return NRS_MATCH_OK.
o A NetAddr::IP subnet, in which case the address matches if its value can be converted to a NetAddr::IP object and it is contained in the given subnet.
peer_port and port Match the port of either the peer or the local socket used to receive the request. The following specifications can be used for the match:
o A scalar, in which case an exact match with the port must occur for this method to return NRS_MATCH_OK.
o A regexp, in which case the port must match the regexp for this method to return NRS_MATCH_OK.

Note that ports are usually numeric (ie, 1812 instead of radacct).

    EXPORT

None by default.

HISTORY



  $Log$
  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::Match(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 364: 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::MATCH::SIMPLE (3) 2009-09-20

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