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 s.kodali 1.8 unsigned short moduleBitness;
|
167 kumpf 1.2 char module[EXECUTOR_BUFFER_SIZE];
|
168 kumpf 1.3 char userName[EXECUTOR_BUFFER_SIZE];
|
169 kumpf 1.2 };
170
171 struct ExecutorStartProviderAgentResponse
172 {
173 int status;
174 int pid;
175 };
176
177 /*
178 **==============================================================================
179 **
180 ** EXECUTOR_DAEMONIZE_EXECUTOR_MESSAGE
181 **
182 **==============================================================================
183 */
184
185 struct ExecutorDaemonizeExecutorResponse
186 {
187 int status;
188 };
189
190 kumpf 1.2 /*
191 **==============================================================================
192 **
193 ** EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE
194 **
195 **==============================================================================
196 */
197
198 struct ExecutorAuthenticatePasswordRequest
199 {
200 char username[EXECUTOR_BUFFER_SIZE];
201 char password[EXECUTOR_BUFFER_SIZE];
202 };
203
204 struct ExecutorAuthenticatePasswordResponse
205 {
206 int status;
207 };
208
209 /*
210 **==============================================================================
211 kumpf 1.2 **
212 ** EXECUTOR_VALIDATE_USER_MESSAGE
213 **
214 **==============================================================================
215 */
216
217 struct ExecutorValidateUserRequest
218 {
219 char username[EXECUTOR_BUFFER_SIZE];
220 };
221
222 struct ExecutorValidateUserResponse
223 {
224 int status;
225 };
226
227 /*
228 **==============================================================================
229 **
230 ** EXECUTOR_CHALLENGE_LOCAL_MESSAGE
231 **
232 kumpf 1.2 **==============================================================================
233 */
234
235 struct ExecutorChallengeLocalRequest
236 {
237 char user[EXECUTOR_BUFFER_SIZE];
238 };
239
240 struct ExecutorChallengeLocalResponse
241 {
242 int status;
243 char challenge[EXECUTOR_BUFFER_SIZE];
244 };
245
246 /*
247 **==============================================================================
248 **
249 ** EXECUTOR_AUTHENTICATE_LOCAL_MESSAGE
250 **
251 **==============================================================================
252 */
253 kumpf 1.2
254 struct ExecutorAuthenticateLocalRequest
255 {
256 char challenge[EXECUTOR_BUFFER_SIZE];
257 char response[EXECUTOR_BUFFER_SIZE];
258 };
259
260 struct ExecutorAuthenticateLocalResponse
261 {
262 int status;
263 };
264
265 /*
266 **==============================================================================
267 **
|
268 kumpf 1.4 ** EXECUTOR_UPDATE_LOG_LEVEL_MESSAGE
269 **
270 **==============================================================================
271 */
272
273 struct ExecutorUpdateLogLevelRequest
274 {
275 char logLevel[EXECUTOR_BUFFER_SIZE];
276 };
277
278 struct ExecutorUpdateLogLevelResponse
279 {
280 int status;
281 };
282
283 /*
284 **==============================================================================
285 **
|
286 kumpf 1.2 ** MessageCodeToString()
287 **
288 **==============================================================================
289 */
290
291 EXECUTOR_LINKAGE
292 const char* MessageCodeToString(enum ExecutorMessageCode code);
293
294 #endif /* _Executor_Messages_h */
|