Installation guide
6: LAN Message Filtering
DC 900-1325I 81
way's msgmux process. Once loaded, the msgmux process executes the
fwymod_init() function in that library.
2. It provides a function called muxFilterHook(), which can be used to specify two
user-written functions: one to be called for every packet received from a WAN link
and another to be called for every packet destined for a WAN link.
Together these two actions make it easy to create filter SRAs. All that is necessary is to
create a shared library containing the two filter functions and a
fwymod_init() function
which calls
muxFilterHook() to register the two filter functions.
6.1 msgmux Filter Hook
The message multiplexor (msgmux) process provides a function (muxFilterHook) that
allows you to register two filter functions: one to filter messages moving from the WAN,
and one to filter messages moving to the WAN. The
muxFilterHook function is declared
as follows:
void muxFilterHook (int(*pFromWANFilter)(char *pBuf),
int(*pToWANFilter)(char *pBuf));
The arguments to muxFilterHook are defined as follows:
pFromWANFilter
This is a pointer to the function that filters the messages mov-
ing from the WAN.
pToWANFilter
This is a pointer to the function that filters the messages mov-
ing to the WAN.
Both arguments must be provided in the call to muxFilterHook; however, either or both
arguments can be
NULL pointers. If a NULL pointer is provided as the first argument,
the
msgmux task makes no calls to the function filtering the messages moving from the
WAN. Similarly, if a
NULL pointer is provided as the second argument, the msgmux task
makes no calls to the function filtering the messages moving to the WAN. The