我要评分
获取效率
正确性
完整性
易理解

mmpm_find_rule

Feature

Finds the target rule using the multi-pattern rule matching engine. rule->key and rule->key_len must have a one-to-one correspondence to ensure the function can work as expected.

Definition

int mmpm_find_rule(mmpm_handler_t *handler, mmpm_rule_t *rule);

Parameter Description

Parameter

Description

Value Range

Input/Output

handler

Handler of the matching engine

Not null

Input

rule

Rules to be matched

Not null

Input/Output

Return Value

  • Success: 0 is returned, and the alias of the matched rule is returned through rule->alias.
  • Failure: The error code is returned.