Rate This Document
Findability
Accuracy
Completeness
Readability

mmpm_remove_rule

Feature

Removes a target rule from 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_remove_rule(mmpm_handler_t *handler, mmpm_rule_t *rule, uint32_t rule_num);

Parameter Description

Parameter

Description

Value Range

Input/Output

handler

Handler of the matching engine

Not null

Input

rule

Array of rules to be removed

Not null

Input

rule_num

Number of rules to be removed

Non-negative value. The value falls within the range of uint32_t, and matches the actual length of the rule array, otherwise, an out-of-bounds access exception will occur.

Input

Return Value

  • Success: 0 is returned.
  • Failure: The error code is returned.

Constraints

Only the matching engine MMPM_MATCHER_TYPE_HASH is supported.