本文整理汇总了C++中DynamicEngineData::asn1Detect方法的典型用法代码示例。如果您正苦于以下问题:C++ DynamicEngineData::asn1Detect方法的具体用法?C++ DynamicEngineData::asn1Detect怎么用?C++ DynamicEngineData::asn1Detect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DynamicEngineData
的用法示例。
在下文中一共展示了DynamicEngineData::asn1Detect方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
/*
* Detect ASN1 function
*
* p: packet data structure, same as the one found in snort.
* asn1: data defined in the detection plugin for this rule option
* cursor: current position within buffer
*
* Returns:
* > 0 : match found
* = 0 : no match found
*
* Predefined constants:
* (see sf_snort_plugin_api.h for more values)
* RULE_MATCH - if asn1 specifier is found within buffer
* RULE_NOMATCH - if asn1 specifier is not found within buffer
*
*/
ENGINE_LINKAGE int detectAsn1(void *p, Asn1Context* asn1, u_int8_t *cursor)
{
/* asn1Detect returns non-zero if the options matched. */
if (_ded.asn1Detect(p, (void *) asn1, cursor))
return RULE_MATCH;
return RULE_NOMATCH;
}