Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aggregate using in+out bytes for bidirectional flows #28

Merged
merged 1 commit into from Jul 20, 2016

Conversation

candlerb
Copy link
Contributor

Some sources of data, e.g. ASA NSEL, record a bidirectional flow record
with separate counters for in/out bytes and in/out packets. This patch
makes aggregation over "packets", "bytes", "bps" etc look at the sum of
the input and output counters. Previously they would use only the input
counters.

Query types which explicitly look at one direction, like "ibyte" and
"obyte", are unchanged.

Processing of unidirectional flows is not affected, because these store
values in the "in" counters only - the "out" counters are zero, so using the
sum of in+out is the same.

The resulting code is simpler: it doesn't have to calculate both in/out
values everywhere. It also uses accessor functions for all values, which
means no special cases for r->counter[cindex].

Some sources of data, e.g.  ASA NSEL, record a bidirectional flow record
with separate counters for in/out bytes and in/out packets.  This patch
makes aggregation over "packets", "bytes", "bps" etc look at the *sum* of
the input and output counters.  Previously they would use only the input
counters.

Query types which explicitly look at one direction, like "ibyte" and
"obyte", are unchanged.

Processing of unidirectional flows is not affected, because these store
values in the "in" counters only - the "out" counters are zero, so using the
sum of in+out is the same.

The resulting code is simpler: it doesn't have to calculate both in/out
values everywhere. It also uses accessor functions for all values, which
means no special cases for r->counter[cindex].
@phaag phaag merged commit 01bfb78 into phaag:master Jul 20, 2016
@phaag
Copy link
Owner

phaag commented Jul 20, 2016

Thx. Makes sense to include bidirectional flow record aggregation.

@candlerb candlerb deleted the candlerb/in_out_bytes branch July 20, 2016 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants