Commit dc56dc53 authored by 's avatar
Browse files

test file for cooking


git-svn-id: file:///home/svn/mapi/trunk@239 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 388cca1d
/*******************************************
*
* Testing PKT_COUNTER
*
*******************************************/
#include <stdio.h>
#include <unistd.h>
#include "../mapi.h"
int main(MAPI_UNUSED int argc, char *argv[])
{
int fd,fid,*cnt;
if(!argv[1])
{
printf("\nWrong arguments\n");
return -1;
}
fd=mapi_create_flow(argv[1]);
mapi_apply_function(fd,"COOKING",100000,10);
fid=mapi_apply_function(fd,"PKT_COUNTER");
mapi_connect(fd);
while(1)
{
sleep(1);
cnt = mapi_read_results(fd,fid,MAPI_REF);
printf("\nPacket read : %d",*cnt);
}
mapi_close_flow(fd);
printf("\nCOOKING OK\n");
return 0;
}
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