Skip to main content

Name

audit_series_add — Add a value to the counter associated with a key in a named series

Synopsis

#include "modules/validate/audit_series.h"

| int **audit_series_add** ( | name, |   | |   | count, |   | |   | key, |   | |   | ac, |   | |   | prefix_len); |   |

const char * <var class="pdparam">name</var>; int <var class="pdparam">count</var>; char * <var class="pdparam">key</var>; accept_construct * <var class="pdparam">ac</var>; int <var class="pdparam">prefix_len</var>;

Description

Note

This reference page was automatically generated from functions found in the header files in the development branch. The function described here may not exist in generally available versions of Momentum, and may change in behavior when it is generally available. Consult your vendor for definitive advice on the use of this function.

Add a value to the counter associated with a key in a named series.

Only the current window is affected.

Parameters

name
  • name of the series.
count
  • the value to be added. It can be positive or negative.
key
  • the key for which the counts is desired. For series of type "cidr", key is of the form "ip/mask". to use the remote IP of current session, caller can pass in "ac" instead.
ac
  • accept construct. This is the alternative for passing in an IP for cidr series.
prefix_len
  • if the type is cidr_ipv6, this determines the prefix to match. Useful for mitigating DoS attacks from a single system cycling addresses.

Return Values

0 if successful, -1 if error.

**Configuration Change. ** This feature is available starting from Momentum 3.1.

Was this page helpful?