Hello Bruno -
On Wed, 22 Nov 2000, Bruno Tiago Rodrigues wrote:
> hi all
>
> is there any way to define a "global" variable in a startup hook that can be
> used anywhere else (a pre or post-auth hook) in the code?
> I want to parse a file on startup (initialization/hangup) and to load some
> values related to pricing plans and access-control structures to hashes or
> arrays (perl complex data structures) and to access them every time the post
> auth hook is called, without having to load them into memory again and
> again. This data is static and Radiator or any of the hooks are going to
> change it.
>
> I guess I would want to define them as part of the Radius::Radius class or
> something, but I don't know the correct way to access them in the post auth
> hook can anyone help me ?
>
I would suggest you use the GlobalVar facility that is provided for this
purpose. Have a look at the examples in the file goodies/hooks.txt - the first
two hooks do exactly what you need.
hth
Hugh
--
Radiator: the most portable, flexible and configurable RADIUS server
anywhere. SQL, proxy, DBM, files, LDAP, NIS+, password, NT, Emerald,
Platypus, Freeside, Interbiller, TACACS+, PAM, external, etc, etc.
Available on Unix, Linux, FreeBSD, Windows 95/98/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.