A specific part of a frame can be masked out by zeroing the configured fields. The following NTPL example configures the SmartNIC to mask out 16 bytes in the layer 4 payload of a frame.
Define maskRecipe = Mask(Offset0=Layer4Payload, Length0=16) Assign[StreamId=0;Mask=maskRecipe] = Layer4Protocol==TCPTwo elements are used to configure the field for packet masking.
- Offset0=Layer4Payload: The starting byte which is specified using
a dynamic offset and a static offset where a dynamic offset is based on a predefined
protocol layer, and a static offset is relative to the dynamic offset. In this example,
Layer4Payload is the dynamic offset and  is the
static offset. The starting byte is byte 0 of the layer 4 payload.Note: Supported static offset values are -16384 to 16383.
- Length0=16: The length of the field in bytes. A maximum of 16 bytes can be configured.
Define maskRecipe = Mask(Offset0=StartOfFrame, Length0=16, Offset1=StartOfFrame, Length1=16, \\ Offset2=StartOfFrame, Length2=16, Offset3=StartOfFrame, Length2=16) Assign[StreamId=0;Mask=maskRecipe] = Port==0
Note: Packet masking only applies to the following SmartNICs.
- NT200A02 running on a capture/replay image
- NT100A01 running on a test and measurement image