Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Arne Øslebø
mapi
Commits
d82a29f3
Commit
d82a29f3
authored
Aug 25, 2006
by
Browse files
Correct some error messages
git-svn-id:
file:///home/svn/mapi/trunk@826
8d5bb341-7cf1-0310-8cf6-ba355fef3186
parent
2f34e68c
Changes
3
Hide whitespace changes
Inline
Side-by-side
tests/test_get_next_pkt.c
View file @
d82a29f3
...
...
@@ -2,6 +2,7 @@
#include <unistd.h>
#include <mapi.h>
#include "test.h"
int
main
(
int
argc
,
char
*
argv
[])
{
int
fd
;
...
...
@@ -23,7 +24,7 @@ int main(int argc, char *argv[])
}
DOT
;
if
((
fid
=
mapi_apply_function
(
fd
,
"TO_BUFFER"
))
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUNT
ER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
TO_BUFF
ER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -110,7 +111,7 @@ DOT;
}
DOT
;
if
((
fid
=
mapi_apply_function
(
fd
,
"TO_BUFFER"
))
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUNT
ER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
TO_BUFF
ER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
tests/test_hash.c
View file @
d82a29f3
...
...
@@ -27,7 +27,7 @@ int main(int argc, char *argv[])
}
DOT
;
if
((
fid
=
mapi_apply_function
(
fd
,
"TO_BUFFER"
))
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUNT
ER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
TO_BUFF
ER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -35,7 +35,7 @@ DOT;
DOT
;
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
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -80,7 +80,7 @@ DOT;
}
DOT
;
if
(
mapi_apply_function
(
fd
,
"BPF_FILTER"
,
"tcp"
)
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUN
TER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
BPF_FIL
TER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -88,7 +88,7 @@ DOT;
DOT
;
if
((
fid
=
mapi_apply_function
(
fd
,
"TO_BUFFER"
))
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUNT
ER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
TO_BUFF
ER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -96,7 +96,7 @@ DOT;
DOT
;
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
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
tests/test_mapi_connect.c
View file @
d82a29f3
...
...
@@ -28,7 +28,7 @@ int main(int argc, char *argv[])
}
DOT
;
if
((
fid_to_buffer
=
mapi_apply_function
(
fd
,
"TO_BUFFER"
))
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUNT
ER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
TO_BUFF
ER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -43,7 +43,7 @@ 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
){
fprintf
(
stderr
,
"Could not apply
PKT_COUN
TER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
BPF_FIL
TER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -162,7 +162,7 @@ DOT;
}
DOT
;
if
((
fid_to_buffer
=
mapi_apply_function
(
fd
,
"TO_BUFFER"
))
<
0
){
fprintf
(
stderr
,
"Could not apply
PKT_COUNT
ER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
TO_BUFF
ER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
@@ -177,7 +177,7 @@ 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
){
fprintf
(
stderr
,
"Could not apply
PKT_COUN
TER to flow %d
\n
"
,
fd
);
fprintf
(
stderr
,
"Could not apply
BPF_FIL
TER to flow %d
\n
"
,
fd
);
mapi_read_error
(
&
err_no
,
error
);
fprintf
(
stderr
,
"Erorcode :%d description: %s
\n
"
,
err_no
,
error
);
return
-
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment