I have figured out the Total Control SNMP stuff as well (see note at
bottom). I'm sure that Mike will whip up a patch for everyone in the near
future. 


# The 3com TotalControl SNMP MIB
$Radius::Nas::TCMIB =
    '.iso.org.dod.internet.private.enterprises.429'


sub isOnlineTotalControlSNMP
{
    my ($name, $nas_id, $nas_port, $session_id, $client) = @_;

    if (!-x $Radius::Nas::snmpgetprog)
    {
    &main::log($main::LOG_ERR, "$Radius::Nas::snmpgetprog is not 
executable. Check and configure Nas.pm");
    return 1; # Assume the worst
    }
    my $portidx = 1256 + $nas_port;
    my $result = `$Radius::Nas::snmpgetprog $nas_id 
$client->{SNMPCommunity} $Radius::Nas::TCMIB.4.10.1.1.18.$portidx`;

    &main::log($main::LOG_ERR, "The command '$Radius::Nas::snmpgetprog
$nas_id $client->{SNMPCommunity} $Radius::Nas::TCMIB.4.10.1.1.18.$portidx' failed
with an error: $result")
    if $result =~ /error/i;

    if ($result =~ /^.*\"([^"]+)".*$/)
    {
        return $1 eq $name;
    }
    return 0;
}

Note: I got most of this from another Radius product (not to be mentioned
here ;-)

Steve

---
Steve Roderick                                  ProAxis Communications, Inc.
[EMAIL PROTECTED]                               Internet Access Provider
                                                (541) 757-0248


===
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.

Reply via email to