Function pfwl_set_expected_flows¶
Defined in File peafowl.h
Function Documentation¶
-
uint8_t
pfwl_set_expected_flows(pfwl_state_t *state, uint32_t flows, pfwl_flows_strategy_t strategy)¶ Sets the number of simultaneously active flows to be expected.
- Return
0 if succeeded, 1 otherwise.
- Parameters
state: A pointer to the state of the library.flows: The number of simultaneously active flows.strategy: If PFWL_FLOWS_STRATEGY_NONE, there will not be any limit to the number of simultaneously active flows. However, this could lead to slowdown when retrieving flow information. If PFWL_FLOWS_STRATEGY_SKIP, when that number of active flows is reached, if a new flow is created an error will be returned (PFWL_ERROR_MAX_FLOWS) and new flows will not be created. If PFWL_FLOWS_STRATEGY_EVICT, when when that number of active flows is reached, if a new flow is created the oldest flow will be evicted.