2020-03-19 19:39:37 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2020-03-20 17:39:17 +01:00
|
|
|
typedef enum cmd_type {
|
2020-03-19 19:39:37 +01:00
|
|
|
NEIGHBOUR_REQ, NETWORK_STATE_REQ, NODE_STATE_REQ, SEND, ERROR
|
2020-03-20 17:39:17 +01:00
|
|
|
} cmd_type;
|
2020-03-19 19:39:37 +01:00
|
|
|
|
2020-03-20 17:39:17 +01:00
|
|
|
typedef struct cmd_token {
|
|
|
|
cmd_type type;
|
2020-03-19 19:39:37 +01:00
|
|
|
char arg[193];
|
2020-03-20 17:39:17 +01:00
|
|
|
} cmd_token;
|
2020-03-19 19:39:37 +01:00
|
|
|
|
|
|
|
// retourne le type de commande à exécuter
|
2020-03-20 17:39:17 +01:00
|
|
|
cmd_token parse_cmd();
|