(RADIATOR) SNMP checking for Colubris Wi-fi NAS
Vangelis Kyriakakis
vkyriak at forthnet.gr
Tue Apr 5 09:12:54 CDT 2005
Hello,
Here is a routine for SNMP checking for Colubris Wi-fi NASes. Tested
with Colubris CN3200.
Regards
Vangelis
# Colubris.pm
#
# Created by Vangelis Kyriakakis (vkyriak at forthnet.gr)
#
# Implement Radiator routines for communicating with a given type of NAS
#
package Radius::Nas::Colubris;
use Radius::SNMP;
use strict;
# The Colubris SNMP MIB
$Radius::Nas::ColubrisMIB =
'.iso.org.dod.internet.private.enterprises.8744';
sub isOnline
{
my ($name, $nas_id, $nas_port, $session_id, $client) = @_;
return 1 unless &Radius::SNMP::snmpgetprogExists();
&main::log($main::LOG_DEBUG, "Colubris: Checking $session_id->
$nas_id:$nas_port:$name" );
my $result = &Radius::SNMP::snmpget
($nas_id,
$client->{SNMPCommunity},
"$Radius::Nas::ColubrisMIB.5.1.1.3.6.1.6.$nas_port");
return 1 if (!$result || $result =~ /no response/i); # Could not
SNMP. Assume still there
return uc($1) eq uc($name)
if ($result =~ /^.*\"([^"]+)".*$/);
return 0; # not there
}
1;
--
Archive at http://www.open.com.au/archives/radiator/
Announcements on radiator-announce at open.com.au
To unsubscribe, email 'majordomo at open.com.au' with
'unsubscribe radiator' in the body of the message.
More information about the radiator
mailing list