Specifications

CHAPTER 5. IMPLEMENTATION 43
module = module_list_head;
/* Iterate all modules, start at the list head. */
while(module) {
if(node.token == module.token) {
child = node.child;
/* Iterate all module options for each child of the node. */
while(child) {
while(option) {
if(child.name == option.name) {
/* Match found. */
option.value = child.value;
}
option = option->next;
}
child = child->next;
}
}
module = module->next;
}
Each time the configuration file parser hits upon a configuration option which does not
match with a daemon or a module option it issues a corresponding warning using the library’s
logging system. Stage two of the daemon’s start-up is completed once the configuration file
parser finished parsing the configuration file.
Command Line Interface
The command line interface is directly implemented by the daemon (iald.c) and serves two
different purposes: On the one hand, the command line interface is responsible to implement a
command line parser which evaluates the supplied command line options. On the other hand,
it is responsible to provide a user space interface which gives information about the possible
command line options. Again, the configuration options can be divided into two categories:
configuration options for the daemon and for the modules. The parsing of the daemon’s static
command line options is discussed briefly. The parsing of the dynamic command line options
for the modules is discussed thoroughly.
The Input Abstraction Layer’s command line interface follows the GNU coding standards
regarding the implementation of command line interfaces [Fsf04a]. These standards are based
on the “Utility Conventions” of the POSIX Specification [Iee04]. The GNU coding standards
for command line interfaces follow an approach to make command line interfaces more user
friendly by providing long-options. According to the POSIX Specification, command line
options consist of a single letter: program -h, with program being the executable binary and
h being a command line option. The GNU coding standards expand command line options
by adding long-options: program --help, again with program being the executable binary
and help being the command line option. According to the GNU coding standards, long-
options are always prefixed by two dashes (--). Both kind of command line options can have