|
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 __MNCONTROLLER_H__ |
|
22 #define __MNCONTROLLER_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_mncontroller_TComponentList(...); |
|
54 } |
|
55 #else |
|
56 bool_t xdr_mncontroller_TComponentList(); |
|
57 #endif |
|
58 |
|
59 #define X_MAXINTERFACENAMELEN 64 |
|
60 #define X_MAXNAILEN 128 |
|
61 #define X_MAXOPTIONTOKENSIZE 512 |
|
62 #define X_MAXINFOLEN 128 |
|
63 #define X_MAXERRORSTRING 256 |
|
64 #define ERR_WAIT_PROCESS_ERROR -103 |
|
65 #define ERR_START_PROCESS_ERROR -105 |
|
66 #define ERR_STOP_PROCESS_ERROR -106 |
|
67 #define ERR_DYNAMICS_CALL_FAILED -107 |
|
68 #define ERR_CONFIG_FILE_ERROR -108 |
|
69 #define ERR_POLICY_OUTPUT_PARSING_FAILED -110 |
|
70 #define ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE -111 |
|
71 #define ERR_SET_INTERFACE_ADDRESS_ERROR -112 |
|
72 #define FP_EARLY_EXPIRE 1 |
|
73 #define FP_NEWEST_FA 2 |
|
74 #define FP_EAGER 4 |
|
75 #define FP_NEWEST_ADV 8 |
|
76 |
|
77 enum TMnTunnelingMode { |
|
78 TM_NO_TUNNEL = 0, |
|
79 TM_FULL_TUNNEL = 1, |
|
80 TM_TRIANGLE_TUNNEL = 2, |
|
81 }; |
|
82 typedef enum TMnTunnelingMode TMnTunnelingMode; |
|
83 #ifdef __cplusplus |
|
84 extern "C" { |
|
85 bool_t xdr_mncontroller_TMnTunnelingMode(...); |
|
86 } |
|
87 #else |
|
88 bool_t xdr_mncontroller_TMnTunnelingMode(); |
|
89 #endif |
|
90 |
|
91 |
|
92 enum TSetInterfaceErrors { |
|
93 SIE_SOCKET_FAILED = 0, |
|
94 SIE_IOCTL_GET_DESTINATION_ADDRESS_FAILED = 1, |
|
95 SIE_IOCTL_SET_ADDRESS_FAILED = 2, |
|
96 SIE_IOCTL_SET_DESTINATION_ADDRESS_FAILED = 3, |
|
97 }; |
|
98 typedef enum TSetInterfaceErrors TSetInterfaceErrors; |
|
99 #ifdef __cplusplus |
|
100 extern "C" { |
|
101 bool_t xdr_mncontroller_TSetInterfaceErrors(...); |
|
102 } |
|
103 #else |
|
104 bool_t xdr_mncontroller_TSetInterfaceErrors(); |
|
105 #endif |
|
106 |
|
107 |
|
108 struct TResult { |
|
109 int iServiceResult; |
|
110 int iSubComponentResult; |
|
111 int iData0; |
|
112 int iData1; |
|
113 }; |
|
114 typedef struct TResult TResult; |
|
115 #ifdef __cplusplus |
|
116 extern "C" { |
|
117 bool_t xdr_mncontroller_TResult(...); |
|
118 } |
|
119 #else |
|
120 bool_t xdr_mncontroller_TResult(); |
|
121 #endif |
|
122 |
|
123 |
|
124 struct THomeAddressDesc { |
|
125 int iAgentID; |
|
126 int iHomeAddressPrefix; |
|
127 int iHomeAddress; |
|
128 int iHomeAgentAddress; |
|
129 char iInterfaceName[X_MAXINTERFACENAMELEN]; |
|
130 }; |
|
131 typedef struct THomeAddressDesc THomeAddressDesc; |
|
132 #ifdef __cplusplus |
|
133 extern "C" { |
|
134 bool_t xdr_mncontroller_THomeAddressDesc(...); |
|
135 } |
|
136 #else |
|
137 bool_t xdr_mncontroller_THomeAddressDesc(); |
|
138 #endif |
|
139 |
|
140 |
|
141 struct TOptionDesc { |
|
142 int iAgentID; |
|
143 char iOptionToken[X_MAXOPTIONTOKENSIZE]; |
|
144 char iOptionValue[X_MAXOPTIONTOKENSIZE]; |
|
145 char iOptionBlockStart[X_MAXOPTIONTOKENSIZE]; |
|
146 char iOptionBlockEnd[X_MAXOPTIONTOKENSIZE]; |
|
147 }; |
|
148 typedef struct TOptionDesc TOptionDesc; |
|
149 #ifdef __cplusplus |
|
150 extern "C" { |
|
151 bool_t xdr_mncontroller_TOptionDesc(...); |
|
152 } |
|
153 #else |
|
154 bool_t xdr_mncontroller_TOptionDesc(); |
|
155 #endif |
|
156 |
|
157 |
|
158 struct TTunnelingModeDesc { |
|
159 int iAgentID; |
|
160 TMnTunnelingMode iTunnelMode; |
|
161 }; |
|
162 typedef struct TTunnelingModeDesc TTunnelingModeDesc; |
|
163 #ifdef __cplusplus |
|
164 extern "C" { |
|
165 bool_t xdr_mncontroller_TTunnelingModeDesc(...); |
|
166 } |
|
167 #else |
|
168 bool_t xdr_mncontroller_TTunnelingModeDesc(); |
|
169 #endif |
|
170 |
|
171 |
|
172 struct TPolicyRequest { |
|
173 int iAgentID; |
|
174 int iPolicy; |
|
175 }; |
|
176 typedef struct TPolicyRequest TPolicyRequest; |
|
177 #ifdef __cplusplus |
|
178 extern "C" { |
|
179 bool_t xdr_mncontroller_TPolicyRequest(...); |
|
180 } |
|
181 #else |
|
182 bool_t xdr_mncontroller_TPolicyRequest(); |
|
183 #endif |
|
184 |
|
185 |
|
186 struct TForeignAgentInfoRequest { |
|
187 int iAgentID; |
|
188 int iForeignAgentID; |
|
189 }; |
|
190 typedef struct TForeignAgentInfoRequest TForeignAgentInfoRequest; |
|
191 #ifdef __cplusplus |
|
192 extern "C" { |
|
193 bool_t xdr_mncontroller_TForeignAgentInfoRequest(...); |
|
194 } |
|
195 #else |
|
196 bool_t xdr_mncontroller_TForeignAgentInfoRequest(); |
|
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_mncontroller_TTimeoutRequest(...); |
|
208 } |
|
209 #else |
|
210 bool_t xdr_mncontroller_TTimeoutRequest(); |
|
211 #endif |
|
212 |
|
213 |
|
214 struct TMobileNodeStatus { |
|
215 TResult iCallResult; |
|
216 int iConnected; |
|
217 int iTunnelUp; |
|
218 u_int iLocalAddress; |
|
219 u_int iColocatedAddress; |
|
220 u_int iForeignAgentAddress; |
|
221 u_int iHomeAgentAddress; |
|
222 u_int iHomeAddress; |
|
223 int iLifetimeRemaining; |
|
224 int iTunnelMode; |
|
225 int iSecondsSinceLastRequest; |
|
226 int iSecondsSinceLastReply; |
|
227 int iReplyCode; |
|
228 char iInfoText[X_MAXINFOLEN]; |
|
229 char iLastErrorString[X_MAXERRORSTRING]; |
|
230 }; |
|
231 typedef struct TMobileNodeStatus TMobileNodeStatus; |
|
232 #ifdef __cplusplus |
|
233 extern "C" { |
|
234 bool_t xdr_mncontroller_TMobileNodeStatus(...); |
|
235 } |
|
236 #else |
|
237 bool_t xdr_mncontroller_TMobileNodeStatus(); |
|
238 #endif |
|
239 |
|
240 |
|
241 struct TForeignAgentInfo { |
|
242 TResult iCallResult; |
|
243 u_int iForeignAgentAddress; |
|
244 char iInterfaceName[X_MAXINTERFACENAMELEN]; |
|
245 int iPriority; |
|
246 int iInUse; |
|
247 int iInterfaceIndex; |
|
248 int iLastAdvertisement; |
|
249 char iNAI[X_MAXNAILEN]; |
|
250 int iAdvertisementExpiry; |
|
251 }; |
|
252 typedef struct TForeignAgentInfo TForeignAgentInfo; |
|
253 #ifdef __cplusplus |
|
254 extern "C" { |
|
255 bool_t xdr_mncontroller_TForeignAgentInfo(...); |
|
256 } |
|
257 #else |
|
258 bool_t xdr_mncontroller_TForeignAgentInfo(); |
|
259 #endif |
|
260 |
|
261 |
|
262 typedef struct { |
|
263 u_int TForeignAgentList_len; |
|
264 TForeignAgentInfo *TForeignAgentList_val; |
|
265 } TForeignAgentList; |
|
266 #ifdef __cplusplus |
|
267 extern "C" { |
|
268 bool_t xdr_mncontroller_TForeignAgentList(...); |
|
269 } |
|
270 #else |
|
271 bool_t xdr_mncontroller_TForeignAgentList(); |
|
272 #endif |
|
273 |
|
274 |
|
275 #define MNCONTROLLER ((u_long)0x34630205) |
|
276 #define MNCONTROLLER_VERSION ((u_long)5) |
|
277 #define SS_STARTUPRPCSERVICE ((u_long)1) |
|
278 #ifdef __cplusplus |
|
279 extern "C" { |
|
280 extern int *ss_startuprpcservice_5( void * arg, CLIENT *cl ); |
|
281 } |
|
282 #else |
|
283 extern int *ss_startuprpcservice_5(); |
|
284 #endif /* __cplusplus */ |
|
285 #define SC_SHUTDOWNRPCSERVICE ((u_long)2) |
|
286 #ifdef __cplusplus |
|
287 extern "C" { |
|
288 extern int *sc_shutdownrpcservice_5( int * arg, CLIENT *cl ); |
|
289 } |
|
290 #else |
|
291 extern int *sc_shutdownrpcservice_5(); |
|
292 #endif /* __cplusplus */ |
|
293 #define LIST_DEVICES ((u_long)30) |
|
294 #ifdef __cplusplus |
|
295 extern "C" { |
|
296 extern TComponentList *list_devices_5( void * arg, CLIENT *cl ); |
|
297 } |
|
298 #else |
|
299 extern TComponentList *list_devices_5(); |
|
300 #endif /* __cplusplus */ |
|
301 #define CSTR_CREATEAGENT ((u_long)31) |
|
302 #ifdef __cplusplus |
|
303 extern "C" { |
|
304 extern TResult *cstr_createagent_5( void * arg, CLIENT *cl ); |
|
305 } |
|
306 #else |
|
307 extern TResult *cstr_createagent_5(); |
|
308 #endif /* __cplusplus */ |
|
309 #define DSTR_REMOVEAGENT ((u_long)32) |
|
310 #ifdef __cplusplus |
|
311 extern "C" { |
|
312 extern int *dstr_removeagent_5( int * arg, CLIENT *cl ); |
|
313 } |
|
314 #else |
|
315 extern int *dstr_removeagent_5(); |
|
316 #endif /* __cplusplus */ |
|
317 #define STARTMOBILEAGENT ((u_long)3) |
|
318 #ifdef __cplusplus |
|
319 extern "C" { |
|
320 extern TResult *startmobileagent_5( int * arg, CLIENT *cl ); |
|
321 } |
|
322 #else |
|
323 extern TResult *startmobileagent_5(); |
|
324 #endif /* __cplusplus */ |
|
325 #define STOPMOBILEAGENT ((u_long)4) |
|
326 #ifdef __cplusplus |
|
327 extern "C" { |
|
328 extern TResult *stopmobileagent_5( int * arg, CLIENT *cl ); |
|
329 } |
|
330 #else |
|
331 extern TResult *stopmobileagent_5(); |
|
332 #endif /* __cplusplus */ |
|
333 #define GETMOBILEAGENTSTATUS ((u_long)5) |
|
334 #ifdef __cplusplus |
|
335 extern "C" { |
|
336 extern TResult *getmobileagentstatus_5( int * arg, CLIENT *cl ); |
|
337 } |
|
338 #else |
|
339 extern TResult *getmobileagentstatus_5(); |
|
340 #endif /* __cplusplus */ |
|
341 #define SETSINGLEOPTION ((u_long)6) |
|
342 #ifdef __cplusplus |
|
343 extern "C" { |
|
344 extern TResult *setsingleoption_5( TOptionDesc * arg, CLIENT *cl ); |
|
345 } |
|
346 #else |
|
347 extern TResult *setsingleoption_5(); |
|
348 #endif /* __cplusplus */ |
|
349 #define REMOVESINGLEOPTION ((u_long)33) |
|
350 #ifdef __cplusplus |
|
351 extern "C" { |
|
352 extern TResult *removesingleoption_5( TOptionDesc * arg, CLIENT *cl ); |
|
353 } |
|
354 #else |
|
355 extern TResult *removesingleoption_5(); |
|
356 #endif /* __cplusplus */ |
|
357 #define ADDLISTOPTION ((u_long)7) |
|
358 #ifdef __cplusplus |
|
359 extern "C" { |
|
360 extern TResult *addlistoption_5( TOptionDesc * arg, CLIENT *cl ); |
|
361 } |
|
362 #else |
|
363 extern TResult *addlistoption_5(); |
|
364 #endif /* __cplusplus */ |
|
365 #define REMOVELISTOPTION ((u_long)8) |
|
366 #ifdef __cplusplus |
|
367 extern "C" { |
|
368 extern TResult *removelistoption_5( TOptionDesc * arg, CLIENT *cl ); |
|
369 } |
|
370 #else |
|
371 extern TResult *removelistoption_5(); |
|
372 #endif /* __cplusplus */ |
|
373 #define SETHOMEADDRESS ((u_long)23) |
|
374 #ifdef __cplusplus |
|
375 extern "C" { |
|
376 extern TResult *sethomeaddress_5( THomeAddressDesc * arg, CLIENT *cl ); |
|
377 } |
|
378 #else |
|
379 extern TResult *sethomeaddress_5(); |
|
380 #endif /* __cplusplus */ |
|
381 #define GETCAREOFADDRESS ((u_long)9) |
|
382 #ifdef __cplusplus |
|
383 extern "C" { |
|
384 extern TResult *getcareofaddress_5( int * arg, CLIENT *cl ); |
|
385 } |
|
386 #else |
|
387 extern TResult *getcareofaddress_5(); |
|
388 #endif /* __cplusplus */ |
|
389 #define CONNECT ((u_long)12) |
|
390 #ifdef __cplusplus |
|
391 extern "C" { |
|
392 extern TResult *connect_5( TTunnelingModeDesc * arg, CLIENT *cl ); |
|
393 } |
|
394 #else |
|
395 extern TResult *connect_5(); |
|
396 #endif /* __cplusplus */ |
|
397 #define DISCONNECT ((u_long)13) |
|
398 #ifdef __cplusplus |
|
399 extern "C" { |
|
400 extern TResult *disconnect_5( int * arg, CLIENT *cl ); |
|
401 } |
|
402 #else |
|
403 extern TResult *disconnect_5(); |
|
404 #endif /* __cplusplus */ |
|
405 #define CONFIRM ((u_long)16) |
|
406 #ifdef __cplusplus |
|
407 extern "C" { |
|
408 extern TResult *confirm_5( int * arg, CLIENT *cl ); |
|
409 } |
|
410 #else |
|
411 extern TResult *confirm_5(); |
|
412 #endif /* __cplusplus */ |
|
413 #define RESCANINTERFACES ((u_long)17) |
|
414 #ifdef __cplusplus |
|
415 extern "C" { |
|
416 extern TResult *rescaninterfaces_5( int * arg, CLIENT *cl ); |
|
417 } |
|
418 #else |
|
419 extern TResult *rescaninterfaces_5(); |
|
420 #endif /* __cplusplus */ |
|
421 #define SETFAPOLICY ((u_long)18) |
|
422 #ifdef __cplusplus |
|
423 extern "C" { |
|
424 extern TResult *setfapolicy_5( TPolicyRequest * arg, CLIENT *cl ); |
|
425 } |
|
426 #else |
|
427 extern TResult *setfapolicy_5(); |
|
428 #endif /* __cplusplus */ |
|
429 #define GETFAPOLICY ((u_long)19) |
|
430 #ifdef __cplusplus |
|
431 extern "C" { |
|
432 extern TResult *getfapolicy_5( int * arg, CLIENT *cl ); |
|
433 } |
|
434 #else |
|
435 extern TResult *getfapolicy_5(); |
|
436 #endif /* __cplusplus */ |
|
437 #define GETSTATUS ((u_long)11) |
|
438 #ifdef __cplusplus |
|
439 extern "C" { |
|
440 extern TMobileNodeStatus *getstatus_5( int * arg, CLIENT *cl ); |
|
441 } |
|
442 #else |
|
443 extern TMobileNodeStatus *getstatus_5(); |
|
444 #endif /* __cplusplus */ |
|
445 #define LISTFOREIGNAGENTS ((u_long)20) |
|
446 #ifdef __cplusplus |
|
447 extern "C" { |
|
448 extern TForeignAgentList *listforeignagents_5( int * arg, CLIENT *cl ); |
|
449 } |
|
450 #else |
|
451 extern TForeignAgentList *listforeignagents_5(); |
|
452 #endif /* __cplusplus */ |
|
453 #define GETFOREIGNAGENTINFO ((u_long)21) |
|
454 #ifdef __cplusplus |
|
455 extern "C" { |
|
456 extern TForeignAgentInfo *getforeignagentinfo_5( TForeignAgentInfoRequest * arg, CLIENT *cl ); |
|
457 } |
|
458 #else |
|
459 extern TForeignAgentInfo *getforeignagentinfo_5(); |
|
460 #endif /* __cplusplus */ |
|
461 #define SETTIMEOUT ((u_long)22) |
|
462 #ifdef __cplusplus |
|
463 extern "C" { |
|
464 extern void *settimeout_5( TTimeoutRequest * arg, CLIENT *cl ); |
|
465 } |
|
466 #else |
|
467 extern void *settimeout_5(); |
|
468 #endif /* __cplusplus */ |
|
469 |
|
470 #endif /* __MNCONTROLLER_H__ */ |