Hi Aaron,
On Mar 28, 6:20am, Aaron Nabil wrote:
> Subject: RE: (RADIATOR) TotalControlSNMP
>
>
> Here a slightly improved version in that it should work independant of
> the card density (quad/hiperdsp) and type (e1/t1). It uses the
> session-id instead of the nas-port.
Thanks again for the improved code. We have rolled the new version into the
code for the next release.
BTW, the return value from isOnline* is just tested for truth, so undef/1 would
be as good as 0/1
Cheers.
>
> ####################################################################
> # Check Total Control by using SNMP
> #
> sub isOnlineTotalControlSNMP
> {
> my ($name, $nas_id, $nas_port, $session_id, $client) = @_;
>
> return 1 unless &Radius::SNMP::snmpgetprogExists();
>
> my $oid = length $session_id;
> my $x;
> foreach $x (unpack('C*', $session_id)) {
> $oid .= ".$x";
> }
>
> my $result = &Radius::SNMP::snmpget($nas_id, $client->{SNMPCommunity},
> "$Radius::Nas::TCMIB.4.2.1.140.1.2.$oid");
>
> # There must be some Important Reason all of these routines return
> # 0 or 1 instead of nil or 1, so I'll play along.
> return 0+($result =~ /^.*\"([^"]+)".*$/ && $1 eq $name);
> }
>
>
>
>
>
> On Tue, 28 Mar 2000, Aaron Nabil wrote:
>
> >
> > On Tue, 28 Mar 2000, Ingvar Berg (ERA) wrote:
> >
> > > I assume that 24 is for a T1 line, so with E1 lines it would be 30?
> > > /Ingvar
> >
>
>
> --
> 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.