blob: 7309e8bac94a45ce71a33a6d9a4f0a5cea0cee48 (
plain)
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
/* $Id: nastipc.h,v 1.3 2001/01/19 00:29:26 shmit Exp $ */
#ifndef NASTIPC_H
#define NASTIPC_H
#define NASTHOLE "/tmp/nastd.sock"
/* Protocol section */
/*
* Send NASTESC to start a new command. The next byte specifies the
* type of command.
*/
#define NASTCMD '\xff'
/*
* Commands, prefixed by NASTCMD.
*/
#define NASTADD '\x01'
#define NASTDEL '\x02'
#define NASTUPD '\x03'
#define NASTGET '\x04'
#define NASTDIE '\x0f'
/* Commands for server options. */
#define NASTOPTGET '\x10'
#define NASTOPTSET '\x11'
/* Command to get stats. */
#define NASTSTATS '\x20'
/* Server -> client responses. These can be postfixed with a string. */
#define NASTOK '\xf1'
#define NASTERR '\xf2'
#define NASTARG '\xe0'
/* The quote character, for globbing multiple strings together. */
#define NASTQUOTE '\xfe'
/*
* The escape character, to send binary that may be interpereted
* incorrectly.
*/
#define NASTESC '\xfd'
/* Item seperator, for returning multiple items in one response. */
#define NASTSEP '\xfc'
/*
* The options. Ass more get added to the protocol, just add them here.
* Do not dupe option numbers. That'd be bad.
* Use these after the NASTCMD NASTOPTGET sequence. All options require
* an argument. Most are true/false, but some will require other types.
* Check nastd.h for option types.
* (e.g.: NASTCMD NASTOPTGET OPTQCACHE OPTFALSE - don't use the query cache)
* (e.g.: NASTCMD NASTOPTGET OPTNTHREADS 0x10 - allocate 16 threads)
*/
#define OPTFALSE '\x00'
#define OPTTRUE '\x01'
#define OPTQCACHE '\x01'
#define OPTLOCALDB '\x02'
#define OPTFALLASYNC '\x03'
#define OPTALWAYSFALL '\x04'
#define OPTFAILONCE '\x05'
#define OPTNTHREADS '\x06'
#define OPTNOFALLTHROUGH '\x07'
#endif
|