Reading conf from module_init
Alan DeKok
aland at deployingradius.com
Wed Dec 26 18:36:02 CET 2007
Leandro Pereira de Lima e Silva wrote:
> I'm coding a new module for freeradius and would like to read the
> configuration from module_init instead of from module_instantiate.
Why?
> So, I start with this prototypes:
>
> static int example_init(void);
> static int example_instantiate(CONF_SECTION *conf, void **instance);
>
> I saw inside example_instatiate that the CONF_SECTION pointer is passed
> to cf_section_parse and here are my two questions:
>
> 1. What's that *conf that _instantiate receives?
The configuration it expects to be able to parse. See the example...
> 2. How can I read the configuration in _init?
You can't.
See the other modules: they don't use "init". It's been removed in
version 2.0.
Alan Dekok.
More information about the Freeradius-Devel
mailing list