2020-03-24 16:34:45 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2020-03-24 12:24:56 +01:00
|
|
|
#ifndef PARSER_H
|
|
|
|
#define PARSER_H
|
|
|
|
|
2020-03-24 16:34:45 +01:00
|
|
|
typedef enum cmd_type {
|
|
|
|
NEIGHBOUR_REQ, NETWORK_STATE_REQ, NODE_STATE_REQ, POST, ERROR
|
|
|
|
} cmd_type;
|
|
|
|
|
|
|
|
typedef struct cmd_token {
|
|
|
|
cmd_type type;
|
|
|
|
char arg[193];
|
|
|
|
} cmd_token;
|
|
|
|
|
|
|
|
// retourne le type de commande à exécuter
|
|
|
|
cmd_token parse_cmd();
|
2020-03-24 12:24:56 +01:00
|
|
|
|
2020-04-14 19:32:15 +02:00
|
|
|
#endif
|