summaryrefslogtreecommitdiff
path: root/server.c
diff options
context:
space:
mode:
authorTom Smeding <tom.smeding@gmail.com>2019-11-04 12:21:38 +0100
committerTom Smeding <tom.smeding@gmail.com>2019-11-04 12:21:38 +0100
commitfa1ae45491a8e41ccde4e0b366c37ec2a067bae9 (patch)
tree0a54d3746f3472aaad06b903829cb241850a39f7 /server.c
parentcf6fbbec9e2a04217a135924fd2bf209be488223 (diff)
Let xxd take stream argument
Diffstat (limited to 'server.c')
-rw-r--r--server.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server.c b/server.c
index b99e4ea..2ace5b5 100644
--- a/server.c
+++ b/server.c
@@ -53,7 +53,7 @@ int main(void) {
if (FD_ISSET(server_fd, &inset) && icmpd_peek(server)) {
struct icmpd_received msg = icmpd_recv(server);
printf("Server recv: %zu\n", msg.length);
- xxd(msg.data, msg.length);
+ xxd(stdout, msg.data, msg.length);
if (conn) {
printf("Message received while already connected\n");
@@ -76,7 +76,7 @@ int main(void) {
if (conn && FD_ISSET(conn_fd, &inset) && icmpd_peek(conn)) {
struct icmpd_received msg = icmpd_recv(conn);
printf("Connection recv: %zu\n", msg.length);
- xxd(msg.data, msg.length);
+ xxd(stdout, msg.data, msg.length);
free(msg.data);
}
}