tailles
This commit is contained in:
parent
bbd4412cf3
commit
656a3092a1
14
tlv.h
14
tlv.h
@ -14,21 +14,26 @@ typedef union tlv {
|
|||||||
warning *warning;
|
warning *warning;
|
||||||
} tlv;
|
} tlv;
|
||||||
|
|
||||||
|
|
||||||
|
// 1 octet
|
||||||
typedef struct pad1 {
|
typedef struct pad1 {
|
||||||
unsigned unsigned char type;
|
unsigned unsigned char type;
|
||||||
} pad1;
|
} pad1;
|
||||||
|
|
||||||
|
// 2 octets min, 257 octets max (unsigned char 0 -> 255)
|
||||||
typedef struct padn {
|
typedef struct padn {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
char *mbz;
|
char *mbz;
|
||||||
} padn;
|
} padn;
|
||||||
|
|
||||||
|
// 2 octets
|
||||||
typedef struct neighbour_req {
|
typedef struct neighbour_req {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
} neighbour_req;
|
} neighbour_req;
|
||||||
|
|
||||||
|
// 132 octets
|
||||||
typedef struct neighbour {
|
typedef struct neighbour {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
@ -36,17 +41,20 @@ typedef struct neighbour {
|
|||||||
short port;
|
short port;
|
||||||
} neighbour;
|
} neighbour;
|
||||||
|
|
||||||
|
// 18 octets
|
||||||
typedef struct network_hash {
|
typedef struct network_hash {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
char *network_hash;
|
char *network_hash;
|
||||||
} network_hash;
|
} network_hash;
|
||||||
|
|
||||||
|
// 2 octets
|
||||||
typedef struct network_state_req {
|
typedef struct network_state_req {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
} network_state_req;
|
} network_state_req;
|
||||||
|
|
||||||
|
// 28 octets
|
||||||
typedef struct node_hash {
|
typedef struct node_hash {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
@ -55,12 +63,14 @@ typedef struct node_hash {
|
|||||||
char *node_hash;
|
char *node_hash;
|
||||||
} node_hash;
|
} node_hash;
|
||||||
|
|
||||||
|
// 10 octets
|
||||||
typedef struct node_state_req {
|
typedef struct node_state_req {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
long node_id;
|
long node_id;
|
||||||
} node_state_req;
|
} node_state_req;
|
||||||
|
|
||||||
|
// 28 octets min, 220 octets max (data 0 -> 192)
|
||||||
typedef struct node_state {
|
typedef struct node_state {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
@ -70,9 +80,9 @@ typedef struct node_state {
|
|||||||
char *data;
|
char *data;
|
||||||
} node_state;
|
} node_state;
|
||||||
|
|
||||||
|
// 2 octets min, 257 ocets max (unsigned char 0 -> 255)
|
||||||
typedef struct warning {
|
typedef struct warning {
|
||||||
unsigned char type;
|
unsigned char type;
|
||||||
unsigned char length;
|
unsigned char length;
|
||||||
char *message;
|
char *message;
|
||||||
} warning;
|
} warning;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user