|
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 * Constants |
|
26 * |
|
27 ******************************************************************************/ |
|
28 const X_MAXOPTIONTOKENSIZE = 512; |
|
29 const X_MAXINTERFACENAMESIZE = 64; |
|
30 |
|
31 |
|
32 /******************************************************************************* |
|
33 * |
|
34 * Error codes |
|
35 * |
|
36 ******************************************************************************/ |
|
37 const ERR_WAIT_PROCESS_ERROR = -103; |
|
38 const ERR_START_PROCESS_ERROR = -105; |
|
39 const ERR_STOP_PROCESS_ERROR = -106; |
|
40 const ERR_DYNAMICS_CALL_FAILED = -107; |
|
41 const ERR_CONFIG_FILE_ERROR = -108; |
|
42 const ERR_POLICY_OUTPUT_PARSING_FAILED = -110; |
|
43 const ERR_PROCESS_TERMINATED_OUTSIDE_SCOPE = -111; |
|
44 const ERR_NO_MORE_INTERFACES = -112; |
|
45 const ERR_CREATE_INTERFACE_ERROR = -113; |
|
46 const ERR_DESTROY_INTERFACE_ERROR = -114; |
|
47 const ERR_INTEGER_ALLOCATOR_SETUP_ERROR = -115; |
|
48 const ERR_VIRTUAL_NETWORK_CONFIGURATION_ERROR = -116; |
|
49 const ERR_NO_MORE_VIRTUAL_NETWORKS = -117; |
|
50 |
|
51 |
|
52 /******************************************************************************* |
|
53 * |
|
54 * Types |
|
55 * |
|
56 ******************************************************************************/ |
|
57 struct TStartupInfo { |
|
58 int iBaseInterfaceIndex; |
|
59 int iBaseInterfaceNetworkMask; |
|
60 int iBaseInterfaceStartHostAddressRange; |
|
61 int iBaseInterfaceStopHostAddressRange; |
|
62 int iVirtualNetworkPrefix; |
|
63 int iVirtualNetworkPrefixMask; |
|
64 int iVirtualNetworkAllocSize; |
|
65 }; |
|
66 |
|
67 struct TResult { |
|
68 int iServiceResult; |
|
69 int iSubComponentResult; |
|
70 int iData0; |
|
71 int iData1; |
|
72 }; |
|
73 |
|
74 struct TOptionDesc { |
|
75 int iAgentID; |
|
76 char iOptionFilename[X_MAXOPTIONTOKENSIZE]; |
|
77 char iOptionToken[X_MAXOPTIONTOKENSIZE]; |
|
78 char iOptionValue[X_MAXOPTIONTOKENSIZE]; |
|
79 char iOptionBlockStart[X_MAXOPTIONTOKENSIZE]; |
|
80 char iOptionBlockEnd[X_MAXOPTIONTOKENSIZE]; |
|
81 }; |
|
82 |
|
83 struct THaStatus { |
|
84 TResult iCallResult; |
|
85 int iTunnelCount; |
|
86 int iRequestsRejected; |
|
87 int iRequestsAccepted; |
|
88 int iDiscardedUnknownExtension; |
|
89 int iDiscardedMalformed; |
|
90 int iDiscardedVendor; |
|
91 int iAdvertisementsSent; |
|
92 int iHomeAgentAddress; |
|
93 int iVirtualNetworkStartAddress; |
|
94 int iVirtualNetworkSize; |
|
95 }; |
|
96 |
|
97 struct THaTunnelInfo { |
|
98 TResult iCallResult; |
|
99 unsigned int iMobileNodeAddress; |
|
100 unsigned int iCareofAddress; |
|
101 unsigned int iHomeAgentAddress; |
|
102 int iCreationTime; |
|
103 int iExpirationTime; |
|
104 int iRefreshTime; |
|
105 int iLastTimestamp; |
|
106 int iSPI; |
|
107 int iTimeout; |
|
108 }; |
|
109 |
|
110 struct THaTunnelID { |
|
111 int iAgentID; |
|
112 int iMobileNodeAddress; |
|
113 }; |
|
114 |
|
115 typedef THaTunnelID THaTunnelList<>; |
|
116 |
|
117 struct TTimeoutRequest { |
|
118 int iAgentID; |
|
119 int iTimeout; |
|
120 }; |
|
121 |
|
122 struct TGetTunnelRequest { |
|
123 int iAgentID; |
|
124 int iMobileNodeAddress; |
|
125 }; |
|
126 |
|
127 /******************************************************************************* |
|
128 * |
|
129 * HACONTROLLER Interface |
|
130 * |
|
131 ******************************************************************************/ |
|
132 program HACONTROLLER { |
|
133 version HACONTROLLER_VERSION { |
|
134 |
|
135 /* Initialise the service */ |
|
136 int SS_STARTUPRPCSERVICE( TStartupInfo ) = 1; |
|
137 int SC_SHUTDOWNRPCSERVICE( int ) = 2; |
|
138 TComponentList LIST_DEVICES( void ) = 30; |
|
139 |
|
140 /* Create instances */ |
|
141 TResult CSTR_CREATEAGENT( void ) = 31; |
|
142 TResult DSTR_REMOVEAGENT( int ) = 32; |
|
143 |
|
144 /* Start and stop the mobile agent */ |
|
145 TResult STARTMOBILEAGENT( int ) = 3; |
|
146 TResult STOPMOBILEAGENT( int ) = 4; |
|
147 TResult GETMOBILEAGENTSTATUS( int ) = 5; |
|
148 |
|
149 /* Configure the agent -- must be called before starting the agent */ |
|
150 TResult SETSINGLEOPTION( TOptionDesc ) = 6; |
|
151 TResult REMOVESINGLEOPTION( TOptionDesc ) = 33; |
|
152 TResult ADDLISTOPTION( TOptionDesc ) = 7; |
|
153 TResult REMOVELISTOPTION( TOptionDesc ) = 8; |
|
154 |
|
155 /* Dynamic commands */ |
|
156 THaStatus GETSTATUS( int ) = 9; |
|
157 TResult DESTROYTUNNELID( THaTunnelID ) = 11; |
|
158 THaTunnelList LISTTUNNELS( int ) = 12; |
|
159 THaTunnelInfo GETTUNNELINFO( TGetTunnelRequest ) = 14; |
|
160 |
|
161 /* Set the timeout for all dynamic commands */ |
|
162 void SETTIMEOUT( TTimeoutRequest ) = 13; |
|
163 } = 8; |
|
164 } = 0x34630208; |