Next: Hierarchy of Authorization Up: Authorization Rule Database Previous: Eaglet

Macros and Comments

The authorization file is preprocessed with cpp (see your UNIX system manual pages for cpp(1)), a simple macro processor. This preprocessing allows you to take advantage of a useful construct, definition and replacement.

As in program source code, for example, the #define preprocessor command causes a name (identifier) to become defined as a macro to the preprocessor. What follows is the body of the macro. Where name is used in the authorization file, name is effectively replaced by a copy of body. If the macro is defined to accept arguments, then the actual arguments following name are substituted for formal parameters in body.

An example #define preprocessor command follows:

#define MYNET 192.24.345

This definition can be used in authorization rules in place of the more cumbersome IP network designation. If you defined the above macro in your authorization file, you could create rules such as the following:

.industry.com allow MYNET

Your authorization file may also contain comments. Comments begin with the characters /* and end with the first subsequent occurrence of the characters */. Comments may contain any number of characters and extend over more than one line. Cooments are always ignored. A comment looks like this:

/* This is a comment */

Finally, authorization definitions or rules can be continued on the following line by appending a backslash to the current line:

alpha, .industry.com allow 192.48.145.1, \
192.24


tkevans@delmarva.com