Sample zgate configuration files – Zilog EZ80F91GA User Manual
Page 41

UM024502-1012
ZGATE (Persistent) Start-Up Configuration
ZGATE Embedded Security Development Kit
User Manual
29
Sample ZGATE Configuration Files
A sample listing of the
ZGATE_Conf.c
file that is linked to the ZGATE Demo project is
shown in the following code example:
const char *ZGATE_ConfigStrings[] =
{
"G, INTERVAL=240",
"G, HW_THRESHOLD=2000",
"G, LW_THRESHOLD=499",
"G, LOG_TO_SCREEN=OFF",
"G, LOGGING=OFF",
"G, MAX_TH_LOGFILE_SIZE=5",
"G, MAX_LOGFILE_SIZE=10",
"C, 1, ETH_ADDR_FILTER, NONE",
"C, 2, ETH_FRAME_FILTER, NONE",
"C, 3, IP_SRC_ADDR_FILTER, NONE",
"C, 4, IP_PROTOCOL_FILTER, WHITELIST",
"C, 5, TCP_PORT_FILTER, WHITELIST",
"C, 6, UDP_PORT_FILTER, WHITELIST",
"C, 7, ICMP_TYPE_FILTER, NONE",
"R, 1, WHITELIST, ENABLED, TCP_PORT,
{1,7,20,21,22,23,25,37,42,43,57,80,88,107,115}",
"R, 2, WHITELIST, ENABLED, TCP_PORT,
{162,179,264,443,546,547,992,8081}",
"R, 3, WHITELIST, ENABLED, UDP_PORT,
{1,7,22,37,42,53,67,68,69,80,88,123,161,162}",
"R, 4, WHITELIST, ENABLED, UDP_PORT,
{179,264,514,520,546,547,992}",
"R, 5, WHITELIST, ENABLED, IP_PROT, {1,2,3,4,6,8,9,17}",
""
};
When this configuration information is written to a file in ZFS, only the strings enclosed
within quotation marks should appear in the file, as shown in the following code example:
G, INTERVAL=240
G, HW_THRESHOLD=2000
G, LOG_TO_SCREEN=OFF
G, LOGGING=OFF
G, MAX_TH_LOGFILE_SIZE=5
G, MAX_LOGFILE_SIZE=10
C, 1, ETH_ADDR_FILTER, NONE
C, 2, ETH_FRAME_FILTER, NONE
C, 3, IP_SRC_ADDR_FILTER, NONE
C, 4, IP_PROTOCOL_FILTER, WHITELIST