Configuration File Syntax
—Policy blocks define how traffic classes will be handled (metered, marked or both). Keywords identify specific attributes of a policy, including which filters are being used by a policy.
—Adapter blocks assign policies to specific configured adapters (NICs) on the system. Adapter names must correspond to PPA names that can be listed by the lanscan command at the time
In the syntax of the configuration file, the
You can define as many of each block type as you need.
You can visually separate blocks using curly brackets or indentation.
Syntax Rules
The following general syntax rules apply to
Name Fields: Names can contain only letters, digits or underscores (_) and must begin with a letter. Letters are case sensitive.
Numeric Fields: Numeric attributes are treated as decimal unless preceded by “0x” or “0X”, in which case they are treated as hexadecimal. If a numeric attribute has leading 0 (zero) and only uses digits between
Comments: A configuration file can contain comments anywhere in the file. All text following the pound sign (#) is considered a comment and is ignored through the end of that line. Empty lines and
Line Continuations: Line continuations are not allowed in a configuration file. Each statement must be complete on a single line. The line length limit is 256 characters.
Visual Organization: You can use curly brackets ({}) in configuration files to help organize information visually. Indentation and spacing can also be used to organize information visually. Although text editors such as vi have support for indentation and ensuring
Error and Consistency Checking: Error checking is enforced on a configuration file whenever it is being verified or loaded (which includes a verification step). Configuration error checking detects some, but not all, possible cases of improper configuration attributes. Any errors found cause an abort and leave the kernel unchanged.
Some common checks include:
Chapter 4 | 59 |