diff options
author | dzwdz | 2022-08-20 11:11:57 +0200 |
---|---|---|
committer | dzwdz | 2022-08-20 11:11:57 +0200 |
commit | f22f019aeba00ccb3cc35fe763c3e87bf5690040 (patch) | |
tree | 6f7338b526dca6eebc865096dbdbd3af90cda335 /src/user/app/ethdump/arp.c | |
parent | 2a16c1f6f9118e7127d532421ae19b959b3f1d87 (diff) |
user/ethdump: turn into a file server
Diffstat (limited to 'src/user/app/ethdump/arp.c')
-rw-r--r-- | src/user/app/ethdump/arp.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/user/app/ethdump/arp.c b/src/user/app/ethdump/arp.c index a022b12..cfb1e04 100644 --- a/src/user/app/ethdump/arp.c +++ b/src/user/app/ethdump/arp.c @@ -1,6 +1,5 @@ #include "proto.h" #include "util.h" -#include <stdlib.h> #include <string.h> enum { @@ -20,12 +19,6 @@ void arp_parse(const uint8_t *buf, size_t len) { uint16_t ptype = nget16(buf + ProtoType); uint16_t op = nget16(buf + Operation); - const char *ops = "bad operation"; - if (op == 1) ops = "request"; - if (op == 2) ops = "reply"; - - printf("ARP htype 0x%x, ptype 0x%x, %s\n", htype, ptype, ops); - if (!(htype == HdrTypeEther && ptype == ET_IPv4)) return; enum { /* only valid for this combination of header + proto */ SrcMAC = 8, @@ -36,7 +29,6 @@ void arp_parse(const uint8_t *buf, size_t len) { if (op == OpReq) { uint32_t daddr = nget32(buf + DstIP); - printf("IPv4 request for %08x\n", daddr); if (daddr == state.ip) { uint8_t *pkt = ether_start(30, (struct ethernet){ .dst = buf + SrcMAC, |