Commit d82a29f3 authored by 's avatar
Browse files

Correct some error messages

git-svn-id: file:///home/svn/mapi/trunk@826 8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent 2f34e68c
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#include <unistd.h> #include <unistd.h>
#include <mapi.h> #include <mapi.h>
#include "test.h" #include "test.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
int fd; int fd;
...@@ -23,7 +24,7 @@ int main(int argc, char *argv[]) ...@@ -23,7 +24,7 @@ int main(int argc, char *argv[])
} }
DOT; DOT;
if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){ if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply TO_BUFFER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -110,7 +111,7 @@ DOT; ...@@ -110,7 +111,7 @@ DOT;
} }
DOT; DOT;
if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){ if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply TO_BUFFER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
......
...@@ -27,7 +27,7 @@ int main(int argc, char *argv[]) ...@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
} }
DOT; DOT;
if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){ if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply TO_BUFFER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -35,7 +35,7 @@ DOT; ...@@ -35,7 +35,7 @@ DOT;
DOT; DOT;
if((fid0=mapi_apply_function(fd, "HASH", level))<0){ if((fid0=mapi_apply_function(fd, "HASH", level))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply HASH to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -80,7 +80,7 @@ DOT; ...@@ -80,7 +80,7 @@ DOT;
} }
DOT; DOT;
if(mapi_apply_function(fd, "BPF_FILTER", "tcp")<0){ if(mapi_apply_function(fd, "BPF_FILTER", "tcp")<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply BPF_FILTER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -88,7 +88,7 @@ DOT; ...@@ -88,7 +88,7 @@ DOT;
DOT; DOT;
if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){ if((fid=mapi_apply_function(fd, "TO_BUFFER"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply TO_BUFFER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -96,7 +96,7 @@ DOT; ...@@ -96,7 +96,7 @@ DOT;
DOT; DOT;
if((fid0=mapi_apply_function(fd, "HASH", 1))<0){ if((fid0=mapi_apply_function(fd, "HASH", 1))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply HASH to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
......
...@@ -28,7 +28,7 @@ int main(int argc, char *argv[]) ...@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
} }
DOT; DOT;
if((fid_to_buffer = mapi_apply_function(fd, "TO_BUFFER"))<0){ if((fid_to_buffer = mapi_apply_function(fd, "TO_BUFFER"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply TO_BUFFER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -43,7 +43,7 @@ DOT; ...@@ -43,7 +43,7 @@ DOT;
} }
DOT; DOT;
if((fid_bpf2 = mapi_apply_function(fd2, "BPF_FILTER", "ip src net 195.113.0.0/16 and ip dst net 147.251.0.0/16"))<0){ if((fid_bpf2 = mapi_apply_function(fd2, "BPF_FILTER", "ip src net 195.113.0.0/16 and ip dst net 147.251.0.0/16"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply BPF_FILTER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -162,7 +162,7 @@ DOT; ...@@ -162,7 +162,7 @@ DOT;
} }
DOT; DOT;
if((fid_to_buffer = mapi_apply_function(fd, "TO_BUFFER"))<0){ if((fid_to_buffer = mapi_apply_function(fd, "TO_BUFFER"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply TO_BUFFER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -1;
...@@ -177,7 +177,7 @@ DOT; ...@@ -177,7 +177,7 @@ DOT;
} }
DOT; DOT;
if((fid_bpf2 = mapi_apply_function(fd2, "BPF_FILTER", "ip src net 195.113.0.0/16 and ip dst net 147.251.0.0/16"))<0){ if((fid_bpf2 = mapi_apply_function(fd2, "BPF_FILTER", "ip src net 195.113.0.0/16 and ip dst net 147.251.0.0/16"))<0){
fprintf(stderr, "Could not apply PKT_COUNTER to flow %d\n", fd); fprintf(stderr, "Could not apply BPF_FILTER to flow %d\n", fd);
mapi_read_error( &err_no, error); mapi_read_error( &err_no, error);
fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error); fprintf(stderr,"Erorcode :%d description: %s \n" ,err_no, error);
return -1; return -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