summaryrefslogtreecommitdiff
path: root/src/user/app/ethdump/icmp.c
diff options
context:
space:
mode:
authordzwdz2022-08-17 21:26:29 +0200
committerdzwdz2022-08-17 21:26:29 +0200
commit6ffb06af70faa5657f2c6091fe23500007e2bd44 (patch)
tree8228cdda29cda0c44ff6a09d5a76314fa9760ce9 /src/user/app/ethdump/icmp.c
parent5abcc66cb6e83f02b5218802d3eca74c0d29bebf (diff)
user/ethdump: file per protocol, ethernet frame functions
Diffstat (limited to 'src/user/app/ethdump/icmp.c')
-rw-r--r--src/user/app/ethdump/icmp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/user/app/ethdump/icmp.c b/src/user/app/ethdump/icmp.c
new file mode 100644
index 0000000..9c80a2d
--- /dev/null
+++ b/src/user/app/ethdump/icmp.c
@@ -0,0 +1,8 @@
+#include "proto.h"
+#include "util.h"
+
+void icmp_parse(const uint8_t *buf, size_t len) {
+ if (len < 4) return;
+ uint8_t type = buf[0];
+ printf("ICMP type %u\n", type);
+}