|
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_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 |
|
49 |
|
50 /******************************************************************************* |
|
51 * |
|
52 * Types |
|
53 * |
|
54 ******************************************************************************/ |
|
55 enum TSoliticationMode { |
|
56 SM_SEND_NEVER = -1, |
|
57 SM_SEND_IN_RESPONSE_TO_SOLICITATION_ONLY = 0, |
|
58 SM_SEND_REGULAR = 1 |
|
59 }; |
|
60 |
|
61 struct TStartupInfo { |
|
62 int iBaseInterfaceIndex; |
|
63 int iNetworkMask; |
|
64 int iStartHostAddressRange; |
|
65 int iStopHostAddressRange; |
|
66 }; |
|
67 |
|
68 struct TResult { |
|
69 int iServiceResult; |
|
70 int iSubComponentResult; |
|
71 int iData0; |
|
72 int iData1; |
|
73 }; |
|
74 |
|
75 struct TOptionDesc { |
|
76 int iAgentID; |
|
77 char iOptionFilename[X_MAXOPTIONTOKENSIZE]; |
|
78 char iOptionToken[X_MAXOPTIONTOKENSIZE]; |
|
79 char iOptionValue[X_MAXOPTIONTOKENSIZE]; |
|
80 char iOptionBlockStart[X_MAXOPTIONTOKENSIZE]; |
|
81 char iOptionBlockEnd[X_MAXOPTIONTOKENSIZE]; |
|
82 }; |
|
83 |
|
84 struct TTimeoutRequest { |
|
85 int iAgentID; |
|
86 int iTimeout; |
|
87 }; |
|
88 |
|
89 struct TGetTunnelRequest { |
|
90 int iAgentID; |
|
91 int iMobileNodeAddress; |
|
92 }; |
|
93 |
|
94 struct TStartAgentRequest { |
|
95 int iAgentID; |
|
96 char iLowerInterface[X_MAXINTERFACENAMESIZE]; |
|
97 TSoliticationMode iSolicitationMode; |
|
98 int iSolicitationInterval; |
|
99 }; |
|
100 |
|
101 struct TFaStatusInfo { |
|
102 TResult iCallResult; |
|
103 int iTunnelCount; |
|
104 int iPendingRegistrationRequests; |
|
105 int iRequestsRejected; |
|
106 int iRequestsAccepted; |
|
107 int iReplysAccepted; |
|
108 int iReplysRejected; |
|
109 int iDiscardedUnknownExtension; |
|
110 int iDiscardedMalformed; |
|
111 int iDiscardedVendor; |
|
112 int iAdvertisementsSent; |
|
113 }; |
|
114 |
|
115 struct TFaTunnelID { |
|
116 int iAgentID; |
|
117 int iMobileNodeAddress; |
|
118 int iHomeAgentAddress; |
|
119 int iID; |
|
120 }; |
|
121 |
|
122 struct TFaTunnelInfo { |
|
123 TResult iCallResult; |
|
124 unsigned int iMobileNodeAddress; |
|
125 unsigned int iCareofAddress; |
|
126 unsigned int iHomeAgentAddress; |
|
127 int iPrivateHomeAgentID; |
|
128 int iCreationTime; |
|
129 int iExpirationTime; |
|
130 int iRefreshTime; |
|
131 int iLastTimestamp; |
|
132 int iSPI; |
|
133 int iTimeout; |
|
134 }; |
|
135 |
|
136 typedef TFaTunnelID TFaTunnelList<>; |
|
137 |
|
138 |
|
139 /******************************************************************************* |
|
140 * |
|
141 * FACONTROLLER Interface |
|
142 * |
|
143 ******************************************************************************/ |
|
144 program FACONTROLLER { |
|
145 version FACONTROLLER_VERSION { |
|
146 |
|
147 /* Standard Service Management */ |
|
148 int SS_STARTUPRPCSERVICE( TStartupInfo ) = 1; |
|
149 int SC_SHUTDOWNRPCSERVICE( int ) = 2; |
|
150 TComponentList LIST_DEVICES( void ) = 30; |
|
151 |
|
152 /* Create instances */ |
|
153 TResult CSTR_CREATEAGENT( void ) = 31; |
|
154 int DSTR_REMOVEAGENT( int ) = 32; |
|
155 |
|
156 /* Start and stop the mobile agent */ |
|
157 TResult STARTMOBILEAGENT( TStartAgentRequest ) = 3; |
|
158 TResult STOPMOBILEAGENT( int ) = 4; |
|
159 TResult GETMOBILEAGENTSTATUS( int ) = 5; |
|
160 |
|
161 /* Configure the agent -- must be called before starting the agent */ |
|
162 TResult SETSINGLEOPTION( TOptionDesc ) = 6; |
|
163 TResult REMOVESINGLEOPTION( TOptionDesc ) = 33; |
|
164 TResult ADDLISTOPTION( TOptionDesc ) = 7; |
|
165 TResult REMOVELISTOPTION( TOptionDesc ) = 8; |
|
166 |
|
167 /* Runtime commands */ |
|
168 TFaStatusInfo GETSTATUS( int ) = 9; |
|
169 TResult DESTROYTUNNELID( TFaTunnelID ) = 11; |
|
170 TFaTunnelList LISTTUNNELS( int ) = 12; |
|
171 TFaTunnelInfo GETTUNNELINFO( TGetTunnelRequest ) = 15; |
|
172 |
|
173 /* Set the timeout for all dynamic commands */ |
|
174 void SETTIMEOUT( TTimeoutRequest ) = 13; |
|
175 } = 7; |
|
176 } = 0x34630207; |