summaryrefslogtreecommitdiffstats
path: root/nserver/src/ncmd.h
blob: 80ca45a16a46be76e9ca39d5edf515fbf961fe84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef _ncmd_h
#define _ncmd_h

#include <string.h>

#include <bstrlib.h>
#include <dbg.h>

#define CMD_MIN_SIZE 5
#define CMD_MAX_SIZE 120

enum FUNCTIONS {
                NS_CREATE,
                NS_SAMPLE,
                NS_MEAN,
                NS_DUMP,
                NS_DELETE,
                NS_LIST,
                NS_NOP = -1
};

int sanitize(char *cmd);
char *check_cmd(char *cmd);

struct bstrList *cmd_parts(char *cmd);
int find_function(struct bstrList *cmd_parts);


#endif