Commit cf0d310e authored by 's avatar
Browse files

cooking is now stable, a more concrete test


git-svn-id: file:///home/svn/mapi/trunk@242 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent a2c52531
...@@ -11,22 +11,44 @@ ...@@ -11,22 +11,44 @@
int main(MAPI_UNUSED int argc, char *argv[]) int main(MAPI_UNUSED int argc, char *argv[])
{ {
int fd,fid,fid2,*cnt,*cnt2; int fd,fd2,fid,fid2,*cnt,*cnt2;
char *name;
if(!argv[1]) int offline=0,opt;
while((opt = getopt(argc, argv, "i:r:")) != EOF)
{ {
printf("\nWrong arguments\n"); switch(opt)
{
return -1; case 'i':
offline = 0;
name = (char *)strdup(optarg);
break;
case 'r':
offline = 1;
name = (char *)strdup(optarg);
break;
default:
break;
}
} }
fd=mapi_create_offline_flow(argv[1],MFF_PCAP); if(offline) {
fd=mapi_create_offline_flow(name,MFF_PCAP);
fd2=mapi_create_offline_flow(name,MFF_PCAP);
}
else {
fd=mapi_create_flow(name);
fd2=mapi_create_flow(name);
}
fid=mapi_apply_function(fd,"PKT_COUNTER"); fid=mapi_apply_function(fd,"PKT_COUNTER");
mapi_apply_function(fd,"COOKING",100000,10); mapi_apply_function(fd,"COOKING",100000,10);
fid2=mapi_apply_function(fd,"PKT_COUNTER"); fid2=mapi_apply_function(fd,"PKT_COUNTER");
mapi_apply_function(fd2,"COOKING",100000,10);
mapi_connect(fd); mapi_connect(fd);
mapi_connect(fd2);
while(1) while(1)
{ {
......
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