beautypg.com

Zgate_add_ip_addr – Zilog EZ80F91GA User Manual

Page 93

background image

UM024502-1012

ZGATE Logging Page

ZGATE Embedded Security Development Kit

User Manual

81

ZGATE_add_ip_addr

Function Prototype

INT16 ZGATE_add_ip_addr( INT32 IP_Addr );

Parameters

IP_Addr

The IP address to be added to the IP source address static filtering
list.

IP_Addr

must be a 32-bit IPv4 address in little-endian (pre-

sentation mode) format (e.g., 192.68.1.15 would be represented
by the value

0xC0A8010F

which, on the eZ80F91 MCU, is

stored in memory as

0x0F

,

0x01

,

0xA8

,

0xC0

).

Return Value

TRUE

IP_Addr

was successfully added to the IP Address static filtering

list.

FALSE

IP_Addr

already exists in the IP Address static filtering list, the

list is full or the IP Address filter is disabled.

Description

When the IP Address filter is operating in WHITELIST (forwarding) or BLACKLIST
(blocking) Mode, it extracts the source IP address from inbound IP packets and compares
the IP address to entries in the IP Address filtering list. If a match is found, the frame is
forwarded to ZTP if the filter operates in WHITELIST Mode and blocked from TCP if the
filter operates in BLACKLIST Mode.

This API is used to add an entry to the IP Address static filtering list. Entries cannot be
added to the list if the IP Address filter is disabled.