GateD Configuration Guide - Directives

## 6.1.5 Directive Statements

Directive statements provide direction to the GateD configuration language parser about included files and the directories in which these files reside. Directive statements are immediately acted upon by the parser. Other statements terminate with a semi-colon (;), but directive statements terminate with a newline. The two directive statements are:

%directory "directory"
  Defines the directory where the include files are stored. When it is used, GateD looks in the directory identified by pathname for any included files that do not have a fully qualified filename i.e. do not begin with "/". This statement does not actually change the current the directory, it just specifies the prefix applied to included file names.
%include "filename"
  Identifies an include file. The content of the file is included in the gated.conf file at the point in the gated.conf file where the `%include` directive is encountered. If the filename is not fully qualified, i.e., it does not begin with "/", it is considered to be relative to the directory defined in the `%directory` directive. The `%include`directive statement causes the specified file to be parsed completely before resuming with this file. Nesting up to ten levels is supported. The maximum nesting level may be increased by changing the definition of FI_MAX in `parse.h`.

In a complex environment, segmenting a large configuration into smaller, more easily understood segments might be helpful, but one of the great advantages of GateD is that it combines the configuration of several different routing protocols into a single file. Segmenting a small file unnecessarily complicates routing configurations.

Last updated April 26, 1997