(file) Return to Messages.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Executor

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

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2