From 656a3092a1deac6a36dd752eb282fe4cb247044c Mon Sep 17 00:00:00 2001 From: gonzalef Date: Fri, 13 Mar 2020 13:36:51 +0100 Subject: [PATCH] tailles --- tlv.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tlv.h b/tlv.h index 75c9703..9c90bca 100644 --- a/tlv.h +++ b/tlv.h @@ -14,21 +14,26 @@ typedef union tlv { warning *warning; } tlv; + +// 1 octet typedef struct pad1 { unsigned unsigned char type; } pad1; +// 2 octets min, 257 octets max (unsigned char 0 -> 255) typedef struct padn { unsigned char type; unsigned char length; char *mbz; } padn; +// 2 octets typedef struct neighbour_req { unsigned char type; unsigned char length; } neighbour_req; +// 132 octets typedef struct neighbour { unsigned char type; unsigned char length; @@ -36,17 +41,20 @@ typedef struct neighbour { short port; } neighbour; +// 18 octets typedef struct network_hash { unsigned char type; unsigned char length; char *network_hash; } network_hash; +// 2 octets typedef struct network_state_req { unsigned char type; unsigned char length; } network_state_req; +// 28 octets typedef struct node_hash { unsigned char type; unsigned char length; @@ -55,12 +63,14 @@ typedef struct node_hash { char *node_hash; } node_hash; +// 10 octets typedef struct node_state_req { unsigned char type; unsigned char length; long node_id; } node_state_req; +// 28 octets min, 220 octets max (data 0 -> 192) typedef struct node_state { unsigned char type; unsigned char length; @@ -70,9 +80,9 @@ typedef struct node_state { char *data; } node_state; +// 2 octets min, 257 ocets max (unsigned char 0 -> 255) typedef struct warning { unsigned char type; unsigned char length; char *message; -} warning; - +} warning; \ No newline at end of file