Zgate_set_max_logfile_size – Zilog EZ80F91GA User Manual
Page 104

ZGATE API Reference
UM024502-1012
92
ZGATE Embedded Security Development Kit
User Manual
ZGATE_set_max_logfile_size
Function Prototype
INT16 ZGATE_set_max_logfile_size( INT32 logfile_size, INT32
th_logfile_size );
Parameters
logfile_size
The archiving threshold of the
zgate.log
file in units of 1000
bytes.
th_logfile_size
The archiving threshold of the
zg_thl.log
file in units of 1000
bytes.
Permissible values for either parameter are:
-1
The parameter is ignored. The current archiving threshold is not
altered.
1..1000
Sets the archiving threshold between 1,000 and 1,000,000 charac-
ters.
Return Value
FALSE
One or both of the input parameters is invalid.
TRUE
Both parameters were accepted.
Description
When ZGATE detects an inbound packet that violates one of its filtering rules (static, SPI
or threshold), the packet is discarded and, if file logging is enabled, a new entry is added to
the corresponding log file. Static filtering and SPI filtering violations are logged to a file
named
zgate.log
. Threshold filtering exceptions are logged to a file named
zg_thl.log
.
All log files (and archives) are maintained in the root folder of the Zilog File System
(ZFS). If the ZTP application does not include ZFS support, ZGATE logging information
will only be displayed on the ZTP console. In this instance, the
ZGATE_set_max_logfile_size
API serves no useful purpose.
This function sets the maximum size the log files are allowed to reach before being
archived. The
zgate.log
file will be archived to
zg_log.old
, and
zg_thl.log
will be
archived to
zg_thl.old
. The threshold point for archiving is determined by the value of
the
logfile_size
and
th_logfile_size
parameters.