(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_REAP_PROVIDER_AGENT,
 67               EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE,
 68               EXECUTOR_VALIDATE_USER_MESSAGE,
 69               EXECUTOR_CHALLENGE_LOCAL_MESSAGE,
 70               EXECUTOR_AUTHENTICATE_LOCAL_MESSAGE
 71           };
 72           
 73           /*
 74           **==============================================================================
 75           **
 76           ** struct ExecutorRequestHeader
 77           **
 78           **==============================================================================
 79           */
 80           
 81           struct ExecutorRequestHeader
 82           {
 83               unsigned int code;
 84           };
 85 kumpf 1.2 
 86           /*
 87           **==============================================================================
 88           **
 89           ** EXECUTOR_PING_MESSAGE
 90           **
 91           **==============================================================================
 92           */
 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 kumpf 1.2 **==============================================================================
107           */
108           
109           struct ExecutorOpenFileRequest
110           {
111               char path[EXECUTOR_BUFFER_SIZE];
112               /* ('r' = read, 'w' = write, 'a' = append) */
113               int mode;
114           };
115           
116           struct ExecutorOpenFileResponse
117           {
118               int status;
119           };
120           
121           /*
122           **==============================================================================
123           **
124           ** EXECUTOR_REMOVE_FILE_MESSAGE
125           **
126           **==============================================================================
127 kumpf 1.2 */
128           
129           struct ExecutorRemoveFileRequest
130           {
131               char path[EXECUTOR_BUFFER_SIZE];
132           };
133           
134           struct ExecutorRemoveFileResponse
135           {
136               int status;
137           };
138           
139           /*
140           **==============================================================================
141           **
142           ** EXECUTOR_RENAME_FILE_MESSAGE
143           **
144           **==============================================================================
145           */
146           
147           struct ExecutorRenameFileRequest
148 kumpf 1.2 {
149               char oldPath[EXECUTOR_BUFFER_SIZE];
150               char newPath[EXECUTOR_BUFFER_SIZE];
151           };
152           
153           struct ExecutorRenameFileResponse
154           {
155               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.2     int uid;
170               int gid;
171           };
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 kumpf 1.2 };
191           
192           /*
193           **==============================================================================
194           **
195           ** EXECUTOR_REAP_PROVIDER_AGENT
196           **
197           **==============================================================================
198           */
199           
200           struct ExecutorReapProviderAgentRequest
201           {
202               int pid;
203           };
204           
205           struct ExecutorReapProviderAgentResponse
206           {
207               int status;
208           };
209           
210           /*
211 kumpf 1.2 **==============================================================================
212           **
213           ** EXECUTOR_AUTHENTICATE_PASSWORD_MESSAGE
214           **
215           **==============================================================================
216           */
217           
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 kumpf 1.2 ** EXECUTOR_VALIDATE_USER_MESSAGE
233           **
234           **==============================================================================
235           */
236           
237           struct ExecutorValidateUserRequest
238           {
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 kumpf 1.2 */
254           
255           struct ExecutorChallengeLocalRequest
256           {
257               char user[EXECUTOR_BUFFER_SIZE];
258           };
259           
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 kumpf 1.2 struct ExecutorAuthenticateLocalRequest
275           {
276               char challenge[EXECUTOR_BUFFER_SIZE];
277               char response[EXECUTOR_BUFFER_SIZE];
278           };
279           
280           struct ExecutorAuthenticateLocalResponse
281           {
282               int status;
283           };
284           
285           /*
286           **==============================================================================
287           **
288           ** MessageCodeToString()
289           **
290           **==============================================================================
291           */
292           
293           EXECUTOR_LINKAGE
294           const char* MessageCodeToString(enum ExecutorMessageCode code);
295 kumpf 1.2 
296           #endif /* _Executor_Messages_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2