0
|
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 |
#include <rpc/rpc.h>
|
|
22 |
#include "mncontroller.h"
|
|
23 |
|
|
24 |
|
|
25 |
bool_t
|
|
26 |
xdr_mncontroller_TComponentList(xdrs, objp)
|
|
27 |
XDR *xdrs;
|
|
28 |
TComponentList *objp;
|
|
29 |
{
|
|
30 |
if (!xdr_array(xdrs, (char **)&objp->TComponentList_val, (u_int *)&objp->TComponentList_len, ~0, sizeof(int), (void*)xdr_int)) {
|
|
31 |
return (FALSE);
|
|
32 |
}
|
|
33 |
return (TRUE);
|
|
34 |
}
|
|
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
bool_t
|
|
40 |
xdr_mncontroller_TMnTunnelingMode(xdrs, objp)
|
|
41 |
XDR *xdrs;
|
|
42 |
TMnTunnelingMode *objp;
|
|
43 |
{
|
|
44 |
if (!xdr_enum(xdrs, (enum_t *)objp)) {
|
|
45 |
return (FALSE);
|
|
46 |
}
|
|
47 |
return (TRUE);
|
|
48 |
}
|
|
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
53 |
bool_t
|
|
54 |
xdr_mncontroller_TSetInterfaceErrors(xdrs, objp)
|
|
55 |
XDR *xdrs;
|
|
56 |
TSetInterfaceErrors *objp;
|
|
57 |
{
|
|
58 |
if (!xdr_enum(xdrs, (enum_t *)objp)) {
|
|
59 |
return (FALSE);
|
|
60 |
}
|
|
61 |
return (TRUE);
|
|
62 |
}
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
|
67 |
bool_t
|
|
68 |
xdr_mncontroller_TResult(xdrs, objp)
|
|
69 |
XDR *xdrs;
|
|
70 |
TResult *objp;
|
|
71 |
{
|
|
72 |
if (!xdr_int(xdrs, &objp->iServiceResult)) {
|
|
73 |
return (FALSE);
|
|
74 |
}
|
|
75 |
if (!xdr_int(xdrs, &objp->iSubComponentResult)) {
|
|
76 |
return (FALSE);
|
|
77 |
}
|
|
78 |
if (!xdr_int(xdrs, &objp->iData0)) {
|
|
79 |
return (FALSE);
|
|
80 |
}
|
|
81 |
if (!xdr_int(xdrs, &objp->iData1)) {
|
|
82 |
return (FALSE);
|
|
83 |
}
|
|
84 |
return (TRUE);
|
|
85 |
}
|
|
86 |
|
|
87 |
|
|
88 |
|
|
89 |
|
|
90 |
bool_t
|
|
91 |
xdr_mncontroller_THomeAddressDesc(xdrs, objp)
|
|
92 |
XDR *xdrs;
|
|
93 |
THomeAddressDesc *objp;
|
|
94 |
{
|
|
95 |
if (!xdr_int(xdrs, &objp->iAgentID)) {
|
|
96 |
return (FALSE);
|
|
97 |
}
|
|
98 |
if (!xdr_int(xdrs, &objp->iHomeAddressPrefix)) {
|
|
99 |
return (FALSE);
|
|
100 |
}
|
|
101 |
if (!xdr_int(xdrs, &objp->iHomeAddress)) {
|
|
102 |
return (FALSE);
|
|
103 |
}
|
|
104 |
if (!xdr_int(xdrs, &objp->iHomeAgentAddress)) {
|
|
105 |
return (FALSE);
|
|
106 |
}
|
|
107 |
if (!xdr_vector(xdrs, (char *)objp->iInterfaceName, X_MAXINTERFACENAMELEN, sizeof(char), (void*)xdr_char)) {
|
|
108 |
return (FALSE);
|
|
109 |
}
|
|
110 |
return (TRUE);
|
|
111 |
}
|
|
112 |
|
|
113 |
|
|
114 |
|
|
115 |
|
|
116 |
bool_t
|
|
117 |
xdr_mncontroller_TOptionDesc(xdrs, objp)
|
|
118 |
XDR *xdrs;
|
|
119 |
TOptionDesc *objp;
|
|
120 |
{
|
|
121 |
if (!xdr_int(xdrs, &objp->iAgentID)) {
|
|
122 |
return (FALSE);
|
|
123 |
}
|
|
124 |
if (!xdr_vector(xdrs, (char *)objp->iOptionToken, X_MAXOPTIONTOKENSIZE, sizeof(char), (void*)xdr_char)) {
|
|
125 |
return (FALSE);
|
|
126 |
}
|
|
127 |
if (!xdr_vector(xdrs, (char *)objp->iOptionValue, X_MAXOPTIONTOKENSIZE, sizeof(char), (void*)xdr_char)) {
|
|
128 |
return (FALSE);
|
|
129 |
}
|
|
130 |
if (!xdr_vector(xdrs, (char *)objp->iOptionBlockStart, X_MAXOPTIONTOKENSIZE, sizeof(char), (void*)xdr_char)) {
|
|
131 |
return (FALSE);
|
|
132 |
}
|
|
133 |
if (!xdr_vector(xdrs, (char *)objp->iOptionBlockEnd, X_MAXOPTIONTOKENSIZE, sizeof(char), (void*)xdr_char)) {
|
|
134 |
return (FALSE);
|
|
135 |
}
|
|
136 |
return (TRUE);
|
|
137 |
}
|
|
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
|
142 |
bool_t
|
|
143 |
xdr_mncontroller_TTunnelingModeDesc(xdrs, objp)
|
|
144 |
XDR *xdrs;
|
|
145 |
TTunnelingModeDesc *objp;
|
|
146 |
{
|
|
147 |
if (!xdr_int(xdrs, &objp->iAgentID)) {
|
|
148 |
return (FALSE);
|
|
149 |
}
|
|
150 |
if (!xdr_mncontroller_TMnTunnelingMode(xdrs, &objp->iTunnelMode)) {
|
|
151 |
return (FALSE);
|
|
152 |
}
|
|
153 |
return (TRUE);
|
|
154 |
}
|
|
155 |
|
|
156 |
|
|
157 |
|
|
158 |
|
|
159 |
bool_t
|
|
160 |
xdr_mncontroller_TPolicyRequest(xdrs, objp)
|
|
161 |
XDR *xdrs;
|
|
162 |
TPolicyRequest *objp;
|
|
163 |
{
|
|
164 |
if (!xdr_int(xdrs, &objp->iAgentID)) {
|
|
165 |
return (FALSE);
|
|
166 |
}
|
|
167 |
if (!xdr_int(xdrs, &objp->iPolicy)) {
|
|
168 |
return (FALSE);
|
|
169 |
}
|
|
170 |
return (TRUE);
|
|
171 |
}
|
|
172 |
|
|
173 |
|
|
174 |
|
|
175 |
|
|
176 |
bool_t
|
|
177 |
xdr_mncontroller_TForeignAgentInfoRequest(xdrs, objp)
|
|
178 |
XDR *xdrs;
|
|
179 |
TForeignAgentInfoRequest *objp;
|
|
180 |
{
|
|
181 |
if (!xdr_int(xdrs, &objp->iAgentID)) {
|
|
182 |
return (FALSE);
|
|
183 |
}
|
|
184 |
if (!xdr_int(xdrs, &objp->iForeignAgentID)) {
|
|
185 |
return (FALSE);
|
|
186 |
}
|
|
187 |
return (TRUE);
|
|
188 |
}
|
|
189 |
|
|
190 |
|
|
191 |
|
|
192 |
|
|
193 |
bool_t
|
|
194 |
xdr_mncontroller_TTimeoutRequest(xdrs, objp)
|
|
195 |
XDR *xdrs;
|
|
196 |
TTimeoutRequest *objp;
|
|
197 |
{
|
|
198 |
if (!xdr_int(xdrs, &objp->iAgentID)) {
|
|
199 |
return (FALSE);
|
|
200 |
}
|
|
201 |
if (!xdr_int(xdrs, &objp->iTimeout)) {
|
|
202 |
return (FALSE);
|
|
203 |
}
|
|
204 |
return (TRUE);
|
|
205 |
}
|
|
206 |
|
|
207 |
|
|
208 |
|
|
209 |
|
|
210 |
bool_t
|
|
211 |
xdr_mncontroller_TMobileNodeStatus(xdrs, objp)
|
|
212 |
XDR *xdrs;
|
|
213 |
TMobileNodeStatus *objp;
|
|
214 |
{
|
|
215 |
if (!xdr_mncontroller_TResult(xdrs, &objp->iCallResult)) {
|
|
216 |
return (FALSE);
|
|
217 |
}
|
|
218 |
if (!xdr_int(xdrs, &objp->iConnected)) {
|
|
219 |
return (FALSE);
|
|
220 |
}
|
|
221 |
if (!xdr_int(xdrs, &objp->iTunnelUp)) {
|
|
222 |
return (FALSE);
|
|
223 |
}
|
|
224 |
if (!xdr_u_int(xdrs, &objp->iLocalAddress)) {
|
|
225 |
return (FALSE);
|
|
226 |
}
|
|
227 |
if (!xdr_u_int(xdrs, &objp->iColocatedAddress)) {
|
|
228 |
return (FALSE);
|
|
229 |
}
|
|
230 |
if (!xdr_u_int(xdrs, &objp->iForeignAgentAddress)) {
|
|
231 |
return (FALSE);
|
|
232 |
}
|
|
233 |
if (!xdr_u_int(xdrs, &objp->iHomeAgentAddress)) {
|
|
234 |
return (FALSE);
|
|
235 |
}
|
|
236 |
if (!xdr_u_int(xdrs, &objp->iHomeAddress)) {
|
|
237 |
return (FALSE);
|
|
238 |
}
|
|
239 |
if (!xdr_int(xdrs, &objp->iLifetimeRemaining)) {
|
|
240 |
return (FALSE);
|
|
241 |
}
|
|
242 |
if (!xdr_int(xdrs, &objp->iTunnelMode)) {
|
|
243 |
return (FALSE);
|
|
244 |
}
|
|
245 |
if (!xdr_int(xdrs, &objp->iSecondsSinceLastRequest)) {
|
|
246 |
return (FALSE);
|
|
247 |
}
|
|
248 |
if (!xdr_int(xdrs, &objp->iSecondsSinceLastReply)) {
|
|
249 |
return (FALSE);
|
|
250 |
}
|
|
251 |
if (!xdr_int(xdrs, &objp->iReplyCode)) {
|
|
252 |
return (FALSE);
|
|
253 |
}
|
|
254 |
if (!xdr_vector(xdrs, (char *)objp->iInfoText, X_MAXINFOLEN, sizeof(char), (void*)xdr_char)) {
|
|
255 |
return (FALSE);
|
|
256 |
}
|
|
257 |
if (!xdr_vector(xdrs, (char *)objp->iLastErrorString, X_MAXERRORSTRING, sizeof(char), (void*)xdr_char)) {
|
|
258 |
return (FALSE);
|
|
259 |
}
|
|
260 |
return (TRUE);
|
|
261 |
}
|
|
262 |
|
|
263 |
|
|
264 |
|
|
265 |
|
|
266 |
bool_t
|
|
267 |
xdr_mncontroller_TForeignAgentInfo(xdrs, objp)
|
|
268 |
XDR *xdrs;
|
|
269 |
TForeignAgentInfo *objp;
|
|
270 |
{
|
|
271 |
if (!xdr_mncontroller_TResult(xdrs, &objp->iCallResult)) {
|
|
272 |
return (FALSE);
|
|
273 |
}
|
|
274 |
if (!xdr_u_int(xdrs, &objp->iForeignAgentAddress)) {
|
|
275 |
return (FALSE);
|
|
276 |
}
|
|
277 |
if (!xdr_vector(xdrs, (char *)objp->iInterfaceName, X_MAXINTERFACENAMELEN, sizeof(char), (void*)xdr_char)) {
|
|
278 |
return (FALSE);
|
|
279 |
}
|
|
280 |
if (!xdr_int(xdrs, &objp->iPriority)) {
|
|
281 |
return (FALSE);
|
|
282 |
}
|
|
283 |
if (!xdr_int(xdrs, &objp->iInUse)) {
|
|
284 |
return (FALSE);
|
|
285 |
}
|
|
286 |
if (!xdr_int(xdrs, &objp->iInterfaceIndex)) {
|
|
287 |
return (FALSE);
|
|
288 |
}
|
|
289 |
if (!xdr_int(xdrs, &objp->iLastAdvertisement)) {
|
|
290 |
return (FALSE);
|
|
291 |
}
|
|
292 |
if (!xdr_vector(xdrs, (char *)objp->iNAI, X_MAXNAILEN, sizeof(char), (void*)xdr_char)) {
|
|
293 |
return (FALSE);
|
|
294 |
}
|
|
295 |
if (!xdr_int(xdrs, &objp->iAdvertisementExpiry)) {
|
|
296 |
return (FALSE);
|
|
297 |
}
|
|
298 |
return (TRUE);
|
|
299 |
}
|
|
300 |
|
|
301 |
|
|
302 |
|
|
303 |
|
|
304 |
bool_t
|
|
305 |
xdr_mncontroller_TForeignAgentList(xdrs, objp)
|
|
306 |
XDR *xdrs;
|
|
307 |
TForeignAgentList *objp;
|
|
308 |
{
|
|
309 |
if (!xdr_array(xdrs, (char **)&objp->TForeignAgentList_val, (u_int *)&objp->TForeignAgentList_len, ~0, sizeof(TForeignAgentInfo), (void*)xdr_mncontroller_TForeignAgentInfo)) {
|
|
310 |
return (FALSE);
|
|
311 |
}
|
|
312 |
return (TRUE);
|
|
313 |
}
|
|
314 |
|
|
315 |
|