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;