packet
This commit is contained in:
parent
656a3092a1
commit
b6b87e575e
8
tlv.h
8
tlv.h
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user