(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               EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE,
 67               EXECUTOR_VALIDATE_USER_MESSAGE,
 68               EXECUTOR_CHALLENGE_LOCAL_MESSAGE,
 69 kumpf 1.4     EXECUTOR_AUTHENTICATE_LOCAL_MESSAGE,
 70               EXECUTOR_UPDATE_LOG_LEVEL_MESSAGE
 71 kumpf 1.2 };
 72           
 73           /*
 74           **==============================================================================
 75           **
 76           ** struct ExecutorRequestHeader
 77           **
 78           **==============================================================================
 79           */
 80           
 81           struct ExecutorRequestHeader
 82           {
 83               unsigned int code;
 84           };
 85           
 86           /*
 87           **==============================================================================
 88           **
 89           ** EXECUTOR_PING_MESSAGE
 90           **
 91           **==============================================================================
 92 kumpf 1.2 */
 93           
 94           #define EXECUTOR_PING_MAGIC 0x9E5EACB6
 95           
 96           struct ExecutorPingResponse
 97           {
 98               unsigned int magic;
 99           };
100           
101           /*
102           **==============================================================================
103           **
104           ** EXECUTOR_OPEN_FILE_MESSAGE
105           **
106           **==============================================================================
107           */
108           
109           struct ExecutorOpenFileRequest
110           {
111               char path[EXECUTOR_BUFFER_SIZE];
112               /* ('r' = read, 'w' = write, 'a' = append) */
113 kumpf 1.2     int mode;
114           };
115           
116           struct ExecutorOpenFileResponse
117           {
118               int status;
119           };
120           
121           /*
122           **==============================================================================
123           **
124           ** EXECUTOR_REMOVE_FILE_MESSAGE
125           **
126           **==============================================================================
127           */
128           
129           struct ExecutorRemoveFileRequest
130           {
131               char path[EXECUTOR_BUFFER_SIZE];
132           };
133           
134 kumpf 1.2 struct ExecutorRemoveFileResponse
135           {
136               int status;
137           };
138           
139           /*
140           **==============================================================================
141           **
142           ** EXECUTOR_RENAME_FILE_MESSAGE
143           **
144           **==============================================================================
145           */
146           
147           struct ExecutorRenameFileRequest
148           {
149               char oldPath[EXECUTOR_BUFFER_SIZE];
150               char newPath[EXECUTOR_BUFFER_SIZE];
151           };
152           
153           struct ExecutorRenameFileResponse
154           {
155 kumpf 1.2     int status;
156           };
157           
158           /*
159           **==============================================================================
160           **
161           ** EXECUTOR_START_PROVIDER_AGENT_MESSAGE
162           **
163           **==============================================================================
164           */
165           
166           struct ExecutorStartProviderAgentRequest
167           {
168               char module[EXECUTOR_BUFFER_SIZE];
169 kumpf 1.3     char userName[EXECUTOR_BUFFER_SIZE];
170 kumpf 1.2 };
171           
172           struct ExecutorStartProviderAgentResponse
173           {
174               int status;
175               int pid;
176           };
177           
178           /*
179           **==============================================================================
180           **
181           ** EXECUTOR_DAEMONIZE_EXECUTOR_MESSAGE
182           **
183           **==============================================================================
184           */
185           
186           struct ExecutorDaemonizeExecutorResponse
187           {
188               int status;
189           };
190           
191 kumpf 1.2 /*
192           **==============================================================================
193           **
194           ** EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE
195           **
196           **==============================================================================
197           */
198           
199           struct ExecutorAuthenticatePasswordRequest
200           {
201               char username[EXECUTOR_BUFFER_SIZE];
202               char password[EXECUTOR_BUFFER_SIZE];
203           };
204           
205           struct ExecutorAuthenticatePasswordResponse
206           {
207               int status;
208           };
209           
210           /*
211           **==============================================================================
212 kumpf 1.2 **
213           ** EXECUTOR_VALIDATE_USER_MESSAGE
214           **
215           **==============================================================================
216           */
217           
218           struct ExecutorValidateUserRequest
219           {
220               char username[EXECUTOR_BUFFER_SIZE];
221           };
222           
223           struct ExecutorValidateUserResponse
224           {
225               int status;
226           };
227           
228           /*
229           **==============================================================================
230           **
231           ** EXECUTOR_CHALLENGE_LOCAL_MESSAGE
232           **
233 kumpf 1.2 **==============================================================================
234           */
235           
236           struct ExecutorChallengeLocalRequest
237           {
238               char user[EXECUTOR_BUFFER_SIZE];
239           };
240           
241           struct ExecutorChallengeLocalResponse
242           {
243               int status;
244               char challenge[EXECUTOR_BUFFER_SIZE];
245           };
246           
247           /*
248           **==============================================================================
249           **
250           ** EXECUTOR_AUTHENTICATE_LOCAL_MESSAGE
251           **
252           **==============================================================================
253           */
254 kumpf 1.2 
255           struct ExecutorAuthenticateLocalRequest
256           {
257               char challenge[EXECUTOR_BUFFER_SIZE];
258               char response[EXECUTOR_BUFFER_SIZE];
259           };
260           
261           struct ExecutorAuthenticateLocalResponse
262           {
263               int status;
264           };
265           
266           /*
267           **==============================================================================
268           **
269 kumpf 1.4 ** EXECUTOR_UPDATE_LOG_LEVEL_MESSAGE
270           **
271           **==============================================================================
272           */
273           
274           struct ExecutorUpdateLogLevelRequest
275           {
276               char logLevel[EXECUTOR_BUFFER_SIZE];
277           };
278           
279           struct ExecutorUpdateLogLevelResponse
280           {
281               int status;
282           };
283           
284           /*
285           **==============================================================================
286           **
287 kumpf 1.2 ** MessageCodeToString()
288           **
289           **==============================================================================
290           */
291           
292           EXECUTOR_LINKAGE
293           const char* MessageCodeToString(enum ExecutorMessageCode code);
294           
295           #endif /* _Executor_Messages_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2