Solaris System Management Agent Developer's Guide

Defining New Configuration Tokens

Configuration tokens are used by modules to get persistent data during runtime. When your module uses custom configuration tokens, you should create one or more custom configuration files for the module. You might also choose to create one configuration file for several related modules. You can define new tokens in the custom configuration file.

Custom tokens must use the same format as the directives in snmpd.conf. One token is defined in each line of the configuration file. The configuration tokens are written in the form:

Token Value

For example, your token might be:


my_token 4

Modules should not define custom tokens in the SNMP configuration file, /etc/sma/snmp/snmpd.conf. If a module stores tokens in /etc/sma/snmp/snmpd.conf, namespace collisions can potentially occur. See Avoiding Namespace Collisions for more information about namespace collisions.