|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 #ifndef __HACONTROLLER_H__ |
|
22 #define __HACONTROLLER_H__ |
|
23 #include <rpc/types.h> |
|
24 #include <rpc/rpc.h> |
|
25 |
|
26 #define ERR_NONE 0 |
|
27 #define ERR_INVALID_ERROR_CODE -16 |
|
28 #define ERR_SERVICE_ALREADY_STARTED -1 |
|
29 #define ERR_SERVICE_NOT_RUNNING -2 |
|
30 #define ERR_ACTIVE_USER_SESSIONS -3 |
|
31 #define ERR_FAILED_TO_REMOVE_ACTIVE_SESSIONS -4 |
|
32 #define ERR_FAILED_TO_CREATE_COMPONENT_MANAGER -5 |
|
33 #define ERR_FAILED_TO_RETRIEVE_KEY -6 |
|
34 #define ERR_INSTANCE_DOES_NOT_EXIST -7 |
|
35 #define ERR_CANNOT_CREATE_NEW_INSTANCE -9 |
|
36 #define ERR_MISSING_PARAMETER -17 |
|
37 #define ERR_INVALID_METHOD -8 |
|
38 #define ERR_STUB_ALREADY_CONNECTED -10 |
|
39 #define ERR_FAILED_TO_CONNECT -11 |
|
40 #define ERR_STUB_NOT_CONNECTED -12 |
|
41 #define ERR_INVALID_RV_POINTER -13 |
|
42 #define ERR_RPC_ERROR -14 |
|
43 #define ERR_INVALID_SERVICE -15 |
|
44 #define ERR_INVALIDARG -50 |
|
45 #define ERR_INVALIDSTATE -51 |
|
46 #define ERR_GENERAL -52 |
|
47 #define INFO_MAXIMUM_OBJECTS 256 |
|
48 |
|
49 typedef struct { |
|
50 u_int TComponentList_len; |
|
51 int *TComponentList_val; |
|
52 } TComponentList; |
|
53 #ifdef __cplusplus |
|
54 extern "C" { |
|
55 bool_t xdr_hacontroller_TComponentList(...); |
|
56 } |
|
57 #else |
|
58 bool_t xdr_hacontroller_TComponentList(); |
|
59 #endif |
|
60 |
|
61 #define X_MAXOPTIONTOKENSIZE 512 |
|
62 #define X_MAXINTERFACENAMESIZE 64 |
|
63 #define ERR_WAIT_PROCESS_ERROR -103 |
|
64 #define ERR_START_PROCESS_ERROR -105 |
|
65 #define ERR_STOP_PROCESS_ERROR -106 |
|
66 #define ERR_DYNAMICS_CALL_FAILED -107 |
|
67 #define ERR_CONFIG_FILE_ERROR -108 |
|
68 #define ERR_POLICY_OUTPUT_PARSING_FAILED -110 |
|
69 #define ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE -111 |
|
70 #define ERR_NO_MORE_INTERFACES -112 |
|
71 #define ERR_CREATE_INTERFACE_ERROR -113 |
|
72 #define ERR_DESTROY_INTERFACE_ERROR -114 |
|
73 #define ERR_INTEGER_ALLOCATOR_SETUP_ERROR -115 |
|
74 #define ERR_VIRTUAL_NETWORK_CONFIGURATION_ERROR -116 |
|
75 #define ERR_NO_MORE_VIRTUAL_NETWORKS -117 |
|
76 |
|
77 struct TStartupInfo { |
|
78 int iBaseInterfaceIndex; |
|
79 int iBaseInterfaceNetworkMask; |
|
80 int iBaseInterfaceStartHostAddressRange; |
|
81 int iBaseInterfaceStopHostAddressRange; |
|
82 int iVirtualNetworkPrefix; |
|
83 int iVirtualNetworkPrefixMask; |
|
84 int iVirtualNetworkAllocSize; |
|
85 }; |
|
86 typedef struct TStartupInfo TStartupInfo; |
|
87 #ifdef __cplusplus |
|
88 extern "C" { |
|
89 bool_t xdr_hacontroller_TStartupInfo(...); |
|
90 } |
|
91 #else |
|
92 bool_t xdr_hacontroller_TStartupInfo(); |
|
93 #endif |
|
94 |
|
95 |
|
96 struct TResult { |
|
97 int iServiceResult; |
|
98 int iSubComponentResult; |
|
99 int iData0; |
|
100 int iData1; |
|
101 }; |
|
102 typedef struct TResult TResult; |
|
103 #ifdef __cplusplus |
|
104 extern "C" { |
|
105 bool_t xdr_hacontroller_TResult(...); |
|
106 } |
|
107 #else |
|
108 bool_t xdr_hacontroller_TResult(); |
|
109 #endif |
|
110 |
|
111 |
|
112 struct TOptionDesc { |
|
113 int iAgentID; |
|
114 char iOptionFilename[X_MAXOPTIONTOKENSIZE]; |
|
115 char iOptionToken[X_MAXOPTIONTOKENSIZE]; |
|
116 char iOptionValue[X_MAXOPTIONTOKENSIZE]; |
|
117 char iOptionBlockStart[X_MAXOPTIONTOKENSIZE]; |
|
118 char iOptionBlockEnd[X_MAXOPTIONTOKENSIZE]; |
|
119 }; |
|
120 typedef struct TOptionDesc TOptionDesc; |
|
121 #ifdef __cplusplus |
|
122 extern "C" { |
|
123 bool_t xdr_hacontroller_TOptionDesc(...); |
|
124 } |
|
125 #else |
|
126 bool_t xdr_hacontroller_TOptionDesc(); |
|
127 #endif |
|
128 |
|
129 |
|
130 struct THaStatus { |
|
131 TResult iCallResult; |
|
132 int iTunnelCount; |
|
133 int iRequestsRejected; |
|
134 int iRequestsAccepted; |
|
135 int iDiscardedUnknownExtension; |
|
136 int iDiscardedMalformed; |
|
137 int iDiscardedVendor; |
|
138 int iAdvertisementsSent; |
|
139 int iHomeAgentAddress; |
|
140 int iVirtualNetworkStartAddress; |
|
141 int iVirtualNetworkSize; |
|
142 }; |
|
143 typedef struct THaStatus THaStatus; |
|
144 #ifdef __cplusplus |
|
145 extern "C" { |
|
146 bool_t xdr_hacontroller_THaStatus(...); |
|
147 } |
|
148 #else |
|
149 bool_t xdr_hacontroller_THaStatus(); |
|
150 #endif |
|
151 |
|
152 |
|
153 struct THaTunnelInfo { |
|
154 TResult iCallResult; |
|
155 u_int iMobileNodeAddress; |
|
156 u_int iCareofAddress; |
|
157 u_int iHomeAgentAddress; |
|
158 int iCreationTime; |
|
159 int iExpirationTime; |
|
160 int iRefreshTime; |
|
161 int iLastTimestamp; |
|
162 int iSPI; |
|
163 int iTimeout; |
|
164 }; |
|
165 typedef struct THaTunnelInfo THaTunnelInfo; |
|
166 #ifdef __cplusplus |
|
167 extern "C" { |
|
168 bool_t xdr_hacontroller_THaTunnelInfo(...); |
|
169 } |
|
170 #else |
|
171 bool_t xdr_hacontroller_THaTunnelInfo(); |
|
172 #endif |
|
173 |
|
174 |
|
175 struct THaTunnelID { |
|
176 int iAgentID; |
|
177 int iMobileNodeAddress; |
|
178 }; |
|
179 typedef struct THaTunnelID THaTunnelID; |
|
180 #ifdef __cplusplus |
|
181 extern "C" { |
|
182 bool_t xdr_hacontroller_THaTunnelID(...); |
|
183 } |
|
184 #else |
|
185 bool_t xdr_hacontroller_THaTunnelID(); |
|
186 #endif |
|
187 |
|
188 |
|
189 typedef struct { |
|
190 u_int THaTunnelList_len; |
|
191 THaTunnelID *THaTunnelList_val; |
|
192 } THaTunnelList; |
|
193 #ifdef __cplusplus |
|
194 extern "C" { |
|
195 bool_t xdr_hacontroller_THaTunnelList(...); |
|
196 } |
|
197 #else |
|
198 bool_t xdr_hacontroller_THaTunnelList(); |
|
199 #endif |
|
200 |
|
201 |
|
202 struct TTimeoutRequest { |
|
203 int iAgentID; |
|
204 int iTimeout; |
|
205 }; |
|
206 typedef struct TTimeoutRequest TTimeoutRequest; |
|
207 #ifdef __cplusplus |
|
208 extern "C" { |
|
209 bool_t xdr_hacontroller_TTimeoutRequest(...); |
|
210 } |
|
211 #else |
|
212 bool_t xdr_hacontroller_TTimeoutRequest(); |
|
213 #endif |
|
214 |
|
215 |
|
216 struct TGetTunnelRequest { |
|
217 int iAgentID; |
|
218 int iMobileNodeAddress; |
|
219 }; |
|
220 typedef struct TGetTunnelRequest TGetTunnelRequest; |
|
221 #ifdef __cplusplus |
|
222 extern "C" { |
|
223 bool_t xdr_hacontroller_TGetTunnelRequest(...); |
|
224 } |
|
225 #else |
|
226 bool_t xdr_hacontroller_TGetTunnelRequest(); |
|
227 #endif |
|
228 |
|
229 |
|
230 #define HACONTROLLER ((u_long)0x34630208) |
|
231 #define HACONTROLLER_VERSION ((u_long)8) |
|
232 #define SS_STARTUPRPCSERVICE ((u_long)1) |
|
233 #ifdef __cplusplus |
|
234 extern "C" { |
|
235 extern int *ss_startuprpcservice_8( TStartupInfo * arg, CLIENT *cl ); |
|
236 } |
|
237 #else |
|
238 extern int *ss_startuprpcservice_8(); |
|
239 #endif /* __cplusplus */ |
|
240 #define SC_SHUTDOWNRPCSERVICE ((u_long)2) |
|
241 #ifdef __cplusplus |
|
242 extern "C" { |
|
243 extern int *sc_shutdownrpcservice_8( int * arg, CLIENT *cl ); |
|
244 } |
|
245 #else |
|
246 extern int *sc_shutdownrpcservice_8(); |
|
247 #endif /* __cplusplus */ |
|
248 #define LIST_DEVICES ((u_long)30) |
|
249 #ifdef __cplusplus |
|
250 extern "C" { |
|
251 extern TComponentList *list_devices_8( void * arg, CLIENT *cl ); |
|
252 } |
|
253 #else |
|
254 extern TComponentList *list_devices_8(); |
|
255 #endif /* __cplusplus */ |
|
256 #define CSTR_CREATEAGENT ((u_long)31) |
|
257 #ifdef __cplusplus |
|
258 extern "C" { |
|
259 extern TResult *cstr_createagent_8( void * arg, CLIENT *cl ); |
|
260 } |
|
261 #else |
|
262 extern TResult *cstr_createagent_8(); |
|
263 #endif /* __cplusplus */ |
|
264 #define DSTR_REMOVEAGENT ((u_long)32) |
|
265 #ifdef __cplusplus |
|
266 extern "C" { |
|
267 extern TResult *dstr_removeagent_8( int * arg, CLIENT *cl ); |
|
268 } |
|
269 #else |
|
270 extern TResult *dstr_removeagent_8(); |
|
271 #endif /* __cplusplus */ |
|
272 #define STARTMOBILEAGENT ((u_long)3) |
|
273 #ifdef __cplusplus |
|
274 extern "C" { |
|
275 extern TResult *startmobileagent_8( int * arg, CLIENT *cl ); |
|
276 } |
|
277 #else |
|
278 extern TResult *startmobileagent_8(); |
|
279 #endif /* __cplusplus */ |
|
280 #define STOPMOBILEAGENT ((u_long)4) |
|
281 #ifdef __cplusplus |
|
282 extern "C" { |
|
283 extern TResult *stopmobileagent_8( int * arg, CLIENT *cl ); |
|
284 } |
|
285 #else |
|
286 extern TResult *stopmobileagent_8(); |
|
287 #endif /* __cplusplus */ |
|
288 #define GETMOBILEAGENTSTATUS ((u_long)5) |
|
289 #ifdef __cplusplus |
|
290 extern "C" { |
|
291 extern TResult *getmobileagentstatus_8( int * arg, CLIENT *cl ); |
|
292 } |
|
293 #else |
|
294 extern TResult *getmobileagentstatus_8(); |
|
295 #endif /* __cplusplus */ |
|
296 #define SETSINGLEOPTION ((u_long)6) |
|
297 #ifdef __cplusplus |
|
298 extern "C" { |
|
299 extern TResult *setsingleoption_8( TOptionDesc * arg, CLIENT *cl ); |
|
300 } |
|
301 #else |
|
302 extern TResult *setsingleoption_8(); |
|
303 #endif /* __cplusplus */ |
|
304 #define REMOVESINGLEOPTION ((u_long)33) |
|
305 #ifdef __cplusplus |
|
306 extern "C" { |
|
307 extern TResult *removesingleoption_8( TOptionDesc * arg, CLIENT *cl ); |
|
308 } |
|
309 #else |
|
310 extern TResult *removesingleoption_8(); |
|
311 #endif /* __cplusplus */ |
|
312 #define ADDLISTOPTION ((u_long)7) |
|
313 #ifdef __cplusplus |
|
314 extern "C" { |
|
315 extern TResult *addlistoption_8( TOptionDesc * arg, CLIENT *cl ); |
|
316 } |
|
317 #else |
|
318 extern TResult *addlistoption_8(); |
|
319 #endif /* __cplusplus */ |
|
320 #define REMOVELISTOPTION ((u_long)8) |
|
321 #ifdef __cplusplus |
|
322 extern "C" { |
|
323 extern TResult *removelistoption_8( TOptionDesc * arg, CLIENT *cl ); |
|
324 } |
|
325 #else |
|
326 extern TResult *removelistoption_8(); |
|
327 #endif /* __cplusplus */ |
|
328 #define GETSTATUS ((u_long)9) |
|
329 #ifdef __cplusplus |
|
330 extern "C" { |
|
331 extern THaStatus *getstatus_8( int * arg, CLIENT *cl ); |
|
332 } |
|
333 #else |
|
334 extern THaStatus *getstatus_8(); |
|
335 #endif /* __cplusplus */ |
|
336 #define DESTROYTUNNELID ((u_long)11) |
|
337 #ifdef __cplusplus |
|
338 extern "C" { |
|
339 extern TResult *destroytunnelid_8( THaTunnelID * arg, CLIENT *cl ); |
|
340 } |
|
341 #else |
|
342 extern TResult *destroytunnelid_8(); |
|
343 #endif /* __cplusplus */ |
|
344 #define LISTTUNNELS ((u_long)12) |
|
345 #ifdef __cplusplus |
|
346 extern "C" { |
|
347 extern THaTunnelList *listtunnels_8( int * arg, CLIENT *cl ); |
|
348 } |
|
349 #else |
|
350 extern THaTunnelList *listtunnels_8(); |
|
351 #endif /* __cplusplus */ |
|
352 #define GETTUNNELINFO ((u_long)14) |
|
353 #ifdef __cplusplus |
|
354 extern "C" { |
|
355 extern THaTunnelInfo *gettunnelinfo_8( TGetTunnelRequest * arg, CLIENT *cl ); |
|
356 } |
|
357 #else |
|
358 extern THaTunnelInfo *gettunnelinfo_8(); |
|
359 #endif /* __cplusplus */ |
|
360 #define SETTIMEOUT ((u_long)13) |
|
361 #ifdef __cplusplus |
|
362 extern "C" { |
|
363 extern void *settimeout_8( TTimeoutRequest * arg, CLIENT *cl ); |
|
364 } |
|
365 #else |
|
366 extern void *settimeout_8(); |
|
367 #endif /* __cplusplus */ |
|
368 |
|
369 #endif /* __HACONTROLLER_H__ */ |