testexecmgmt/ucc/Source/mncontroller/mncontroller.x
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 * Standard Interface Values
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #include "../include/penstd.x"
       
    21 
       
    22 
       
    23 /*******************************************************************************
       
    24  *
       
    25  * Interface Constants
       
    26  *
       
    27  ******************************************************************************/
       
    28 const X_MAXINTERFACENAMELEN		= 64;
       
    29 const X_MAXNAILEN				= 128;
       
    30 const X_MAXOPTIONTOKENSIZE		= 512;
       
    31 const X_MAXINFOLEN              = 128;
       
    32 const X_MAXERRORSTRING          = 256;
       
    33 
       
    34 
       
    35 /*******************************************************************************
       
    36  *
       
    37  * Error codes
       
    38  *
       
    39  ******************************************************************************/
       
    40 const ERR_WAIT_PROCESS_ERROR			= -103;
       
    41 const ERR_START_PROCESS_ERROR			= -105;
       
    42 const ERR_STOP_PROCESS_ERROR			= -106;
       
    43 const ERR_DYNAMICS_CALL_FAILED			= -107;
       
    44 const ERR_CONFIG_FILE_ERROR				= -108;
       
    45 const ERR_POLICY_OUTPUT_PARSING_FAILED	= -110;
       
    46 const ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE		= -111;
       
    47 const ERR_SET_INTERFACE_ADDRESS_ERROR			= -112;
       
    48 
       
    49 
       
    50 /*******************************************************************************
       
    51  *
       
    52  * Constant values passed as parameters
       
    53  *
       
    54  ******************************************************************************/
       
    55 const FP_EARLY_EXPIRE	= 1;
       
    56 const FP_NEWEST_FA		= 2;
       
    57 const FP_EAGER			= 4;
       
    58 const FP_NEWEST_ADV		= 8;
       
    59 
       
    60 enum TMnTunnelingMode {
       
    61 	TM_NO_TUNNEL,
       
    62 	TM_FULL_TUNNEL,
       
    63 	TM_TRIANGLE_TUNNEL
       
    64 };
       
    65 
       
    66 enum TSetInterfaceErrors {
       
    67 	SIE_SOCKET_FAILED,
       
    68 	SIE_IOCTL_GET_DESTINATION_ADDRESS_FAILED,
       
    69 	SIE_IOCTL_SET_ADDRESS_FAILED,
       
    70 	SIE_IOCTL_SET_DESTINATION_ADDRESS_FAILED
       
    71 };
       
    72 
       
    73 
       
    74 /*******************************************************************************
       
    75  *
       
    76  * Types
       
    77  *
       
    78  ******************************************************************************/
       
    79 struct TResult {
       
    80 	int iServiceResult;
       
    81 	int iSubComponentResult;
       
    82 	int iData0;
       
    83 	int iData1;
       
    84 };
       
    85 
       
    86 struct THomeAddressDesc {
       
    87 	int		iAgentID;
       
    88 	int		iHomeAddressPrefix;
       
    89 	int		iHomeAddress;
       
    90 	int		iHomeAgentAddress;
       
    91 	char	iInterfaceName[X_MAXINTERFACENAMELEN];
       
    92 }; 
       
    93 
       
    94 struct TOptionDesc {
       
    95 	int  iAgentID;
       
    96 	char iOptionToken[X_MAXOPTIONTOKENSIZE];
       
    97 	char iOptionValue[X_MAXOPTIONTOKENSIZE];
       
    98 	char iOptionBlockStart[X_MAXOPTIONTOKENSIZE];
       
    99 	char iOptionBlockEnd[X_MAXOPTIONTOKENSIZE];
       
   100 };
       
   101 
       
   102 struct TTunnelingModeDesc {
       
   103 	int iAgentID;
       
   104 	TMnTunnelingMode iTunnelMode;
       
   105 };
       
   106 
       
   107 struct TPolicyRequest {
       
   108 	int iAgentID;
       
   109 	int iPolicy;
       
   110 };
       
   111 
       
   112 struct TForeignAgentInfoRequest {
       
   113 	int iAgentID;
       
   114 	int iForeignAgentID;
       
   115 };
       
   116 
       
   117 struct TTimeoutRequest {
       
   118 	int iAgentID;
       
   119 	int iTimeout;
       
   120 };
       
   121 
       
   122 struct TMobileNodeStatus {
       
   123   TResult iCallResult;
       
   124   int iConnected;
       
   125   int iTunnelUp;
       
   126   unsigned int iLocalAddress;
       
   127   unsigned int iColocatedAddress;
       
   128   unsigned int iForeignAgentAddress;
       
   129   unsigned int iHomeAgentAddress;
       
   130   unsigned int iHomeAddress;
       
   131   int iLifetimeRemaining;
       
   132   int iTunnelMode;
       
   133   int iSecondsSinceLastRequest;
       
   134   int iSecondsSinceLastReply;
       
   135   int iReplyCode;
       
   136   char iInfoText[X_MAXINFOLEN];
       
   137   char iLastErrorString[X_MAXERRORSTRING];
       
   138 };
       
   139 
       
   140 struct TForeignAgentInfo {
       
   141   TResult iCallResult;
       
   142   unsigned int iForeignAgentAddress;
       
   143   char iInterfaceName[X_MAXINTERFACENAMELEN];
       
   144   int iPriority;
       
   145   int iInUse;
       
   146   int iInterfaceIndex;
       
   147   int iLastAdvertisement;
       
   148   char iNAI[X_MAXNAILEN];
       
   149   int iAdvertisementExpiry;
       
   150 };
       
   151 
       
   152 typedef struct TForeignAgentInfo TForeignAgentList<>;
       
   153 
       
   154 
       
   155 /*******************************************************************************
       
   156  *
       
   157  * MNCONTROLLER Interface
       
   158  *
       
   159  ******************************************************************************/
       
   160 program MNCONTROLLER {
       
   161 	version MNCONTROLLER_VERSION {
       
   162 
       
   163 		/* Standard Service Management */
       
   164 		int SS_STARTUPRPCSERVICE( void )								= 1;
       
   165 		int SC_SHUTDOWNRPCSERVICE( int )								= 2;
       
   166 		TComponentList LIST_DEVICES( void )								= 30;
       
   167 
       
   168 		/* Create instances */
       
   169 		TResult CSTR_CREATEAGENT( void )								= 31;
       
   170 		int DSTR_REMOVEAGENT( int )										= 32;
       
   171 
       
   172 		/* Start and stop the mobile agent */
       
   173 		TResult STARTMOBILEAGENT( int )									= 3;
       
   174 		TResult STOPMOBILEAGENT( int )									= 4;
       
   175 		TResult GETMOBILEAGENTSTATUS( int )									= 5;
       
   176 
       
   177 		/* Configure the agent -- must be called before starting the agent */
       
   178 		TResult SETSINGLEOPTION( TOptionDesc )							= 6;
       
   179 		TResult REMOVESINGLEOPTION( TOptionDesc )						= 33;
       
   180 		TResult ADDLISTOPTION( TOptionDesc )							= 7;
       
   181 		TResult REMOVELISTOPTION( TOptionDesc )							= 8;
       
   182 
       
   183 		/* Custom configuration */
       
   184 		TResult SETHOMEADDRESS( THomeAddressDesc )						= 23;
       
   185 
       
   186 		/* Runtime commands */
       
   187 		TResult GETCAREOFADDRESS( int )									= 9;
       
   188 		TResult CONNECT( TTunnelingModeDesc )							= 12;		
       
   189 		TResult DISCONNECT( int )										= 13;
       
   190 		TResult CONFIRM( int )											= 16;
       
   191 		TResult RESCANINTERFACES( int )									= 17;	
       
   192 		TResult SETFAPOLICY( TPolicyRequest )							= 18;
       
   193 		TResult GETFAPOLICY( int )										= 19;
       
   194 
       
   195 		TMobileNodeStatus GETSTATUS( int )								= 11;		
       
   196 		TForeignAgentList LISTFOREIGNAGENTS( int )							= 20;		
       
   197 		TForeignAgentInfo GETFOREIGNAGENTINFO( TForeignAgentInfoRequest )	= 21;		
       
   198 
       
   199 		/* Set the timeout for all dynamic commands */
       
   200 		void SETTIMEOUT( TTimeoutRequest )								= 22;
       
   201 	} = 5; 
       
   202 } = 0x34630205;