Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
Net::Radius::Server::SUserRContributed PerNet::Radius::Server::Set::Replace(3)

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

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:

	   scalar
	       An exact	match will be attempted.

	   regexp
	       The value of the	attribute must match the given regexp.

	   NetAddr::IP
	       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. MuA+-oz,	<luismunoz@cpan.org>

COPYRIGHT AND LICENSE
       Copyright (C) 2006 by Luis E. MuA+-oz

       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! The	above document had some	coding errors, which are explained
       below:

       Around line 276:
	   Non-ASCII character seen before =encoding in	'MuA+-oz,'. Assuming
	   UTF-8

perl v5.32.0			  2009-09-Net::Radius::Server::Set::Replace(3)

NAME | SYNOPSIS | DESCRIPTION | HISTORY | SEE ALSO | AUTHOR | COPYRIGHT AND LICENSE | POD ERRORS

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=Net::Radius::Server::Set::Replace&sektion=3&manpath=FreeBSD+12.2-RELEASE+and+Ports>

home | help