diff options
author | rsiddharth <s@ricketyspace.net> | 2019-11-28 01:01:35 -0500 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2020-04-17 20:56:35 -0400 |
commit | a9e2410d469049f35715a4732e1cb6ccfc4bf507 (patch) | |
tree | 96a9e54a46e8d57f705ca218dd2256e26335c865 /nserver/src/ncmd.h | |
parent | 320172385ef318cfe04f7c5f3af3dda40a429a36 (diff) |
nserve: Add ncmd.h
* nserver/src/nserve.c (sanitize, check_cmd): Move functions ...
* nserver/src/ncmd.c (sanitize, check_cmd): ... here.
* nserver/src/nserve.h (CMD_MIN_SIZE, CMD_MAX_SIZE): Move constants...
* nserver/src/ncmd.h (CMD_MIN_SIZE, CMD_MAX_SIZE): ... here.
(sanitize, check_cmd): New function declarations.
Diffstat (limited to 'nserver/src/ncmd.h')
-rw-r--r-- | nserver/src/ncmd.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nserver/src/ncmd.h b/nserver/src/ncmd.h new file mode 100644 index 0000000..75ac357 --- /dev/null +++ b/nserver/src/ncmd.h @@ -0,0 +1,14 @@ +#ifndef _ncmd_h +#define _ncmd_h + +#include <string.h> + +#include <dbg.h> + +#define CMD_MIN_SIZE 5 +#define CMD_MAX_SIZE 120 + +int sanitize(char *cmd); +char *check_cmd(char *cmd); + +#endif |