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