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];
|