INN config file parsing infrastructure

Russ Allbery rra at
Sat May 6 09:09:00 UTC 2000

Todd Olson <tco2 at> writes:

> Imagine say four groups enclosed in a group and that repeated three
> deep.

I can't imagine any configuration file syntax that could express that
level of complexity without being at least somewhat difficult to follow.
There's always the option, in most cases, of collapsing the groups down
and just repeating information to make it easier to follow how things are

>>> It seems essential to the infrastructure to have a tool (based on the
>>> parse library) that allows you to ask
>>>     1) for this "group" what are all the parameter:value pairs
>>>        set explicitly or implicitly
>>>     2) which of these are set only be defaults built into inn

>> This information is all available and part of the structs in my
>> original proposal.  1) in fact will be static const data generated from
>> the .def file.

> Hum ...  I thought that part of the information was directed at the
> programmers who would encorporate the parser results into code in INN.

Right, but the direction should come from the .def file.

The current theory is that all possible parameters valid for a group are
listed in the parsing data for that group, and that if a group and a
subgroup share the same parameter group, the subgroup will inherit all
settings from the enclosing group.

After doing the parse, (2) will be available in the results structs in the
form of flags indicating whether or not the value was explicitly set.  You
have to do some fairly basic struct chasing to figure out if something
that wasn't set came from a general default or was inherited from a parent
group, but I can incorporate that into a function after I get everything
else written.

> I am raising a plea for end-adminstrator comand line tools to be 
> built on this parser you are proposing.

That's definitely part of the plan.

> The point is that us administrators would find it handy to be able to
> ask how INN sees the data from the command line.

Oh, wholeheartedly agreed.

Russ Allbery (rra at             <>

More information about the inn-workers mailing list