CompareData Condition

The CompareData condition checks to see if certain data has a specific value. It uses the attributes ApplyTo, Offset, Length, UseDataAvail and IfNull to determine what data is subject to the test and what the return value should be if the data isn't available.

Also see section “Specifying Data for Conditions”.

In contrast to other condition types, if the Length property is omitted, the number of bytes specified in the Data property is used as the Length property. By omitting the Length property, this allows for a prefix match rather than an exact match.

The Verify condition is an alias for .

Data Attribute

Type Binary Data
Default (empty)
Description The Data attribute specifies what data is to be compared to the data referenced by ApplyTo, Offset and Length.

CaseSensitive Attribute

Type Boolean Values
Default false
Description Specifies whether to search for the data in case-sensitive or case-insensitive format.

GenVerify Attribute

This attribute is only applicable if the condition is used within a TcpRuleRecvProto rule. See section "GenVerify Attribute Of Conditions" for details.

Example

<CompareData>
  <ApplyTo>Http.Response.Header.Content-Type</ApplyTo>
  <Data>text/css</Data>
  <IfNull>true</IfNull>
  <CaseSensitive>false</CaseSensitive>
</CompareData>