summaryrefslogtreecommitdiff
path: root/src/cmd/netstack/tcp.c
diff options
context:
space:
mode:
authordzwdz2023-08-30 00:03:43 +0200
committerdzwdz2023-08-30 00:03:43 +0200
commitcf7877737ff5032f8bad59d57b048f66c4813b5b (patch)
treeec9c66772331594c30b34062a2cb0f72719d6f6e /src/cmd/netstack/tcp.c
parentf71af249cfb9ca9eb0832cc46437b2c5cb7bb217 (diff)
style: get rid of eprintf
Diffstat (limited to 'src/cmd/netstack/tcp.c')
-rw-r--r--src/cmd/netstack/tcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/netstack/tcp.c b/src/cmd/netstack/tcp.c
index d1adeab..cbe2c14 100644
--- a/src/cmd/netstack/tcp.c
+++ b/src/cmd/netstack/tcp.c
@@ -5,6 +5,7 @@
#include "proto.h"
#include "util.h"
#include <assert.h>
+#include <err.h>
#include <shared/ring.h>
enum {
@@ -123,7 +124,7 @@ struct tcp_conn *tcpc_new(
// TODO wait for ARP reply
arp_request(c->rip);
if (arpcache_get(state.gateway, &c->rmac) < 0) {
- eprintf("neither target nor gateway not in ARP cache, dropping");
+ warnx("neither target nor gateway not in ARP cache, dropping");
free(c);
return NULL;
}
@@ -222,7 +223,7 @@ void tcp_parse(const uint8_t *buf, size_t len, struct ipv4 ip) {
}
}
if (iter->lack != seq && iter->lack - 1 != seq) {
- eprintf("remote seq jumped by %d", seq - iter->lack);
+ warnx("remote seq jumped by %d", seq - iter->lack);
tcpc_sendraw(iter, FlagACK, NULL, 0);
return;
}