This commit is contained in:
gonzalef 2020-03-13 14:27:44 +01:00
parent 656a3092a1
commit b6b87e575e

8
tlv.h
View File

@ -1,6 +1,14 @@
#include <sys/socket.h>
#include <netinet/in.h>
// 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;