1 #if !defined(GFS_GFORK_PLUGIN_H)
2 #define GFS_GFORK_PLUGIN_H 1
10 #include "globus_xio.h"
11 #include "globus_xio_tcp_driver.h"
12 #include "globus_xio_gsi.h"
13 #include "globus_gfork.h"
15 #define GFSGforkError(error_msg, _type) \
17 globus_error_construct_error( \
22 _gfs_gfork_func_name, \
28 #define GFSGForkFuncName(func) static const char * _gfs_gfork_func_name __attribute__((__unused__)) = #func
30 #define GFSGForkFuncName(func) static const char * _gfs_gfork_func_name = #func
34 #define GF_VERSION 'a'
39 #define GF_VERSION_TIMEOUT 'F'
40 #define GF_REGISTRATION_TIMEOUT 600
43 #define GF_VERSION_LEN 1
44 #define GF_HEADER_RESERVE_LEN 5
45 #define GF_MSG_TYPE_LEN 1
47 #define GF_VERSION_NDX 0
48 #define GF_HEADER_RESERVE_NDX (GF_VERSION_NDX+GF_VERSION_LEN)
49 #define GF_MSG_TYPE_NDX (GF_HEADER_RESERVE_NDX+GF_HEADER_RESERVE_LEN)
53 #define GF_DYN_AT_ONCE_LEN (sizeof(uint32_t))
54 #define GF_DYN_TOTAL_LEN (sizeof(uint32_t))
55 #define GF_DYN_ENTRY_COUNT_LEN (sizeof(uint32_t))
56 #define GF_DYN_COOKIE_LEN 32
57 #define GF_DYN_REPO_LEN 108
58 #define GF_DYN_CS_LEN 108
61 #define GF_DYN_AT_ONCE_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
62 #define GF_DYN_TOTAL_NDX (GF_DYN_AT_ONCE_NDX+GF_DYN_AT_ONCE_LEN)
63 #define GF_DYN_ENTRY_COUNT_NDX (GF_DYN_TOTAL_NDX+GF_DYN_TOTAL_LEN)
64 #define GF_DYN_COOKIE_NDX (GF_DYN_ENTRY_COUNT_NDX+GF_DYN_ENTRY_COUNT_LEN)
65 #define GF_DYN_REPO_NDX (GF_DYN_COOKIE_NDX+GF_DYN_COOKIE_NDX)
66 #define GF_DYN_CS_NDX (GF_DYN_REPO_NDX+GF_DYN_REPO_LEN)
68 #define GF_DYN_PACKET_LEN (GF_DYN_CS_LEN+GF_DYN_CS_NDX)
71 #define GF_MEM_LIMIT_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
72 #define GF_MEM_LIMIT_LEN (sizeof(uint32_t))
74 #define GF_MEM_MSG_LEN (GF_MEM_LIMIT_NDX+GF_MEM_LIMIT_LEN)
77 #define GF_KILL_STRING_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
78 #define GF_KILL_STRING_LEN 128
80 #define GF_KILL_MSG_LEN (GF_KILL_STRING_NDX+GF_KILL_STRING_LEN)
83 #define GF_READY_MSG_LEN (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
86 #define GF_RELEASE_COUNT_NDX (GF_MSG_TYPE_NDX+GF_MSG_TYPE_LEN)
87 #define GF_RELEASE_COUNT_LEN (sizeof(uint32_t))
89 #define GF_RELEASE_MSG_LEN (GF_RELEASE_COUNT_NDX+GF_RELEASE_COUNT_LEN)
91 typedef enum gfs_gfork_msg_type_e
93 GFS_GFORK_MSG_TYPE_DYNBE = 1,
94 GFS_GFORK_MSG_TYPE_KILL,
95 GFS_GFORK_MSG_TYPE_MEM,
96 GFS_GFORK_MSG_TYPE_READY,
97 GFS_GFORK_MSG_TYPE_ACK,
98 GFS_GFORK_MSG_TYPE_NACK,
99 GFS_GFORK_MSG_TYPE_CC,
100 GFS_GFORK_MSG_TYPE_RELEASE,
101 GFS_GFORK_MSG_TYPE_REMOVE_DYNBE
102 } gfs_gfork_msg_type_t;
105 typedef enum gfs_gfork_error_e
107 GFS_GFORK_ERROR_PARAMETER = 1