[packages] openl2tp: ship generated RPC sources as many distros lack support the...
[openwrt/svn-archive/archive.git] / net / openl2tp / src / l2tp_rpc_client.c
1 /*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
5
6 #include <memory.h> /* for memset */
7 #include "l2tp_rpc.h"
8 #define OPTSTRING(_var) _var.optstring_u.value
9 #define OPTSTRING_PTR(_var) ((_var.valid == 1) ? _var.optstring_u.value : NULL)
10
11 /* Default timeout can be changed using clnt_control() */
12 static struct timeval TIMEOUT = { 25, 0 };
13
14 enum clnt_stat
15 l2tp_app_info_get_1(struct l2tp_api_app_msg_data *clnt_res, CLIENT *clnt)
16 {
17 return (clnt_call (clnt, L2TP_APP_INFO_GET, (xdrproc_t) xdr_void, (caddr_t) NULL,
18 (xdrproc_t) xdr_l2tp_api_app_msg_data, (caddr_t) clnt_res,
19 TIMEOUT));
20
21 }
22
23 enum clnt_stat
24 l2tp_system_modify_1(struct l2tp_api_system_msg_data params, int *clnt_res, CLIENT *clnt)
25 {
26 return (clnt_call(clnt, L2TP_SYSTEM_MODIFY,
27 (xdrproc_t) xdr_l2tp_api_system_msg_data, (caddr_t) &params,
28 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
29 TIMEOUT));
30 }
31
32 enum clnt_stat
33 l2tp_system_get_1(struct l2tp_api_system_msg_data *clnt_res, CLIENT *clnt)
34 {
35 return (clnt_call (clnt, L2TP_SYSTEM_GET, (xdrproc_t) xdr_void, (caddr_t) NULL,
36 (xdrproc_t) xdr_l2tp_api_system_msg_data, (caddr_t) clnt_res,
37 TIMEOUT));
38
39 }
40
41 enum clnt_stat
42 l2tp_peer_profile_create_1(struct l2tp_api_peer_profile_msg_data params, int *clnt_res, CLIENT *clnt)
43 {
44 return (clnt_call(clnt, L2TP_PEER_PROFILE_CREATE,
45 (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data, (caddr_t) &params,
46 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
47 TIMEOUT));
48 }
49
50 enum clnt_stat
51 l2tp_peer_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt)
52 {
53 return (clnt_call(clnt, L2TP_PEER_PROFILE_DELETE,
54 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
55 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
56 TIMEOUT));
57 }
58
59 enum clnt_stat
60 l2tp_peer_profile_modify_1(struct l2tp_api_peer_profile_msg_data params, int *clnt_res, CLIENT *clnt)
61 {
62 return (clnt_call(clnt, L2TP_PEER_PROFILE_MODIFY,
63 (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data, (caddr_t) &params,
64 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
65 TIMEOUT));
66 }
67
68 enum clnt_stat
69 l2tp_peer_profile_get_1(char *name, struct l2tp_api_peer_profile_msg_data *clnt_res, CLIENT *clnt)
70 {
71 return (clnt_call(clnt, L2TP_PEER_PROFILE_GET,
72 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
73 (xdrproc_t) xdr_l2tp_api_peer_profile_msg_data, (caddr_t) clnt_res,
74 TIMEOUT));
75 }
76
77 enum clnt_stat
78 l2tp_peer_profile_list_1(struct l2tp_api_peer_profile_list_msg_data *clnt_res, CLIENT *clnt)
79 {
80 return (clnt_call (clnt, L2TP_PEER_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
81 (xdrproc_t) xdr_l2tp_api_peer_profile_list_msg_data, (caddr_t) clnt_res,
82 TIMEOUT));
83
84 }
85
86 enum clnt_stat
87 l2tp_tunnel_create_1(struct l2tp_api_tunnel_msg_data params, int *clnt_res, CLIENT *clnt)
88 {
89 return (clnt_call(clnt, L2TP_TUNNEL_CREATE,
90 (xdrproc_t) xdr_l2tp_api_tunnel_msg_data, (caddr_t) &params,
91 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
92 TIMEOUT));
93 }
94
95 enum clnt_stat
96 l2tp_tunnel_delete_1(uint16_t tunnel_id, optstring tunnel_name, optstring reason, int *clnt_res, CLIENT *clnt)
97 {
98 l2tp_tunnel_delete_1_argument arg;
99 arg.tunnel_id = tunnel_id;
100 arg.tunnel_name = tunnel_name;
101 arg.reason = reason;
102 return (clnt_call (clnt, L2TP_TUNNEL_DELETE, (xdrproc_t) xdr_l2tp_tunnel_delete_1_argument, (caddr_t) &arg,
103 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
104 TIMEOUT));
105 }
106
107 enum clnt_stat
108 l2tp_tunnel_modify_1(struct l2tp_api_tunnel_msg_data params, int *clnt_res, CLIENT *clnt)
109 {
110 return (clnt_call(clnt, L2TP_TUNNEL_MODIFY,
111 (xdrproc_t) xdr_l2tp_api_tunnel_msg_data, (caddr_t) &params,
112 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
113 TIMEOUT));
114 }
115
116 enum clnt_stat
117 l2tp_tunnel_get_1(uint16_t tunnel_id, optstring tunnel_name, struct l2tp_api_tunnel_msg_data *clnt_res, CLIENT *clnt)
118 {
119 l2tp_tunnel_get_1_argument arg;
120 arg.tunnel_id = tunnel_id;
121 arg.tunnel_name = tunnel_name;
122 return (clnt_call (clnt, L2TP_TUNNEL_GET, (xdrproc_t) xdr_l2tp_tunnel_get_1_argument, (caddr_t) &arg,
123 (xdrproc_t) xdr_l2tp_api_tunnel_msg_data, (caddr_t) clnt_res,
124 TIMEOUT));
125 }
126
127 enum clnt_stat
128 l2tp_tunnel_list_1(struct l2tp_api_tunnel_list_msg_data *clnt_res, CLIENT *clnt)
129 {
130 return (clnt_call (clnt, L2TP_TUNNEL_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
131 (xdrproc_t) xdr_l2tp_api_tunnel_list_msg_data, (caddr_t) clnt_res,
132 TIMEOUT));
133
134 }
135
136 enum clnt_stat
137 l2tp_tunnel_profile_create_1(struct l2tp_api_tunnel_profile_msg_data params, int *clnt_res, CLIENT *clnt)
138 {
139 return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_CREATE,
140 (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data, (caddr_t) &params,
141 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
142 TIMEOUT));
143 }
144
145 enum clnt_stat
146 l2tp_tunnel_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt)
147 {
148 return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_DELETE,
149 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
150 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
151 TIMEOUT));
152 }
153
154 enum clnt_stat
155 l2tp_tunnel_profile_modify_1(struct l2tp_api_tunnel_profile_msg_data params, int *clnt_res, CLIENT *clnt)
156 {
157 return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_MODIFY,
158 (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data, (caddr_t) &params,
159 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
160 TIMEOUT));
161 }
162
163 enum clnt_stat
164 l2tp_tunnel_profile_get_1(char *name, struct l2tp_api_tunnel_profile_msg_data *clnt_res, CLIENT *clnt)
165 {
166 return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_GET,
167 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
168 (xdrproc_t) xdr_l2tp_api_tunnel_profile_msg_data, (caddr_t) clnt_res,
169 TIMEOUT));
170 }
171
172 enum clnt_stat
173 l2tp_tunnel_profile_list_1(struct l2tp_api_tunnel_profile_list_msg_data *clnt_res, CLIENT *clnt)
174 {
175 return (clnt_call (clnt, L2TP_TUNNEL_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
176 (xdrproc_t) xdr_l2tp_api_tunnel_profile_list_msg_data, (caddr_t) clnt_res,
177 TIMEOUT));
178
179 }
180
181 enum clnt_stat
182 l2tp_session_create_1(struct l2tp_api_session_msg_data params, int *clnt_res, CLIENT *clnt)
183 {
184 return (clnt_call(clnt, L2TP_SESSION_CREATE,
185 (xdrproc_t) xdr_l2tp_api_session_msg_data, (caddr_t) &params,
186 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
187 TIMEOUT));
188 }
189
190 enum clnt_stat
191 l2tp_session_delete_1(uint16_t tunnel_id, optstring tunnel_name, uint16_t session_id, optstring session_name, optstring reason, int *clnt_res, CLIENT *clnt)
192 {
193 l2tp_session_delete_1_argument arg;
194 arg.tunnel_id = tunnel_id;
195 arg.tunnel_name = tunnel_name;
196 arg.session_id = session_id;
197 arg.session_name = session_name;
198 arg.reason = reason;
199 return (clnt_call (clnt, L2TP_SESSION_DELETE, (xdrproc_t) xdr_l2tp_session_delete_1_argument, (caddr_t) &arg,
200 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
201 TIMEOUT));
202 }
203
204 enum clnt_stat
205 l2tp_session_modify_1(struct l2tp_api_session_msg_data params, int *clnt_res, CLIENT *clnt)
206 {
207 return (clnt_call(clnt, L2TP_SESSION_MODIFY,
208 (xdrproc_t) xdr_l2tp_api_session_msg_data, (caddr_t) &params,
209 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
210 TIMEOUT));
211 }
212
213 enum clnt_stat
214 l2tp_session_get_1(uint16_t tunnel_id, optstring tunnel_name, uint16_t session_id, optstring session_name, struct l2tp_api_session_msg_data *clnt_res, CLIENT *clnt)
215 {
216 l2tp_session_get_1_argument arg;
217 arg.tunnel_id = tunnel_id;
218 arg.tunnel_name = tunnel_name;
219 arg.session_id = session_id;
220 arg.session_name = session_name;
221 return (clnt_call (clnt, L2TP_SESSION_GET, (xdrproc_t) xdr_l2tp_session_get_1_argument, (caddr_t) &arg,
222 (xdrproc_t) xdr_l2tp_api_session_msg_data, (caddr_t) clnt_res,
223 TIMEOUT));
224 }
225
226 enum clnt_stat
227 l2tp_session_list_1(uint16_t tunnel_id, optstring tunnel_name, struct l2tp_api_session_list_msg_data *clnt_res, CLIENT *clnt)
228 {
229 l2tp_session_list_1_argument arg;
230 arg.tunnel_id = tunnel_id;
231 arg.tunnel_name = tunnel_name;
232 return (clnt_call (clnt, L2TP_SESSION_LIST, (xdrproc_t) xdr_l2tp_session_list_1_argument, (caddr_t) &arg,
233 (xdrproc_t) xdr_l2tp_api_session_list_msg_data, (caddr_t) clnt_res,
234 TIMEOUT));
235 }
236
237 enum clnt_stat
238 l2tp_session_incall_ind_1(struct l2tp_api_session_incall_msg_data params, int *clnt_res, CLIENT *clnt)
239 {
240 return (clnt_call(clnt, L2TP_SESSION_INCALL_IND,
241 (xdrproc_t) xdr_l2tp_api_session_incall_msg_data, (caddr_t) &params,
242 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
243 TIMEOUT));
244 }
245
246 enum clnt_stat
247 l2tp_session_profile_create_1(struct l2tp_api_session_profile_msg_data params, int *clnt_res, CLIENT *clnt)
248 {
249 return (clnt_call(clnt, L2TP_SESSION_PROFILE_CREATE,
250 (xdrproc_t) xdr_l2tp_api_session_profile_msg_data, (caddr_t) &params,
251 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
252 TIMEOUT));
253 }
254
255 enum clnt_stat
256 l2tp_session_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt)
257 {
258 return (clnt_call(clnt, L2TP_SESSION_PROFILE_DELETE,
259 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
260 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
261 TIMEOUT));
262 }
263
264 enum clnt_stat
265 l2tp_session_profile_modify_1(struct l2tp_api_session_profile_msg_data params, int *clnt_res, CLIENT *clnt)
266 {
267 return (clnt_call(clnt, L2TP_SESSION_PROFILE_MODIFY,
268 (xdrproc_t) xdr_l2tp_api_session_profile_msg_data, (caddr_t) &params,
269 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
270 TIMEOUT));
271 }
272
273 enum clnt_stat
274 l2tp_session_profile_get_1(char *name, struct l2tp_api_session_profile_msg_data *clnt_res, CLIENT *clnt)
275 {
276 return (clnt_call(clnt, L2TP_SESSION_PROFILE_GET,
277 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
278 (xdrproc_t) xdr_l2tp_api_session_profile_msg_data, (caddr_t) clnt_res,
279 TIMEOUT));
280 }
281
282 enum clnt_stat
283 l2tp_session_profile_list_1(struct l2tp_api_session_profile_list_msg_data *clnt_res, CLIENT *clnt)
284 {
285 return (clnt_call (clnt, L2TP_SESSION_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
286 (xdrproc_t) xdr_l2tp_api_session_profile_list_msg_data, (caddr_t) clnt_res,
287 TIMEOUT));
288
289 }
290
291 enum clnt_stat
292 l2tp_ppp_profile_create_1(struct l2tp_api_ppp_profile_msg_data params, int *clnt_res, CLIENT *clnt)
293 {
294 return (clnt_call(clnt, L2TP_PPP_PROFILE_CREATE,
295 (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data, (caddr_t) &params,
296 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
297 TIMEOUT));
298 }
299
300 enum clnt_stat
301 l2tp_ppp_profile_delete_1(char *name, int *clnt_res, CLIENT *clnt)
302 {
303 return (clnt_call(clnt, L2TP_PPP_PROFILE_DELETE,
304 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
305 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
306 TIMEOUT));
307 }
308
309 enum clnt_stat
310 l2tp_ppp_profile_modify_1(struct l2tp_api_ppp_profile_msg_data params, int *clnt_res, CLIENT *clnt)
311 {
312 return (clnt_call(clnt, L2TP_PPP_PROFILE_MODIFY,
313 (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data, (caddr_t) &params,
314 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
315 TIMEOUT));
316 }
317
318 enum clnt_stat
319 l2tp_ppp_profile_get_1(char *name, struct l2tp_api_ppp_profile_msg_data *clnt_res, CLIENT *clnt)
320 {
321 return (clnt_call(clnt, L2TP_PPP_PROFILE_GET,
322 (xdrproc_t) xdr_wrapstring, (caddr_t) &name,
323 (xdrproc_t) xdr_l2tp_api_ppp_profile_msg_data, (caddr_t) clnt_res,
324 TIMEOUT));
325 }
326
327 enum clnt_stat
328 l2tp_ppp_profile_list_1(struct l2tp_api_ppp_profile_list_msg_data *clnt_res, CLIENT *clnt)
329 {
330 return (clnt_call (clnt, L2TP_PPP_PROFILE_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
331 (xdrproc_t) xdr_l2tp_api_ppp_profile_list_msg_data, (caddr_t) clnt_res,
332 TIMEOUT));
333
334 }
335
336 enum clnt_stat
337 l2tp_peer_get_1(struct l2tp_api_ip_addr local_addr, struct l2tp_api_ip_addr peer_addr, struct l2tp_api_peer_msg_data *clnt_res, CLIENT *clnt)
338 {
339 l2tp_peer_get_1_argument arg;
340 arg.local_addr = local_addr;
341 arg.peer_addr = peer_addr;
342 return (clnt_call (clnt, L2TP_PEER_GET, (xdrproc_t) xdr_l2tp_peer_get_1_argument, (caddr_t) &arg,
343 (xdrproc_t) xdr_l2tp_api_peer_msg_data, (caddr_t) clnt_res,
344 TIMEOUT));
345 }
346
347 enum clnt_stat
348 l2tp_peer_list_1(struct l2tp_api_peer_list_msg_data *clnt_res, CLIENT *clnt)
349 {
350 return (clnt_call (clnt, L2TP_PEER_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
351 (xdrproc_t) xdr_l2tp_api_peer_list_msg_data, (caddr_t) clnt_res,
352 TIMEOUT));
353
354 }
355
356 enum clnt_stat
357 l2tp_user_list_1(struct l2tp_api_user_list_msg_data *clnt_res, CLIENT *clnt)
358 {
359 return (clnt_call (clnt, L2TP_USER_LIST, (xdrproc_t) xdr_void, (caddr_t) NULL,
360 (xdrproc_t) xdr_l2tp_api_user_list_msg_data, (caddr_t) clnt_res,
361 TIMEOUT));
362
363 }
364
365 enum clnt_stat
366 l2tp_peer_profile_unset_1(struct l2tp_api_peer_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt)
367 {
368 return (clnt_call(clnt, L2TP_PEER_PROFILE_UNSET,
369 (xdrproc_t) xdr_l2tp_api_peer_profile_unset_msg_data, (caddr_t) &params,
370 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
371 TIMEOUT));
372 }
373
374 enum clnt_stat
375 l2tp_tunnel_profile_unset_1(struct l2tp_api_tunnel_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt)
376 {
377 return (clnt_call(clnt, L2TP_TUNNEL_PROFILE_UNSET,
378 (xdrproc_t) xdr_l2tp_api_tunnel_profile_unset_msg_data, (caddr_t) &params,
379 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
380 TIMEOUT));
381 }
382
383 enum clnt_stat
384 l2tp_session_profile_unset_1(struct l2tp_api_session_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt)
385 {
386 return (clnt_call(clnt, L2TP_SESSION_PROFILE_UNSET,
387 (xdrproc_t) xdr_l2tp_api_session_profile_unset_msg_data, (caddr_t) &params,
388 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
389 TIMEOUT));
390 }
391
392 enum clnt_stat
393 l2tp_ppp_profile_unset_1(struct l2tp_api_ppp_profile_unset_msg_data params, int *clnt_res, CLIENT *clnt)
394 {
395 return (clnt_call(clnt, L2TP_PPP_PROFILE_UNSET,
396 (xdrproc_t) xdr_l2tp_api_ppp_profile_unset_msg_data, (caddr_t) &params,
397 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
398 TIMEOUT));
399 }
400
401 enum clnt_stat
402 l2tp_test_log_1(char *text, int *clnt_res, CLIENT *clnt)
403 {
404 return (clnt_call(clnt, L2TP_TEST_LOG,
405 (xdrproc_t) xdr_wrapstring, (caddr_t) &text,
406 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
407 TIMEOUT));
408 }
409
410 enum clnt_stat
411 l2tp_test_modify_1(struct l2tp_api_test_msg_data params, int *clnt_res, CLIENT *clnt)
412 {
413 return (clnt_call(clnt, L2TP_TEST_MODIFY,
414 (xdrproc_t) xdr_l2tp_api_test_msg_data, (caddr_t) &params,
415 (xdrproc_t) xdr_int, (caddr_t) clnt_res,
416 TIMEOUT));
417 }
418
419 enum clnt_stat
420 l2tp_test_get_1(struct l2tp_api_test_msg_data *clnt_res, CLIENT *clnt)
421 {
422 return (clnt_call (clnt, L2TP_TEST_GET, (xdrproc_t) xdr_void, (caddr_t) NULL,
423 (xdrproc_t) xdr_l2tp_api_test_msg_data, (caddr_t) clnt_res,
424 TIMEOUT));
425
426 }