ref: 3ae7a83327799e2ba7f3358dde826749c5b728a2
parent: 468c25eef8cfd6d979d050a742e680216a83220a
author: mkf <mkf@cloud9p.org>
date: Sat Aug 3 05:10:09 EDT 2024
common: fix info regarding PKT_FLAGS
--- a/common.h
+++ b/common.h
@@ -13,9 +13,12 @@
ETHER_SRC = ETHER_ADDR_LEN,
ETHER_TYPE = 2,
- PKT_VHL = 2,
+ PKT_VHL = 1,
+ PKT_DSFIELD = 1,
PKT_LEN = 2,
- PKT_ID = 4,
+ PKT_ID = 2,
+ // PKT_FLAGS = 1, /* 3 bits */
+ PKT_FRAGOFFSET = 2, /* 12 bits */
PKT_TTL = 1,
PKT_PROTO = 1,
PKT_SUM = 2,
@@ -171,10 +174,12 @@
typedef struct
{
uint8_t version;
-
uint8_t headerlen;
+ uint8_t dsfield;
uint8_t len;
-
+ uint16_t id;
+ uint8_t flags;
+ uint16_t fragoffset;
uint8_t ttl;
uint8_t proto; /* UDP, TCP */
uint16_t sum; /* checksum of packet */