CUBRID Engine  latest
network.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  * network.h -Definitions for client/server network support.
22  */
23 
24 #ifndef _NETWORK_H_
25 #define _NETWORK_H_
26 
27 #ident "$Id$"
28 
29 #include "perf_monitor.h"
30 #include "locator.h"
31 #include "log_comm.h"
32 
33 
34 /* Server statistics structure size, used to make sure the pack/unpack
35  routines follow the current structure definition.
36  This must be the byte size of the structure
37  as returned by sizeof(). Note that MEMORY_STAT_SIZE and PACKED_STAT_SIZE
38  are not necessarily the same although they will be in most cases.
39 */
40 
41 #define EXECUTE_QUERY_MAX_ARGUMENT_DATA_SIZE 512
42 
43 /* These define the requests that the server will respond to */
45 {
47 
49 
67 
86 
109 
116 
118 
123 
135 
137 
146 
151 
155 
163 
165 
170 
172 
176 
182 
184 
189 
194 
196 
198 
199  /* External storage supports */
207 
208  /* Session state requests */
221 
224 
227 
231 
233 
235 
236  /* Followings are not grouped because they are appended after the above. It is necessary to rearrange with changing
237  * network compatibility. */
238 
240 
241  /* loaddb server requests */
249 
251  /*
252  * This is the last entry. It is also used for the end of an
253  * array of statistics information on client/server communication.
254  */
256  /*
257  * This request number must be preserved.
258  */
260 };
261 
262 /* Server/client capabilities */
263 #define NET_CAP_BACKWARD_COMPATIBLE 0x80000000
264 #define NET_CAP_FORWARD_COMPATIBLE 0x40000000
265 #define NET_CAP_INTERRUPT_ENABLED 0x00800000
266 #define NET_CAP_UPDATE_DISABLED 0x00008000
267 #define NET_CAP_REMOTE_DISABLED 0x00000080
268 #define NET_CAP_HA_REPL_DELAY 0x00000008
269 #define NET_CAP_HA_REPLICA 0x00000004
270 #define NET_CAP_HA_IGNORE_REPL_DELAY 0x00000002
271 
272 typedef enum
273 { /* Responses to a query */
274  QUERY_END = 1, /* Normal end of query */
275  METHOD_CALL, /* Invoke methods */
276  ASYNC_OBTAIN_USER_INPUT, /* server needs info from operator */
277  GET_NEXT_LOG_PAGES, /* log writer uses this type of request */
278  END_CALLBACK, /* normal end of non-query callback */
281 
282 /* Server startup */
283 extern int net_server_start (const char *name);
284 extern const char *net_server_request_name (int request);
285 
286 #endif /* _NETWORK_H_ */
int net_server_start(const char *name)
Definition: network_sr.c:1292
const char * net_server_request_name(int request)
Definition: network_sr.c:1441
QUERY_SERVER_REQUEST
Definition: network.h:272
net_server_request
Definition: network.h:44