Commit 8df8e8e2 authored by 's avatar

Update man page for BUCKET correct documentation


git-svn-id: file:///home/svn/mapi/trunk@1131 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 914d6333
......@@ -201,11 +201,13 @@ Computes the additive hash function over the packets of a network flow. layer va
Type of results: \fBunsigned int\fP.
.\"--------------------------------------------------------
.IP "\fBBUCKET\fP (unsigned long long \fItimeout\fP, int \fIflow\fP, int \fIfunction\fP)"
.IP "\fBBUCKET\fP (int \fIflow\fP, int \fIfunction\fP, char* \fIinterval\fP, int \fIreset\fP)"
Returns results from other MAPI functions in precise periodical intervals.
It divides packets into buckets based on their timestamps. The \fItimeout\fP argument defines the size of a bucket in microseconds. Only packets within this time interval will be added to the same bucket. Once the timeout is reached, the function with id \fIfunction\fP is applied on all packets in the bucket. Afterwards, the bucket is emptied and new packets are added for the next \fItimeout\fP microseconds.
\fIflow\fP and \fIfunction\fP indicate the flow and function from where the results will be read.
Then, it divides packets into buckets based on their timestamps. The \fIinterval\fP argument is a time string (e.g. "1s", "100ms", etc) that defines the timeout for the periodic interval of a bucket. Only packets within this time interval will be added to the same bucket. Once the timeout is reached, the function with id \fIfunction\fP is applied on all packets in the bucket. Afterwards, the bucket is emptied and new packets are added for the next \fIinterval\fP microseconds.
If \fIreset\fP is enabled (set to 1), the results start from zero in every interval, else if it is disabled (set to 0) the results will increase in every interval.
The results of the applied function are written to a structure \fBbucket_data\fP, which contains the timestamp of the first packet and a pointer to the result obtained by the applied function. The results from all buckets are put in a fifo ring buffer and can be read one by one by the
The results of the applied function are written to a structure \fBstruct bucket_data\fP (declared in mapi/bucket.h), which contains the timestamp of the first packet and a pointer to the result obtained by the applied function. The results from all buckets are put in a fifo ring buffer and can be read one by one by the
.B mapi_read_results()
function.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment