question regarding the configuration implementation

Harrie Hazewinkel <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <4470312.1022508035@localhost>
HI all,

Maybe someone could help me out in order to confirm how
I think the configuration file is hanndled.
I believe this is the scheme:

A programm
1- opens the configuration file
2- reads it as a huge octet_string
3- splits is into a list of lines (octet_string)
4- parser the all lines of the list which could be
       a- a comment line (ignore)
       b- an include line (which inserts the to be included as a
                           list of lines again steps 1,2,3)
       c- processes a lines (splits is at the '=', makes a name
                              value pair and adds it in a dictionary)
(NOW ALL CONFFILE READING IS DONE)
5- initializes the needed process
       a- it starts for looking of groups in the dictionary
       b- depending on the group it looks for parameters.

I was wondering if someone could tell me the reason why putting it
in a dictionary first as a very general configuration representation
and later search into it for only those parts needed??

Another question I have is why one would have all configuration tokens
known to each process and depending on the process totally ignore it??
The main reason is maybe that this way a single configuration file
can be used for all, but I guess there is more.


I merely ask this on how to handle module specific configuration parts
for that module API I was talking of last week.

Any help is appreciated,


Harrie

Internet Management Consulting
tel: +39-3474932300
mailto:[email protected]                http ://www.mod-snmp.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.