Masking the value before comparison, Masking the value before comparison -10 – Lucent Technologies 6000 User Manual

Page 546

Advertising
background image

15-10

MAX 6000/3000 Network Configuration Guide

Defining Static Filters
Defining generic filters

Masking the value before comparison

A generic filter can include a mask to apply to the value specified by the Value parameter
before the MAX compares it to the bytes starting at the specified offset. You can use the mask
to specify exactly which bits you want to compare. The mask is assumed to have the same
number of octets as the data specified by the Length parameter.

The MAX unit translates both the mask and the value specified by the Value parameter into
binary format and then applies a logical AND to the results. Each binary 0 (zero) in the mask
hides the bit in the corresponding position in the value. A mask of all ones
(FF:FF:FF:FF:FF:FF:FF:FF) masks no bits, so the full specified value must match the packet
contents. For example, with the following filter specification:

Input Filters

In Filter NN

Generic...

Offset=2

Length=8

Mask=0f:ff:ff:ff:00:00:00:f0:00:00:00:00

Value=07:fe:45:70:00:00:00:90:00:00:00:00

Compare=no

More=no

or comparable RADIUS filter definition:

Ascend-Data Filter="generic in drop 2 0fffffff000000f 07fe45700000009"

and the following packet contents:

2A 31 97 FE 45 70 12 22 33 99 B4 80 75

The value setting matches the packet data after application of the mask.

Assuming that the Forward parameter is set to No, the packet is dropped because it matches
this filter. The byte comparison works as follows:

The MAX ignores 2A and 31 because of the two-byte offset.

The 9 in the third byte is also ignored, because the mask has a 0 (zero) in its place. The 7
in the third byte matches the Value parameter’s 7 for that byte.

In the fourth byte, F and E match the fourth byte specified by the Value parameter.

In the fifth byte, 4 and 5 match the fifth byte specified by the Value parameter.

In the sixth byte, 7 and 0 match the sixth byte specified by the Value parameter.

The seventh (12), eighth (22), and ninth (33) bytes are ignored because the mask has
zeroes in those places.

2A 31 97 FE 45 70 12 22 33 99 B4 80 75

0F FF FF FF 00 00 00 F0

07 FE 45 70 00 00 00 90

07 FE 45 70 00 00 00 90

2-byte Byte Offset

8-byte Comparison

Mask
Result of mask

Value to test

Advertising
This manual is related to the following products: