Commit 1f5e8195 authored by 's avatar
Browse files

added description for DiMAPI

git-svn-id: file:///home/svn/mapi/trunk@318 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 96d090f6
......@@ -46,7 +46,9 @@ satisfy a given set of conditions. In contrast with existing models, MAPI
gives the network flow a first class status: flows are named entities, and
users may create or destroy flows, read, sample or count packets of a flow,
apply functions to flows, and retrieve other traffic statistics from a
flow. This page provides a description of the main operations provided by
flow. Furthermore, MAPI allows the correlation of a network flow with a set
of remote and distributed monitoring sensors.
This page provides a description of the main operations provided by
MAPI. For information regarding the functions that can be applied
to network flows please refer to the
.BR mapi_stdlib (3)
......@@ -58,6 +60,7 @@ page.
is used to create a new network flow. The flow consists of all packets that arrive
in the device
.IR dev .
Instead of using a local device, a set of remote monitoring sensors can also be defined. In that case, the argument should contain the hostname (or IP address) and the monitoring interface of every monitoring sensor using the format "host1:dev1, host2:dev2, host3:dev3".
Upon successful creation, it returns a unique flow descriptor for the newly
created flow, otherwise returns -1.
.sp
......@@ -180,6 +183,35 @@ future results through the same pointer without having to invoke
.B mapi_read_results()
again.
.sp
In case that we use more than one monitoring sensors,
.B mapi_read_results()
returns a vector that contains the results from all the monitoring sensors.
The return value is a
.B dmapi_results struct
as specified in mapi.h:
.sp
.nf
struct dmapi_results {
struct host_results* res;
unsigned int cnt;
}
.sp
struct host_results {
void *result;
char *host_dev;
unsigned long long t_produced;
unsigned long long t_received;
}
.fi
.sp
The
.I res
field is a vector of
.I cnt
items
.B (host_results struct)
that contain the actual result and information about the monitoring sensor and the time produced and received. The necessary memory for these structs has been already allocated, once per every function applied.
.sp
.BI "int mapi_read_error(int *" err_no ", char *" err_str ");"
.br
.B mapi_read_error()
......
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