Dolda2000 GitWeb
/
mctap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af3fc4a
)
Print packet contents from test code.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Sat, 9 Aug 2008 14:17:30 +0000
(16:17 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Sat, 9 Aug 2008 14:18:22 +0000
(16:18 +0200)
src/mctap.c
patch
|
blob
|
blame
|
history
diff --git
a/src/mctap.c
b/src/mctap.c
index
52dd294
..
8125c41
100644
(file)
--- a/
src/mctap.c
+++ b/
src/mctap.c
@@
-77,7
+77,7
@@
static int mkmcastsk4(struct in_addr group, int port)
static void test(int fd)
{
char buf[65536];
- int ret;
+ int
i,
ret;
struct sockaddr_storage nm;
socklen_t nmlen;
@@
-89,6
+89,11
@@
static void test(int fd)
exit(1);
}
printf("%s %i:\n", formataddress((struct sockaddr *)&nm, nmlen), ret);
+ for(i = 0; i < ret; i++) {
+ printf("%02x ", (unsigned char)buf[i]);
+ if(i % 20 == 0)
+ putchar(10);
+ }
}
}