Installation guide
6: LAN Message Filtering
DC 900-1325I 85
Support Department as described on page 14 for help in determining how to identify a
session for a given protocol.
It was mentioned earlier that the protocol command might need to be scanned to deter-
mine the type of packet being filtered. However, each protocol is different, and different
protocols use different values for their respective commands. If multiple protocols are
being run on the ICP boards, the filter functions must be smart enough to know which
protocol command values are being used in the packets being filtered. Currently, there
is no way to determine the protocol or ICP associated with a packet.
Another restriction on a filter is that it is limited to the buffer it receives as a parameter.
If a filter adds more data into this buffer, there is always the possibility of an overflow. A
filter function that expands data must therefore determine the amount of available
space in a buffer and handle the problem of overflow gracefully. The
MaxBufSize param-
eter of the TSI configuration file can be increased to allow additional room for expan-
sion (provided the client application doesn’t also expand the amount of data it sends in
a packet).
If a filter needs to detect and replace certain control sequences within a data stream,
these sequences should not span multiple buffers. The reason is again linked to the fact
that a filter is restricted to the buffer it receives. If one buffer contains only a partial con-
trol sequence, the filter function can perform one of two actions. On the one hand, it
could replace the partial sequence, then remove the remainder of the sequence when the
second buffer containing it is received. Suppose, however, that it wasn’t a control
sequence after all. That is, what if the second buffer doesn’t contain the trailing part of
the control sequence as expected, and the initial part was actual data? Then the client
application has received bad data because the filter function replaced something it
shouldn’t have. On the other hand, if the filter function does nothing to the partial con-
trol sequence in the first buffer, and the second buffer contains the remainder of the
control sequence, it’s too late for the filter function to remove the first part of the con-
trol sequence from the data stream, so the client application receives superfluous data.