Hi Aaron,
Thanks for that. I have rolled your fix into the next release.
Cheers.
On Mar 28, 2:07am, Aaron Nabil wrote:
> Subject: Re: (RADIATOR) TotalControlSNMP
>
>
> Your math for computing portidx isn't correct for more than the first 24
> ports. If use the following instead, you'll get the correct results.
>
> my $chan = $nas_port % 24;
> my $slot = (($nas_port - $chan) / 24)+1;
> my $portidx = (256*$slot) + $chan + 1000;
>
>
> Note that these equations are for the factory default density settings.
>
>
>
> On Sun, 28 Mar 1999, Stephen Roderick wrote:
>
> >
> > 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 ;-)
> >
>
> --
> Aaron Nabil
>
>
> ===
> Archive at http://www.starport.net/~radiator/
> Announcements on [EMAIL PROTECTED]
> To unsubscribe, email '[EMAIL PROTECTED]' with
> 'unsubscribe radiator' in the body of the message.
>-- End of excerpt from Aaron Nabil
--
Mike McCauley [EMAIL PROTECTED]
Open System Consultants Pty. Ltd Unix, Perl, Motif, C++, WWW
24 Bateman St Hampton, VIC 3188 Australia http://www.open.com.au
Phone +61 3 9598-0985 Fax +61 3 9598-0955
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, TACACS+, PAM, external, etc etc on Unix, Win95/8,
2000, NT, MacOS X
===
Archive at http://www.starport.net/~radiator/
Announcements on [EMAIL PROTECTED]
To unsubscribe, email '[EMAIL PROTECTED]' with
'unsubscribe radiator' in the body of the message.