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