Grid Community Toolkit  6.2.1653033972 (tag: v6.2.20220524)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
gfs_i_gfork_plugin.h
1 #if !defined(GFS_GFORK_PLUGIN_H)
2 #define GFS_GFORK_PLUGIN_H 1
3 
4 /*
5  * Copyright 1999-2006 University of Chicago
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  */
19 
20 #include "globus_xio.h"
21 #include "globus_xio_tcp_driver.h"
22 #include "globus_xio_gsi.h"
23 #include "globus_gfork.h"
24 
25 #define GFSGforkError(error_msg, _type) \
26  globus_error_put( \
27  globus_error_construct_error( \
28  NULL, \
29  NULL, \
30  _type, \
31  __FILE__, \
32  _gfs_gfork_func_name, \
33  __LINE__, \
34  "%s", \
35  (error_msg)))
36 
37 #ifdef __GNUC__
38 #define GFSGForkFuncName(func) static const char * _gfs_gfork_func_name __attribute__((__unused__)) = #func
39 #else
40 #define GFSGForkFuncName(func) static const char * _gfs_gfork_func_name = #func
41 #endif
42 
43 
44 #define GF_VERSION 'a'
45 
46 /* use this to mark buffer in fifo as bad. we know it was not
47  sent over the wire because we would not have alloed it in the first
48  place */
49 #define GF_VERSION_TIMEOUT 'F'
50 #define GF_REGISTRATION_TIMEOUT 600
51 
52 /* header for all */
53 #define GF_VERSION_LEN 1
54 #define GF_HEADER_RESERVE_LEN 5
55 #define GF_MSG_TYPE_LEN 1
56 
57 #define GF_VERSION_NDX 0
58 #define GF_HEADER_RESERVE_NDX (GF_VERSION_NDX+GF_VERSION_LEN)
59 #define GF_MSG_TYPE_NDX (GF_HEADER_RESERVE_NDX+GF_HEADER_RESERVE_LEN)
60 
61 
62 /* dyn be messaging */
63 #define GF_DYN_AT_ONCE_LEN (sizeof(uint32_t))
64 #define GF_DYN_TOTAL_LEN (sizeof(uint32_t))
65 #define GF_DYN_ENTRY_COUNT_LEN (sizeof(uint32_t))
66 #define GF_DYN_COOKIE_LEN 32
67 #define GF_DYN_REPO_LEN 108
68 #define GF_DYN_CS_LEN 108
69 
70 
71 #define GF_DYN_AT_ONCE_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
72 #define GF_DYN_TOTAL_NDX (GF_DYN_AT_ONCE_NDX+GF_DYN_AT_ONCE_LEN)
73 #define GF_DYN_ENTRY_COUNT_NDX (GF_DYN_TOTAL_NDX+GF_DYN_TOTAL_LEN)
74 #define GF_DYN_COOKIE_NDX (GF_DYN_ENTRY_COUNT_NDX+GF_DYN_ENTRY_COUNT_LEN)
75 #define GF_DYN_REPO_NDX (GF_DYN_COOKIE_NDX+GF_DYN_COOKIE_NDX)
76 #define GF_DYN_CS_NDX (GF_DYN_REPO_NDX+GF_DYN_REPO_LEN)
77 
78 #define GF_DYN_PACKET_LEN (GF_DYN_CS_LEN+GF_DYN_CS_NDX)
79 
80 /* mem messaging */
81 #define GF_MEM_LIMIT_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
82 #define GF_MEM_LIMIT_LEN (sizeof(uint32_t))
83 
84 #define GF_MEM_MSG_LEN (GF_MEM_LIMIT_NDX+GF_MEM_LIMIT_LEN)
85 
86 /* kill msgin*/
87 #define GF_KILL_STRING_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
88 #define GF_KILL_STRING_LEN 128
89 
90 #define GF_KILL_MSG_LEN (GF_KILL_STRING_NDX+GF_KILL_STRING_LEN)
91 
92 /* ready message */
93 #define GF_READY_MSG_LEN (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
94 
95 /* release message */
96 #define GF_RELEASE_COUNT_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
97 #define GF_RELEASE_COUNT_LEN (sizeof(uint32_t))
98 
99 #define GF_RELEASE_MSG_LEN (GF_RELEASE_COUNT_NDX+GF_RELEASE_COUNT_LEN)
100 
101 typedef enum gfs_gfork_msg_type_e
102 {
103  GFS_GFORK_MSG_TYPE_DYNBE = 1,
104  GFS_GFORK_MSG_TYPE_KILL,
105  GFS_GFORK_MSG_TYPE_MEM,
106  GFS_GFORK_MSG_TYPE_READY,
107  GFS_GFORK_MSG_TYPE_ACK,
108  GFS_GFORK_MSG_TYPE_NACK,
109  GFS_GFORK_MSG_TYPE_CC,
110  GFS_GFORK_MSG_TYPE_RELEASE,
111  GFS_GFORK_MSG_TYPE_REMOVE_DYNBE
112 } gfs_gfork_msg_type_t;
113 
114 
115 typedef enum gfs_gfork_error_e
116 {
117  GFS_GFORK_ERROR_PARAMETER = 1
118 } gfs_gfork_error_t;
119 
120 #endif
XIO GSI Driver.
Header file for XIO TCP Driver.