NAF Core Library
libnaf 0.6.0 API documentation

aggregate.h File Reference

NAF Core Library Flow Aggregation API. More...

#include <naf/autoinc.h>
#include <naf/nafcore.h>
#include <naf/match.h>

Go to the source code of this file.


Functions

gboolean naf_aggregate (gboolean flush, NAFMultiBin *mtab, NAFAggConfig *conf, fBuf_t **fbuf_ary, GError **err)
 Aggregate dequeueable bin tables from a given multibin according to an aggregation configuration, writing the resulting aggregates.

Detailed Description

NAF Core Library Flow Aggregation API.

Used by nafalize. Defines a single entry point for aggregating flows from a multibin managed by the match API (see match.h). This function should be called periodically, and to completely aggregate and flush the multibin at process or aggregation termination.

The proper use of the match and aggregate APIs is as follows:


Function Documentation

gboolean naf_aggregate ( gboolean  flush,
NAFMultiBin mtab,
NAFAggConfig conf,
fBuf_t **  fbuf_ary,
GError **  err 
)

Aggregate dequeueable bin tables from a given multibin according to an aggregation configuration, writing the resulting aggregates.

This is a single entry point to the NAF aggregation apparatus, and should be called periodically with flush set to FALSE, then once at process or aggregation termination with flush set TRUE.

Parameters:
flush TRUE to aggregate every bintable, not just dequeueable ones beyond the horizon.
mtab NAFMultiBin to take bintables from, from naf_mtab_init().
conf Aggregation configuration from naf_exparse().
fbuf_ary Array of IPFIX message buffers; must have conf->fanout fBuf_t members.
err An error description.
Returns:
TRUE on success, FALSE otherwise.