Put the objects before the libraries when building
[nmdb.git] / nmdb / net-const.h
blob3fb80bc5824d9da77346f7c6bc0b2892344a71f9
2 #ifndef _NET_CONST_H
3 #define _NET_CONST_H
5 /*
6 * Local network constants.
7 * Isolated so it's shared between the server and the library code.
8 */
10 /* TIPC server type (hardcoded) and default instance. */
11 #define TIPC_SERVER_TYPE 26001
12 #define TIPC_SERVER_INST 10
14 /* TCP default listen address and port. */
15 #define TCP_SERVER_ADDR "0.0.0.0"
16 #define TCP_SERVER_PORT 26010
18 /* UDP default listen address and port. */
19 #define UDP_SERVER_ADDR "0.0.0.0"
20 #define UDP_SERVER_PORT 26010
22 /* SCTP default listen address and port. */
23 #define SCTP_SERVER_ADDR "0.0.0.0"
24 #define SCTP_SERVER_PORT 26010
26 /* Protocol version, for checking in the network header. */
27 #define PROTO_VER 1
29 /* Network requests */
30 #define REQ_GET 0x101
31 #define REQ_SET 0x102
32 #define REQ_DEL 0x103
33 #define REQ_CAS 0x104
34 #define REQ_INCR 0x105
35 #define REQ_STATS 0x106
36 #define REQ_FIRSTKEY 0x107
37 #define REQ_NEXTKEY 0x108
39 /* Possible request flags (which can be applied to the documented requests) */
40 #define FLAGS_CACHE_ONLY 1 /* get, set, del, cas, incr */
41 #define FLAGS_SYNC 2 /* set, del */
43 /* Network replies (different namespace from requests) */
44 #define REP_ERR 0x800
45 #define REP_CACHE_HIT 0x801
46 #define REP_CACHE_MISS 0x802
47 #define REP_OK 0x803
48 #define REP_NOTIN 0x804
49 #define REP_NOMATCH 0x805
51 /* Network error replies */
52 #define ERR_VER 0x101 /* Version mismatch */
53 #define ERR_SEND 0x102 /* Error sending data */
54 #define ERR_BROKEN 0x103 /* Broken request */
55 #define ERR_UNKREQ 0x104 /* Unknown request */
56 #define ERR_MEM 0x105 /* Memory allocation error */
57 #define ERR_DB 0x106 /* Database error */
58 #define ERR_RO 0x107 /* Server in read-only mode */
61 #endif