-
-
20 Oct 2020 12:45:40 UTC
- Distribution: AnyEvent-Radius
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (229 / 0 / 2)
- Kwalitee
Bus factor: 1- License: artistic_2
- Perl: v5.10.0
- Activity
24 month- Tools
- Download (11.93KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 2 contributors- Sergey Leschenko <sergle.ua at gmail.com>
- PortaOne <perl-radius at portaone.com>
- Dependencies
- AnyEvent
- AnyEvent::Handle::UDP
- Class::Accessor::Fast
- Data::Radius
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
AnyEvent::Radius::Server - module to implement AnyEvent based RADIUS server
SYNOPSYS
use AnyEvent; use AnyEvent::Radius::Server; sub radius_reply { # $h is hash-ref { request_id, type, av_list } my ($self, $h) = @_; ... return ($reply_type, $reply_av_list); } my $dict = AnyEvent::Radius::Server->load_dictionary('radius/dictionary'); my $server = AnyEvent::Radius::Server->new( ip => $ip, port => $port, read_timeout => 60, on_read => \&radius_reply, dictionary => $dict, secret => 'topsecret', ); AnyEvent->condvar->recv;
DESCRIPTION
The AnyEvent::Radius::Server module allows to handle RADIUS requests in non-blocking way
CONSTRUCTOR
- new (...options hash ...)
-
- ip - listen on ip, mandatory
- port - listen on port (default 1812)
- secret - RADIUS secret string
- dictionary - optional, dictionary loaded by load_dictionary() method
- on_read - called with parsed packed, in hash-ref {type, request_id, av_list, from}
- on_read_raw - called with raw binary packet as an argument
- on_wrong_request - received packet is not of request type (no reply sent)
- on_error - low-lever socket error occured
METHODS
- load_dictionary ($dictionary-file)
-
Class method to load dictionary - returns the object to be passed to constructor
SEE ALSO
AUTHOR
Sergey Leschenko <sergle.ua at gmail.com>
PortaOne Development Team <perl-radius at portaone.com> is the current module's maintainer at CPAN.
Module Install Instructions
To install AnyEvent::Radius, copy and paste the appropriate command in to your terminal.
cpanm AnyEvent::Radius
perl -MCPAN -e shell install AnyEvent::Radius
For more information on module installation, please visit the detailed CPAN module installation guide.