1 kumpf 1.2 /*
|
2 martin 1.6 //%LICENSE////////////////////////////////////////////////////////////////
|
3 martin 1.7 //
|
4 martin 1.6 // Licensed to The Open Group (TOG) under one or more contributor license
5 // agreements. Refer to the OpenPegasusNOTICE.txt file distributed with
6 // this work for additional information regarding copyright ownership.
7 // Each contributor licenses this file to you under the OpenPegasus Open
8 // Source License; you may not use this file except in compliance with the
9 // License.
|
10 martin 1.7 //
|
11 martin 1.6 // Permission is hereby granted, free of charge, to any person obtaining a
12 // copy of this software and associated documentation files (the "Software"),
13 // to deal in the Software without restriction, including without limitation
14 // the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 // and/or sell copies of the Software, and to permit persons to whom the
16 // Software is furnished to do so, subject to the following conditions:
|
17 martin 1.7 //
|
18 martin 1.6 // The above copyright notice and this permission notice shall be included
19 // in all copies or substantial portions of the Software.
|
20 martin 1.7 //
|
21 martin 1.6 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
22 martin 1.7 // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
23 martin 1.6 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24 // IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25 // CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26 // TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27 // SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
28 martin 1.7 //
|
29 martin 1.6 //////////////////////////////////////////////////////////////////////////
|
30 kumpf 1.2 */
31
32 #ifndef _Executor_Messages_h
33 #define _Executor_Messages_h
34
35 /*
36 **==============================================================================
37 **
38 ** Messages.h
39 **
40 ** This file defines messages exchanges over the socket between the
41 ** server and executor process.
42 **
43 **==============================================================================
44 */
45
46 #include "Defines.h"
47
48 /*
49 **==============================================================================
50 **
51 kumpf 1.2 ** ExecutorMessageCode
52 **
53 **==============================================================================
54 */
55
56 enum ExecutorMessageCode
57 {
58 EXECUTOR_PING_MESSAGE = 1,
59 EXECUTOR_OPEN_FILE_MESSAGE,
60 EXECUTOR_START_PROVIDER_AGENT_MESSAGE,
61 EXECUTOR_DAEMONIZE_EXECUTOR_MESSAGE,
62 EXECUTOR_REMOVE_FILE_MESSAGE,
63 EXECUTOR_RENAME_FILE_MESSAGE,
64 EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE,
65 EXECUTOR_VALIDATE_USER_MESSAGE,
66 EXECUTOR_CHALLENGE_LOCAL_MESSAGE,
|
67 kumpf 1.4 EXECUTOR_AUTHENTICATE_LOCAL_MESSAGE,
68 EXECUTOR_UPDATE_LOG_LEVEL_MESSAGE
|
69 kumpf 1.2 };
70
71 /*
72 **==============================================================================
73 **
74 ** struct ExecutorRequestHeader
75 **
76 **==============================================================================
77 */
78
79 struct ExecutorRequestHeader
80 {
81 unsigned int code;
82 };
83
84 /*
85 **==============================================================================
86 **
87 ** EXECUTOR_PING_MESSAGE
88 **
89 **==============================================================================
90 kumpf 1.2 */
91
92 #define EXECUTOR_PING_MAGIC 0x9E5EACB6
93
94 struct ExecutorPingResponse
95 {
96 unsigned int magic;
97 };
98
99 /*
100 **==============================================================================
101 **
102 ** EXECUTOR_OPEN_FILE_MESSAGE
103 **
104 **==============================================================================
105 */
106
107 struct ExecutorOpenFileRequest
108 {
109 char path[EXECUTOR_BUFFER_SIZE];
110 /* ('r' = read, 'w' = write, 'a' = append) */
111 kumpf 1.2 int mode;
112 };
113
114 struct ExecutorOpenFileResponse
115 {
116 int status;
117 };
118
119 /*
120 **==============================================================================
121 **
122 ** EXECUTOR_REMOVE_FILE_MESSAGE
123 **
124 **==============================================================================
125 */
126
127 struct ExecutorRemoveFileRequest
128 {
129 char path[EXECUTOR_BUFFER_SIZE];
130 };
131
132 kumpf 1.2 struct ExecutorRemoveFileResponse
133 {
134 int status;
135 };
136
137 /*
138 **==============================================================================
139 **
140 ** EXECUTOR_RENAME_FILE_MESSAGE
141 **
142 **==============================================================================
143 */
144
145 struct ExecutorRenameFileRequest
146 {
147 char oldPath[EXECUTOR_BUFFER_SIZE];
148 char newPath[EXECUTOR_BUFFER_SIZE];
149 };
150
151 struct ExecutorRenameFileResponse
152 {
153 kumpf 1.2 int status;
154 };
155
156 /*
157 **==============================================================================
158 **
159 ** EXECUTOR_START_PROVIDER_AGENT_MESSAGE
160 **
161 **==============================================================================
162 */
163
164 struct ExecutorStartProviderAgentRequest
165 {
166 char module[EXECUTOR_BUFFER_SIZE];
|
167 kumpf 1.3 char userName[EXECUTOR_BUFFER_SIZE];
|
168 kumpf 1.2 };
169
170 struct ExecutorStartProviderAgentResponse
171 {
172 int status;
173 int pid;
174 };
175
176 /*
177 **==============================================================================
178 **
179 ** EXECUTOR_DAEMONIZE_EXECUTOR_MESSAGE
180 **
181 **==============================================================================
182 */
183
184 struct ExecutorDaemonizeExecutorResponse
185 {
186 int status;
187 };
188
189 kumpf 1.2 /*
190 **==============================================================================
191 **
192 ** EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE
193 **
194 **==============================================================================
195 */
196
197 struct ExecutorAuthenticatePasswordRequest
198 {
199 char username[EXECUTOR_BUFFER_SIZE];
200 char password[EXECUTOR_BUFFER_SIZE];
201 };
202
203 struct ExecutorAuthenticatePasswordResponse
204 {
205 int status;
206 };
207
208 /*
209 **==============================================================================
210 kumpf 1.2 **
211 ** EXECUTOR_VALIDATE_USER_MESSAGE
212 **
213 **==============================================================================
214 */
215
216 struct ExecutorValidateUserRequest
217 {
218 char username[EXECUTOR_BUFFER_SIZE];
219 };
220
221 struct ExecutorValidateUserResponse
222 {
223 int status;
224 };
225
226 /*
227 **==============================================================================
228 **
229 ** EXECUTOR_CHALLENGE_LOCAL_MESSAGE
230 **
231 kumpf 1.2 **==============================================================================
232 */
233
234 struct ExecutorChallengeLocalRequest
235 {
236 char user[EXECUTOR_BUFFER_SIZE];
237 };
238
239 struct ExecutorChallengeLocalResponse
240 {
241 int status;
242 char challenge[EXECUTOR_BUFFER_SIZE];
243 };
244
245 /*
246 **==============================================================================
247 **
248 ** EXECUTOR_AUTHENTICATE_LOCAL_MESSAGE
249 **
250 **==============================================================================
251 */
252 kumpf 1.2
253 struct ExecutorAuthenticateLocalRequest
254 {
255 char challenge[EXECUTOR_BUFFER_SIZE];
256 char response[EXECUTOR_BUFFER_SIZE];
257 };
258
259 struct ExecutorAuthenticateLocalResponse
260 {
261 int status;
262 };
263
264 /*
265 **==============================================================================
266 **
|
267 kumpf 1.4 ** EXECUTOR_UPDATE_LOG_LEVEL_MESSAGE
268 **
269 **==============================================================================
270 */
271
272 struct ExecutorUpdateLogLevelRequest
273 {
274 char logLevel[EXECUTOR_BUFFER_SIZE];
275 };
276
277 struct ExecutorUpdateLogLevelResponse
278 {
279 int status;
280 };
281
282 /*
283 **==============================================================================
284 **
|
285 kumpf 1.2 ** MessageCodeToString()
286 **
287 **==============================================================================
288 */
289
290 EXECUTOR_LINKAGE
291 const char* MessageCodeToString(enum ExecutorMessageCode code);
292
293 #endif /* _Executor_Messages_h */
|