Configuration Specification
4-33
Initialization and Configuration
4.4.9
OS / IP Stack Configuration Item Specification (CFGTAG_OS, CFGTAG_IP)
The OS and IP tags specify entries that alter various configuration options that
can be adjusted in the operating system and low-level stack operation. When
specifying an entry to the configuration, the Tag parameter is set to
CFGTAG_OS or CFGTAG_IP, and the Item parameter is set to the configura-
tion item to set (these are listed below).
Creating a configuration entry results in an alteration of the system’s internal
configuration structures, but since these entries are also part of the configura-
tion object (hCfg), they can be stored off and recorded as part of the CfgSave()
functionality. Thus using the configuration API has a significant advantage
over modifying the internal structures manually.
Removing an entry restores the default value to the internal stack configura-
tion. Entries that are not present can not be read, and an error return on read
implies the entry is in its default state.
The following is the list of configuration items. All items are of type “int” or “uint”.
They correspond exactly to the internal system configuration structures. For
more information on these fields, see the internal configuration discussion in
both the OS Abstraction section earlier in this document, and the IP stack sec-
tion in the attached appendices.
When creating a configuration entry for one of these tags, the entry should be
specified to be “unique”. For example, to enable routing in the IP stack that
code would be as follows:
// Enable IP routing
uint tmp = 1;
CfgAddEntry( hCfg, CFGTAG_IP, CFGITEM_IP_IPFORWARDING,
CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&tmp, 0 );
The following item values correspond directly to the OS and Stack configura-
tion structures
_oscfg
and
_ipcfg
. For more information on these structures,
see sections 2.1.2 and A.13.2.
When Tag is CFGTAG_OS, the value of Item can be one of the following:
CFGITEM_OS_DBGPRINTLEVEL
Debug message print threshold
CFGITEM_OS_DBGABORTLEVEL
Debug message abort thresh-
old
CFGITEM_OS_TASKPRILOW
Lowest priority for stack task
CFGITEM_OS_TASKPRINORM
Normal priority for stack task
CFGITEM_OS_TASKPRIHIGH
Highest priority for stack task
CFGITEM_OS_TASKPRIKERN
Kernel-level priority (highest)
CFGITEM_OS_TASKSTKLOW
Minimum stack size
CFGITEM_OS_TASKSTKNORM
Normal stack size
CFGITEM_OS_TASKSTKHIGH
Stack size for high volume
tasks