CUBRID Engine  latest
broker_msg.h
Go to the documentation of this file.
1 /*
2  * Copyright 2008 Search Solution Corporation
3  * Copyright 2016 CUBRID Corporation
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 
20 /*
21  * broker_msg.h - Dispatcher Interface Header File
22  * This file contains exported stuffs from Dispatcher
23  */
24 
25 #ifndef _BROKER_MSG_H_
26 #define _BROKER_MSG_H_
27 
28 #ident "$Id$"
29 
30 /* We use the following length to store any identifiers in the
31  * implementation. The identifiers include application_name, path_name,
32  * a line in the UniWeb application registry and so forth.
33  * Note that, however, we DO NOT ensure that the length is enough for each
34  * given identifier in the implementation. If too long identifier is given,
35  * the behavior is undefined. We just recommend to increase the following
36  * value in that case.
37  */
38 #define UW_MAX_LENGTH 1024
39 
40 /* the magic string for UniWeb socket */
41 #ifdef _EDU_
42 #define UW_SOCKET_MAGIC "UW4.0EDU"
43 #else
44 #define UW_SOCKET_MAGIC "V3RQ4.0"
45 #endif
46 
47 #define V3_HEADER_OK_COMPRESS "V3_OK_COMP"
48 #define V3_HEADER_OK "V3_OK"
49 #define V3_HEADER_ERR "V3_ERR"
50 #define V3_RESPONSE_HEADER_SIZE 16
51 
52 /* PRE_SEND_DATA_SIZE = PRE_SEND_SCRIPT_SIZE + PRE_SEND_PRG_NAME_SIZE */
53 #ifdef _EDU_
54 #define PRE_SEND_DATA_SIZE 114
55 #else
56 #define PRE_SEND_DATA_SIZE 66
57 #endif
58 #define PRE_SEND_SCRIPT_SIZE 30
59 #define PRE_SEND_PRG_NAME_SIZE 20
60 #define PRE_SEND_SESSION_ID_SIZE 16
61 
62 #ifdef _EDU_
63 #define PRE_SEND_KEY_SIZE 48
64 #define PRE_SEND_KEY_OFFSET \
65  (PRE_SEND_SCRIPT_SIZE + PRE_SEND_PRG_NAME_SIZE + PRE_SEND_SESSION_ID_SIZE)
66 #endif
67 
68 #endif /* _BROKER_MSG_H_ */