From b6b87e575e9cebf1c40317bba10b2bc2f781f19b Mon Sep 17 00:00:00 2001 From: gonzalef Date: Fri, 13 Mar 2020 14:27:44 +0100 Subject: [PATCH] packet --- tlv.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tlv.h b/tlv.h index 9c90bca..105b198 100644 --- a/tlv.h +++ b/tlv.h @@ -1,6 +1,14 @@ #include #include +// 8 octets min (struct pointer 4 octets), 1024 octets max +typedef struct packet { + unsigned char magic; // 95 (si autre, ignorer) + unsigned char version; // 1 (si autre, ignorer) + short length; // 1020 max + char *body; +} packet; + typedef union tlv { pad1 *pad1; padn *padn;