Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / lib / tt / lib / db / db_server_xdr.C
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 //%%  (c) Copyright 1993, 1994 Hewlett-Packard Company                  
24 //%%  (c) Copyright 1993, 1994 International Business Machines Corp.    
25 //%%  (c) Copyright 1993, 1994 Sun Microsystems, Inc.                   
26 //%%  (c) Copyright 1993, 1994 Novell, Inc.                             
27 //%%  $XConsortium: db_server_xdr.C /main/4 1996/01/30 16:08:48 barstow $                                                       
28 /*
29  * @(#)db_server_xdr.C  1.19 95/01/06
30  *
31  * Tool Talk Database Server
32  *
33  * Copyright (c) 1992 by Sun Microsystems, Inc.
34  *
35  * This file contains xdr functions for the db server's rpc procedures.
36  */
37
38 #include <isam.h>
39
40 #include "db/db_server.h"
41
42 bool_t
43 xdr_keypart(XDR *xdrs, keypart *objp)
44 {
45         if (!xdr_u_short(xdrs, &objp->kp_start)) {
46                 return (FALSE);
47         }
48         if (!xdr_short(xdrs, &objp->kp_leng)) {
49                 return (FALSE);
50         }
51         if (!xdr_short(xdrs, &objp->kp_type)) {
52                 return (FALSE);
53         }
54         return (TRUE);
55 }
56
57 bool_t
58 xdr_keydesc(XDR *xdrs, keydesc *objp)
59 {
60         if (!xdr_short(xdrs, &objp->k_flags)) {
61                 return (FALSE);
62         }
63         if (!xdr_short(xdrs, &objp->k_nparts)) {
64                 return (FALSE);
65         }
66         if (!xdr_vector(xdrs, (char *)objp->k_part, 8, sizeof(keypart),
67                         (xdrproc_t) xdr_keypart)) {
68                 return (FALSE);
69         }
70         return (TRUE);
71 }
72
73 bool_t
74 xdr_Tt_isam_results(XDR *xdrs, _Tt_isam_results *objp)
75 {
76         if (!xdr_int(xdrs, &objp->result)) {
77                 return (FALSE);
78         }
79         if (!xdr_int(xdrs, &objp->iserrno)) {
80                 return (FALSE);
81         }
82         return (TRUE);
83 }
84
85 bool_t
86 xdr_Tt_isaddindex_args(XDR *xdrs, _Tt_isaddindex_args *objp)
87 {
88         if (!xdr_int(xdrs, &objp->isfd)) {
89                 return (FALSE);
90         }
91         if (!xdr_pointer(xdrs, (char **)&objp->key, sizeof(keydesc),
92                          (xdrproc_t) xdr_keydesc)) {
93                 return (FALSE);
94         }
95         return (TRUE);
96 }
97
98 bool_t
99 xdr_Tt_isbuild_args(XDR *xdrs, _Tt_isbuild_args *objp)
100 {
101         if (!xdr_string(xdrs, &objp->path, 1024)) {
102                 return (FALSE);
103         }
104         if (!xdr_int(xdrs, &objp->reclen)) {
105                 return (FALSE);
106         }
107         if (!xdr_pointer(xdrs, (char **)&objp->key, sizeof(keydesc),
108                          (xdrproc_t) xdr_keydesc)) {
109                 return (FALSE);
110         }
111         if (!xdr_int(xdrs, &objp->mode)) {
112                 return (FALSE);
113         }
114         if (!xdr_int(xdrs, &objp->isreclen)) {
115                 return (FALSE);
116         }
117         return (TRUE);
118 }
119
120 bool_t
121 xdr_Tt_iscntl_args(XDR *xdrs, _Tt_iscntl_args *objp)
122 {
123         if (!xdr_int(xdrs, &objp->isfd)) {
124                 return (FALSE);
125         }
126         if (!xdr_int(xdrs, &objp->func)) {
127                 return (FALSE);
128         }
129         if (!xdr_array(xdrs, (char **)&objp->arg.arg_val, (u_int *)&objp->arg.arg_len, ISAPPLMAGICLEN, sizeof(char), (xdrproc_t)xdr_char)) {
130                 return (FALSE);
131         }
132         return (TRUE);
133 }
134
135 bool_t
136 xdr_Tt_iscntl_results(XDR *xdrs, _Tt_iscntl_results *objp)
137 {
138         if (!xdr_int(xdrs, &objp->result)) {
139                 return (FALSE);
140         }
141         if (!xdr_int(xdrs, &objp->iserrno)) {
142                 return (FALSE);
143         }
144         if (!xdr_array(xdrs, (char **)&objp->arg.arg_val, (u_int *)&objp->arg.arg_len, ISAPPLMAGICLEN, sizeof(char), (xdrproc_t)xdr_char)) {
145                 return (FALSE);
146         }
147         return TRUE;
148 }
149
150 bool_t
151 xdr_Tt_isdelrec_args(XDR *xdrs, _Tt_isdelrec_args *objp)
152 {
153         if (!xdr_int(xdrs, &objp->isfd)) {
154                 return (FALSE);
155         }
156         if (!xdr_long(xdrs, &objp->recnum)) {
157                 return (FALSE);
158         }
159         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, 8192, sizeof(char), (xdrproc_t)xdr_char)) {
160                 return (FALSE);
161         }
162         return (TRUE);
163 }
164
165 bool_t
166 xdr_Tt_isopen_args(XDR *xdrs, _Tt_isopen_args *objp)
167 {
168         if (!xdr_string(xdrs, &objp->path, 1024)) {
169                 return (FALSE);
170         }
171         if (!xdr_int(xdrs, &objp->mode)) {
172                 return (FALSE);
173         }
174         return (TRUE);
175 }
176
177 bool_t
178 xdr_Tt_isread_args(XDR *xdrs, _Tt_isread_args *objp)
179 {
180         if (!xdr_int(xdrs, &objp->isfd)) {
181                 return (FALSE);
182         }
183         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t) xdr_char)) {
184                 return (FALSE);
185         }
186         if (!xdr_int(xdrs, &objp->mode)) {
187                 return (FALSE);
188         }
189         if (!xdr_long(xdrs, &objp->isrecnum)) {
190                 return (FALSE);
191         }
192         return (TRUE);
193 }
194
195 bool_t
196 xdr_Tt_isread_results(XDR *xdrs, _Tt_isread_results *objp)
197 {
198         if (!xdr_Tt_isam_results(xdrs, &objp->isresult)) {
199                 return (FALSE);
200         }
201         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t) xdr_char)) {
202                 return (FALSE);
203         }
204         if (!xdr_int(xdrs, &objp->isreclen)) {
205                 return (FALSE);
206         }
207         if (!xdr_long(xdrs, &objp->isrecnum)) {
208                 return (FALSE);
209         }
210         return (TRUE);
211 }
212
213 bool_t
214 xdr_Tt_isrewrec_args(XDR *xdrs, _Tt_isrewrec_args *objp)
215 {
216         if (!xdr_int(xdrs, &objp->isfd)) {
217                 return (FALSE);
218         }
219         if (!xdr_long(xdrs, &objp->recnum)) {
220                 return (FALSE);
221         }
222         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t)xdr_char)) {
223                 return (FALSE);
224         }
225         return (TRUE);
226 }
227
228 bool_t
229 xdr_Tt_isstart_args(XDR *xdrs, _Tt_isstart_args *objp)
230 {
231         if (!xdr_int(xdrs, &objp->isfd)) {
232                 return (FALSE);
233         }
234         if (!xdr_pointer(xdrs, (char **)&objp->key, sizeof(keydesc),
235                          (xdrproc_t)
236                          xdr_keydesc)) {
237                 return (FALSE);
238         }
239         if (!xdr_int(xdrs, &objp->key_len)) {
240                 return (FALSE);
241         }
242         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t)xdr_char)) {
243                 return (FALSE);
244         }
245         if (!xdr_int(xdrs, &objp->mode)) {
246                 return (FALSE);
247         }
248         return (TRUE);
249 }
250
251 bool_t
252 xdr_Tt_test_and_set_args(XDR *xdrs, _Tt_test_and_set_args *objp)
253 {
254         if (!xdr_int(xdrs, &objp->isfd)) {
255                 return (FALSE);
256         }
257         if (!xdr_pointer(xdrs, (char **)&objp->key, sizeof(keydesc),
258                          (xdrproc_t)xdr_keydesc)) {
259                 return (FALSE);
260         }
261         if (!xdr_int(xdrs, &objp->key_len)) {
262                 return (FALSE);
263         }
264         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t)xdr_char)) {
265                 return (FALSE);
266         }
267         return (TRUE);
268 }
269
270 bool_t
271 xdr_Tt_test_and_set_results(XDR *xdrs, _Tt_test_and_set_results *objp)
272 {
273         if (!xdr_Tt_isam_results(xdrs, &objp->isresult)) {
274                 return (FALSE);
275         }
276         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t)xdr_char)) {
277                 return (FALSE);
278         }
279         if (!xdr_int(xdrs, &objp->isreclen)) {
280                 return (FALSE);
281         }
282         if (!xdr_long(xdrs, &objp->isrecnum)) {
283                 return (FALSE);
284         }
285         return (TRUE);
286 }
287
288
289 bool_t xdr_tt_file_netfile_args(XDR * xdrs, _tt_file_netfile_args * argp)
290 {
291         if (!xdr_string(xdrs, &argp->file_or_netfile, ~0)) {
292                 return (FALSE);
293         }
294         return (TRUE);
295 }
296
297 bool_t
298 xdr_tt_file_netfile_results(XDR * xdrs, _tt_file_netfile_results * argp)
299 {
300         if (!xdr_string(xdrs, &argp->result_string, ~0)) {
301                 return (FALSE);
302         }
303         if (!xdr_tt_db_results(xdrs, &argp->results)) {
304                 return (FALSE);
305         }
306         if (!xdr_int(xdrs, &argp->tt_status)) {
307                 return (FALSE);
308         }
309         return (TRUE);
310 }
311
312
313 bool_t
314 xdr_Tt_trans_record_list(XDR *xdrs, _Tt_trans_record_list *objp)
315 {
316         if (!xdr_pointer(xdrs, (char **)objp, sizeof(struct _Tt_trans_record),
317                          (xdrproc_t)xdr_Tt_trans_record)) {
318                 return (FALSE);
319         }
320         return (TRUE);
321 }
322
323 bool_t
324 xdr_Tt_trans_record(XDR *xdrs, _Tt_trans_record *objp)
325 {
326         if (!xdr_int(xdrs, &objp->newp)) {
327                 return (FALSE);
328         }
329         if (!xdr_long(xdrs, &objp->recnum)) {
330                 return (FALSE);
331         }
332         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t)xdr_char)) {
333                 return (FALSE);
334         }
335         if (!xdr_Tt_trans_record_list(xdrs, &objp->next)) {
336                 return (FALSE);
337         }
338         return TRUE;
339 }
340
341 bool_t
342 xdr_Tt_transaction_args(XDR *xdrs, _Tt_transaction_args *objp)
343 {
344         if (!xdr_int(xdrs, &objp->isfd)) {
345                 return (FALSE);
346         }
347         if (!xdr_Tt_trans_record_list(xdrs, &objp->recs)) {
348                 return (FALSE);
349         }
350         return (TRUE);
351 }
352
353 bool_t
354 xdr_Tt_iswrite_args(XDR *xdrs,  _Tt_iswrite_args *objp)
355 {
356         if (!xdr_int(xdrs, &objp->isfd)) {
357                 return (FALSE);
358         }
359         if (!xdr_array(xdrs, (char **)&objp->rec.rec_val, (u_int *)&objp->rec.rec_len, ISMAXRECLEN, sizeof(char), (xdrproc_t)xdr_char)) {
360                 return (FALSE);
361         }
362         return (TRUE);
363 }
364
365 bool_t
366 xdr_Tt_oidaccess_args(XDR *xdrs, _Tt_oidaccess_args *objp)
367 {
368         if (!xdr_int(xdrs, &objp->isfd)) {
369                 return (FALSE);
370         }
371         if (!xdr_array(xdrs, (char **)&objp->key.key_val, (u_int *)&objp->key.key_len, OID_KEY_LENGTH, sizeof(char), (xdrproc_t)xdr_char)) {
372                 return (FALSE);
373         }
374         if (!xdr_short(xdrs, (short *)&objp->value)) {
375                 return (FALSE);
376         }
377         return (TRUE);
378 }
379
380 bool_t
381 xdr_Tt_oidaccess_results(XDR *xdrs, _Tt_oidaccess_results *objp)
382 {
383 #ifdef __osf__
384         if (!xdr_u_int(xdrs, (u_int *)&objp->uid)) {
385                 return (FALSE);
386         }
387         if (!xdr_u_int(xdrs, (u_int *)&objp->group)) {
388                 return (FALSE);
389         }
390         if (!xdr_u_int(xdrs, (u_int *)&objp->mode)) {
391                 return (FALSE);
392         }
393 #else
394         if (!xdr_long(xdrs, (long *)&objp->uid)) {
395                 return (FALSE);
396         }
397         if (!xdr_long(xdrs, (long *)&objp->group)) {
398                 return (FALSE);
399         }
400         if (!xdr_short(xdrs, (short *)&objp->mode)) {
401                 return (FALSE);
402         }
403 #endif
404         if (!xdr_int(xdrs, &objp->result)) {
405                 return (FALSE);
406         }
407         if (!xdr_int(xdrs, &objp->iserrno)) {
408                 return (FALSE);
409         }
410         return (TRUE);
411 }
412
413 bool_t
414 xdr_Tt_prop(XDR *xdrs, _Tt_prop *objp)
415 {
416         if (!xdr_array(xdrs, (char **)&objp->propname.propname_val, (u_int *)&objp->propname.propname_len, ~0, sizeof(char), (xdrproc_t)xdr_char)) {
417                 return (FALSE);
418         }
419         if (!xdr_long(xdrs, &objp->recnum)) {
420                 return (FALSE);
421         }
422         if (!xdr_array(xdrs, (char **)&objp->value.value_val, (u_int *)&objp->value.value_len, 8192, sizeof(char), (xdrproc_t)xdr_char)) {
423                 return (FALSE);
424         }
425         return (TRUE);
426 }
427
428 bool_t
429 xdr_Tt_spec_props(XDR *xdrs, _Tt_spec_props *objp)
430 {
431         if (!xdr_int(xdrs, &objp->isfd)) {
432                 return (FALSE);
433         }
434         if (!xdr_pointer(xdrs, (char **)&objp->key, sizeof(keydesc), (xdrproc_t)xdr_keydesc)) {
435                 return (FALSE);
436         }
437         if (!xdr_int(xdrs, &objp->key_len)) {
438                 return (FALSE);
439         }
440         if (!xdr_array(xdrs, (char **)&objp->oidkey.oidkey_val, (u_int *)&objp->oidkey.oidkey_len, OID_KEY_LENGTH, sizeof(char), (xdrproc_t)xdr_char)) {
441                 return (FALSE);
442         }
443         if (!xdr_array(xdrs, (char **)&objp->props.props_val, (u_int *)&objp->props.props_len, ~0, sizeof(_Tt_prop), (xdrproc_t)xdr_Tt_prop)) {
444                 return (FALSE);
445         }
446         if (!xdr_int(xdrs, &objp->result)) {
447                 return (FALSE);
448         }
449         if (!xdr_int(xdrs, &objp->iserrno)) {
450                 return (FALSE);
451         }
452         return (TRUE);
453 }
454
455 bool_t
456 xdr_Tt_session_args(XDR *xdrs, _Tt_session_args *objp)
457 {
458         if (!xdr_int(xdrs, &objp->isfd)) {
459                 return (FALSE);
460         }
461         if (!xdr_pointer(xdrs, (char **)&objp->key, sizeof(keydesc), (xdrproc_t)xdr_keydesc)) {
462                 return (FALSE);
463         }
464         if (!xdr_int(xdrs, &objp->key_len)) {
465                 return (FALSE);
466         }
467         if (!xdr_array(xdrs, (char **)&objp->oidkey.oidkey_val, (u_int *)&objp->oidkey.oidkey_len, OID_KEY_LENGTH, sizeof(char), (xdrproc_t)xdr_char)) {
468                 return (FALSE);
469         }
470         if (!xdr_array(xdrs, (char **)&objp->session.session_val, (u_int *)&objp->session.session_len, ~0, sizeof(char), (xdrproc_t)xdr_char)) {
471                 return (FALSE);
472         }
473         return (TRUE);
474 }
475
476 bool_t
477 xdr_tt_db_results(XDR *xdrs, _tt_db_results *objp)
478 {
479         if (!xdr_enum(xdrs, (enum_t *)objp)) {
480                 return (FALSE);
481         }
482         return (TRUE);
483 }
484
485 bool_t
486 xdr_tt_string(XDR *xdrs, _tt_string *objp)
487 {
488         if (!xdr_string(xdrs, &objp->value, ~0)) {
489                 return (FALSE);
490         }
491         return (TRUE);
492 }
493
494 bool_t
495 xdr_tt_property_value(XDR *xdrs, _tt_property_value *objp)
496 {
497         if (!xdr_bytes(xdrs, (char **)&objp->value.value_val, (u_int *)&objp->value.value_len, ~0)) {
498                 return (FALSE);
499         }
500         return (TRUE);
501 }
502
503 bool_t
504 xdr_tt_property(XDR *xdrs, _tt_property *objp)
505 {
506         if (!xdr_string(xdrs, &objp->name, ~0)) {
507                 return (FALSE);
508         }
509         if (!xdr_array(xdrs, (char **)&objp->values.values_val, (u_int *)&objp->values.values_len, ~0, sizeof(_tt_property_value), (xdrproc_t)xdr_tt_property_value)) {
510                 return (FALSE);
511         }
512         return (TRUE);
513 }
514
515 bool_t
516 xdr_tt_access(XDR *xdrs, _tt_access *objp)
517 {
518 #ifdef __osf__
519         if (!xdr_u_int(xdrs, (u_int *)&objp->user)) {
520 #else
521         if (!xdr_long(xdrs, (long *)&objp->user)) {
522 #endif /* __osf__ */
523                 return (FALSE);
524         }
525 #ifdef __osf__
526         if (!xdr_u_int(xdrs, (u_int *)&objp->group)) {
527 #else
528         if (!xdr_long(xdrs, (long *)&objp->group)) {
529 #endif /* __osf__ */
530                 return (FALSE);
531         }
532 #ifdef __osf__
533         if (!xdr_u_int(xdrs, (u_int *)&objp->mode)) {
534 #else
535         if (!xdr_u_long(xdrs, (unsigned long *)&objp->mode)) {
536 #endif /* __osf__ */
537                 return (FALSE);
538         }
539         return (TRUE);
540 }
541
542 bool_t
543 xdr_tt_message(XDR *xdrs, _tt_message *objp)
544 {
545         if (!xdr_bytes(xdrs, (char **)&objp->body.body_val, (u_int *)&objp->body.body_len, ~0)) {
546                 return (FALSE);
547         }
548         return (TRUE);
549 }
550
551 bool_t
552 xdr_tt_create_file_args(XDR *xdrs, _tt_create_file_args *objp)
553 {
554         if (!xdr_string(xdrs, &objp->file, ~0)) {
555                 return (FALSE);
556         }
557         if (!xdr_array(xdrs, (char **)&objp->properties.properties_val, (u_int *)&objp->properties.properties_len, ~0, sizeof(_tt_property), (xdrproc_t)xdr_tt_property)) {
558                 return (FALSE);
559         }
560         if (!xdr_tt_access(xdrs, &objp->access)) {
561                 return (FALSE);
562         }
563         return (TRUE);
564 }
565
566 bool_t
567 xdr_tt_create_obj_args(XDR *xdrs, _tt_create_obj_args *objp)
568 {
569         if (!xdr_string(xdrs, &objp->file, ~0)) {
570                 return (FALSE);
571         }
572         if (!xdr_string(xdrs, &objp->objid, ~0)) {
573                 return (FALSE);
574         }
575         if (!xdr_string(xdrs, &objp->otype, ~0)) {
576                 return (FALSE);
577         }
578         if (!xdr_array(xdrs, (char **)&objp->properties.properties_val, (u_int *)&objp->properties.properties_len, ~0, sizeof(_tt_property), (xdrproc_t)xdr_tt_property)) {
579                 return (FALSE);
580         }
581         if (!xdr_tt_access(xdrs, &objp->access)) {
582                 return (FALSE);
583         }
584         return (TRUE);
585 }
586
587 bool_t   
588 xdr_tt_remove_file_args(XDR *xdrs, _tt_remove_file_args *objp)
589 {
590         if (!xdr_string(xdrs, &objp->file, ~0)) {
591                 return (FALSE);
592         }
593         if (!xdr_tt_access(xdrs, &objp->access)) {
594                 return (FALSE);
595         }
596         return (TRUE);
597 }
598  
599 bool_t
600 xdr_tt_remove_obj_args(XDR *xdrs, _tt_remove_obj_args *objp)
601 {
602         if (!xdr_string(xdrs, &objp->objid, ~0)) {
603                 return (FALSE);
604         }
605         if (!xdr_string(xdrs, &objp->forward_pointer, ~0)) {
606                 return (FALSE);
607         }
608         if (!xdr_tt_access(xdrs, &objp->access)) {
609                 return (FALSE);
610         }
611         return (TRUE);
612 }
613
614 bool_t
615 xdr_tt_move_file_args(XDR *xdrs, _tt_move_file_args *objp)
616 {
617         if (!xdr_string(xdrs, &objp->file, ~0)) {
618                 return (FALSE);
619         }
620         if (!xdr_string(xdrs, &objp->new_file, ~0)) {
621                 return (FALSE);
622         }
623         if (!xdr_tt_access(xdrs, &objp->access)) {
624                 return (FALSE);
625         }
626         return (TRUE);
627 }
628
629 bool_t
630 xdr_tt_set_file_prop_args(XDR *xdrs, _tt_set_file_prop_args *objp)
631 {
632         if (!xdr_string(xdrs, &objp->file, ~0)) {
633                 return (FALSE);
634         }
635         if (!xdr_tt_property(xdrs, &objp->property)) {
636                 return (FALSE);
637         }
638         if (!xdr_tt_access(xdrs, &objp->access)) {
639                 return (FALSE);
640         }
641         return (TRUE);
642 }
643
644 bool_t
645 xdr_tt_set_file_props_args(XDR *xdrs, _tt_set_file_props_args *objp)
646 {
647         if (!xdr_string(xdrs, &objp->file, ~0)) {
648                 return (FALSE);
649         }
650         if (!xdr_array(xdrs, (char **)&objp->properties.properties_val, (u_int *)&objp->properties.properties_len, ~0, sizeof(_tt_property), (xdrproc_t)xdr_tt_property)) {
651                 return (FALSE);
652         }
653         if (!xdr_tt_access(xdrs, &objp->access)) {
654                 return (FALSE);
655         }
656         return (TRUE);
657 }
658
659 bool_t
660 xdr_tt_add_file_prop_args(XDR *xdrs, _tt_add_file_prop_args *objp)
661 {
662         if (!xdr_string(xdrs, &objp->file, ~0)) {
663                 return (FALSE);
664         }
665         if (!xdr_tt_property(xdrs, &objp->property)) {
666                 return (FALSE);
667         }
668         if (!xdr_int(xdrs, &objp->unique)) {
669                 return (FALSE);
670         }
671         if (!xdr_tt_access(xdrs, &objp->access)) {
672                 return (FALSE);
673         }
674         return (TRUE);
675 }
676
677 bool_t
678 xdr_tt_del_file_prop_args(XDR *xdrs, _tt_del_file_prop_args *objp)
679 {
680         if (!xdr_string(xdrs, &objp->file, ~0)) {
681                 return (FALSE);
682         }
683         if (!xdr_tt_property(xdrs, &objp->property)) {
684                 return (FALSE);
685         }
686         if (!xdr_tt_access(xdrs, &objp->access)) {
687                 return (FALSE);
688         }
689         return (TRUE);
690 }
691
692 bool_t
693 xdr_tt_get_file_prop_args(XDR *xdrs, _tt_get_file_prop_args *objp)
694 {
695         if (!xdr_string(xdrs, &objp->file, ~0)) {
696                 return (FALSE);
697         }
698         if (!xdr_string(xdrs, &objp->name, ~0)) {
699                 return (FALSE);
700         }
701         if (!xdr_tt_access(xdrs, &objp->access)) {
702                 return (FALSE);
703         }
704         if (!xdr_int(xdrs, &objp->cache_level)) {
705                 return (FALSE);
706         }
707         return (TRUE);
708 }
709
710 bool_t
711 xdr_tt_get_file_props_args(XDR *xdrs, _tt_get_file_props_args *objp)
712 {
713         if (!xdr_string(xdrs, &objp->file, ~0)) {
714                 return (FALSE);
715         }
716         if (!xdr_tt_access(xdrs, &objp->access)) {
717                 return (FALSE);
718         }
719         if (!xdr_int(xdrs, &objp->cache_level)) {
720                 return (FALSE);
721         }
722         return (TRUE);
723 }
724
725 bool_t
726 xdr_tt_get_file_objs_args(XDR *xdrs, _tt_get_file_objs_args *objp)
727 {
728         if (!xdr_string(xdrs, &objp->file, ~0)) {
729                 return (FALSE);
730         }
731         if (!xdr_tt_access(xdrs, &objp->access)) {
732                 return (FALSE);
733         }
734         if (!xdr_int(xdrs, &objp->cache_level)) {
735                 return (FALSE);
736         }
737         return (TRUE);
738 }
739
740 bool_t
741 xdr_tt_set_file_access_args(XDR *xdrs, _tt_set_file_access_args *objp)
742 {
743         if (!xdr_string(xdrs, &objp->file, ~0)) {
744                 return (FALSE);
745         }
746         if (!xdr_tt_access(xdrs, &objp->new_access)) {
747                 return (FALSE);
748         }
749         if (!xdr_tt_access(xdrs, &objp->access)) {
750                 return (FALSE);
751         }
752         return (TRUE);
753 }
754
755 bool_t
756 xdr_tt_get_file_access_args(XDR *xdrs, _tt_get_file_access_args *objp)
757 {
758         if (!xdr_string(xdrs, &objp->file, ~0)) {
759                 return (FALSE);
760         }
761         if (!xdr_tt_access(xdrs, &objp->access)) {
762                 return (FALSE);
763         }
764         return (TRUE);
765 }
766
767 bool_t
768 xdr_tt_set_obj_prop_args(XDR *xdrs, _tt_set_obj_prop_args *objp)
769 {
770         if (!xdr_string(xdrs, &objp->objid, ~0)) {
771                 return (FALSE);
772         }
773         if (!xdr_tt_property(xdrs, &objp->property)) {
774                 return (FALSE);
775         }
776         if (!xdr_tt_access(xdrs, &objp->access)) {
777                 return (FALSE);
778         }
779         if (!xdr_int(xdrs, &objp->cache_level)) {
780                 return (FALSE);
781         }
782         return (TRUE);
783 }
784
785 bool_t
786 xdr_tt_set_obj_props_args(XDR *xdrs, _tt_set_obj_props_args *objp)
787 {
788         if (!xdr_string(xdrs, &objp->objid, ~0)) {
789                 return (FALSE);
790         }
791         if (!xdr_array(xdrs, (char **)&objp->properties.properties_val, (u_int *)&objp->properties.properties_len, ~0, sizeof(_tt_property), (xdrproc_t)xdr_tt_property)) {
792                 return (FALSE);
793         }
794         if (!xdr_tt_access(xdrs, &objp->access)) {
795                 return (FALSE);
796         }
797         if (!xdr_int(xdrs, &objp->cache_level)) {
798                 return (FALSE);
799         }
800         return (TRUE);
801 }
802
803 bool_t
804 xdr_tt_add_obj_prop_args(XDR *xdrs, _tt_add_obj_prop_args *objp)
805 {
806         if (!xdr_string(xdrs, &objp->objid, ~0)) {
807                 return (FALSE);
808         }
809         if (!xdr_tt_property(xdrs, &objp->property)) {
810                 return (FALSE);
811         }
812         if (!xdr_int(xdrs, &objp->unique)) {
813                 return (FALSE);
814         }
815         if (!xdr_tt_access(xdrs, &objp->access)) {
816                 return (FALSE);
817         }
818         if (!xdr_int(xdrs, &objp->cache_level)) {
819                 return (FALSE);
820         }
821         return (TRUE);
822 }
823
824 bool_t
825 xdr_tt_del_obj_prop_args(XDR *xdrs, _tt_del_obj_prop_args *objp)
826 {
827         if (!xdr_string(xdrs, &objp->objid, ~0)) {
828                 return (FALSE);
829         }
830         if (!xdr_tt_property(xdrs, &objp->property)) {
831                 return (FALSE);
832         }
833         if (!xdr_tt_access(xdrs, &objp->access)) {
834                 return (FALSE);
835         }
836         if (!xdr_int(xdrs, &objp->cache_level)) {
837                 return (FALSE);
838         }
839         return (TRUE);
840 }
841
842 bool_t
843 xdr_tt_get_obj_prop_args(XDR *xdrs, _tt_get_obj_prop_args *objp)
844 {
845         if (!xdr_string(xdrs, &objp->objid, ~0)) {
846                 return (FALSE);
847         }
848         if (!xdr_string(xdrs, &objp->name, ~0)) {
849                 return (FALSE);
850         }
851         if (!xdr_tt_access(xdrs, &objp->access)) {
852                 return (FALSE);
853         }
854         if (!xdr_int(xdrs, &objp->cache_level)) {
855                 return (FALSE);
856         }
857         return (TRUE);
858 }
859
860 bool_t
861 xdr_tt_get_obj_props_args(XDR *xdrs, _tt_get_obj_props_args *objp)
862 {
863         if (!xdr_string(xdrs, &objp->objid, ~0)) {
864                 return (FALSE);
865         }
866         if (!xdr_tt_access(xdrs, &objp->access)) {
867                 return (FALSE);
868         }
869         if (!xdr_int(xdrs, &objp->cache_level)) {
870                 return (FALSE);
871         }
872         return (TRUE);
873 }
874
875 bool_t
876 xdr_tt_set_obj_type_args(XDR *xdrs, _tt_set_obj_type_args *objp)
877 {
878         if (!xdr_string(xdrs, &objp->objid, ~0)) {
879                 return (FALSE);
880         }
881         if (!xdr_string(xdrs, &objp->otype, ~0)) {
882                 return (FALSE);
883         }
884         if (!xdr_tt_access(xdrs, &objp->access)) {
885                 return (FALSE);
886         }
887         return (TRUE);
888 }
889
890 bool_t
891 xdr_tt_get_obj_type_args(XDR *xdrs, _tt_get_obj_type_args *objp)
892 {
893         if (!xdr_string(xdrs, &objp->objid, ~0)) {
894                 return (FALSE);
895         }
896         if (!xdr_tt_access(xdrs, &objp->access)) {
897                 return (FALSE);
898         }
899         return (TRUE);
900 }
901
902 bool_t
903 xdr_tt_set_obj_file_args(XDR *xdrs, _tt_set_obj_file_args *objp)
904 {
905         if (!xdr_string(xdrs, &objp->objid, ~0)) {
906                 return (FALSE);
907         }
908         if (!xdr_string(xdrs, &objp->file, ~0)) {
909                 return (FALSE);
910         }
911         if (!xdr_tt_access(xdrs, &objp->access)) {
912                 return (FALSE);
913         }
914         return (TRUE);
915 }
916
917 bool_t
918 xdr_tt_get_obj_file_args(XDR *xdrs, _tt_get_obj_file_args *objp)
919 {
920         if (!xdr_string(xdrs, &objp->objid, ~0)) {
921                 return (FALSE);
922         }
923         if (!xdr_tt_access(xdrs, &objp->access)) {
924                 return (FALSE);
925         }
926         return (TRUE);
927 }
928
929 bool_t
930 xdr_tt_set_obj_access_args(XDR *xdrs, _tt_set_obj_access_args *objp)
931 {
932         if (!xdr_string(xdrs, &objp->objid, ~0)) {
933                 return (FALSE);
934         }
935         if (!xdr_tt_access(xdrs, &objp->new_access)) {
936                 return (FALSE);
937         }
938         if (!xdr_tt_access(xdrs, &objp->access)) {
939                 return (FALSE);
940         }
941         return (TRUE);
942 }
943
944 bool_t
945 xdr_tt_get_obj_access_args(XDR *xdrs, _tt_get_obj_access_args *objp)
946 {
947         if (!xdr_string(xdrs, &objp->objid, ~0)) {
948                 return (FALSE);
949         }
950         if (!xdr_tt_access(xdrs, &objp->access)) {
951                 return (FALSE);
952         }
953         return (TRUE);
954 }
955
956 bool_t
957 xdr_tt_is_file_in_db_args(XDR *xdrs, _tt_is_file_in_db_args *objp)
958 {
959         if (!xdr_string(xdrs, &objp->file, ~0)) {
960                 return (FALSE);
961         }
962         if (!xdr_tt_access(xdrs, &objp->access)) {
963                 return (FALSE);
964         }
965         return (TRUE);
966 }
967
968 bool_t
969 xdr_tt_is_obj_in_db_args(XDR *xdrs, _tt_is_obj_in_db_args *objp)
970 {
971         if (!xdr_string(xdrs, &objp->objid, ~0)) {
972                 return (FALSE);
973         }
974         if (!xdr_tt_access(xdrs, &objp->access)) {
975                 return (FALSE);
976         }
977         return (TRUE);
978 }
979
980 bool_t
981 xdr_tt_queue_msg_args(XDR *xdrs, _tt_queue_msg_args *objp)
982 {
983         if (!xdr_string(xdrs, &objp->file, ~0)) {
984                 return (FALSE);
985         }
986         if (!xdr_array(xdrs, (char **)&objp->ptypes.values_val, (u_int *)&objp->ptypes.values_len, ~0, sizeof(_tt_string), (xdrproc_t)xdr_tt_string)) {
987                 return (FALSE);
988         }
989         if (!xdr_tt_message(xdrs, &objp->message)) {
990                 return (FALSE);
991         }
992         return (TRUE);
993 }
994
995 bool_t
996 xdr_tt_dequeue_msgs_args(XDR *xdrs, _tt_dequeue_msgs_args *objp)
997 {
998         if (!xdr_string(xdrs, &objp->file, ~0)) {
999                 return (FALSE);
1000         }
1001         if (!xdr_array(xdrs, (char **)&objp->ptypes.values_val, (u_int *)&objp->ptypes.values_len, ~0, sizeof(_tt_string), (xdrproc_t)xdr_tt_string)) {
1002                 return (FALSE);
1003         }
1004         return (TRUE);
1005 }
1006
1007 bool_t
1008 xdr_tt_db_cache_results(XDR *xdrs, _tt_db_cache_results *objp)
1009 {
1010         if (!xdr_int(xdrs, &objp->cache_level)) {
1011                 return (FALSE);
1012         }
1013         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1014                 return (FALSE);
1015         }
1016         return (TRUE);
1017 }
1018
1019 bool_t
1020 xdr_tt_auth_level_results(XDR *xdrs, _tt_auth_level_results *objp)
1021 {
1022         if (!xdr_int(xdrs, &objp->auth_level)) {
1023                 return (FALSE);
1024         }
1025         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1026                 return (FALSE);
1027         }
1028         return (TRUE);
1029 }
1030
1031 bool_t
1032 xdr_tt_file_partition_results(XDR *xdrs, _tt_file_partition_results *objp)
1033 {
1034         if (!xdr_string(xdrs, &objp->partition, ~0)) {
1035                 return (FALSE);
1036         }
1037         if (!xdr_string(xdrs, &objp->network_path, ~0)) {
1038                 return (FALSE);
1039         }
1040         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1041                 return (FALSE);
1042         }
1043         return (TRUE);
1044 }
1045
1046 bool_t
1047 xdr_tt_file_prop_results(XDR *xdrs, _tt_file_prop_results *objp)
1048 {
1049         if (!xdr_tt_property(xdrs, &objp->property)) {
1050                 return (FALSE);
1051         }
1052         if (!xdr_int(xdrs, &objp->cache_level)) {
1053                 return (FALSE);
1054         }
1055         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1056                 return (FALSE);
1057         }
1058         return (TRUE);
1059 }
1060
1061 bool_t
1062 xdr_tt_file_props_results(XDR *xdrs, _tt_file_props_results *objp)
1063 {
1064         if (!xdr_array(xdrs, (char **)&objp->properties.properties_val, (u_int *)&objp->properties.properties_len, ~0, sizeof(_tt_property), (xdrproc_t)xdr_tt_property)) {
1065                 return (FALSE);
1066         }
1067         if (!xdr_int(xdrs, &objp->cache_level)) {
1068                 return (FALSE);
1069         }
1070         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1071                 return (FALSE);
1072         }
1073         return (TRUE);
1074 }
1075
1076 bool_t
1077 xdr_tt_file_objs_results(XDR *xdrs, _tt_file_objs_results *objp)
1078 {
1079         if (!xdr_array(xdrs, (char **)&objp->objids.values_val, (u_int *)&objp->objids.values_len, ~0, sizeof(_tt_string), (xdrproc_t)xdr_tt_string)) {
1080                 return (FALSE);
1081         }
1082         if (!xdr_int(xdrs, &objp->cache_level)) {
1083                 return (FALSE);
1084         }
1085         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1086                 return (FALSE);
1087         }
1088         return (TRUE);
1089 }
1090
1091 bool_t
1092 xdr_tt_file_access_results(XDR *xdrs, _tt_file_access_results *objp)
1093 {
1094         if (!xdr_tt_access(xdrs, &objp->access)) {
1095                 return (FALSE);
1096         }
1097         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1098                 return (FALSE);
1099         }
1100         return (TRUE);
1101 }
1102
1103 bool_t
1104 xdr_tt_obj_prop_results(XDR *xdrs, _tt_obj_prop_results *objp)
1105 {
1106         if (!xdr_tt_property(xdrs, &objp->property)) {
1107                 return (FALSE);
1108         }
1109         if (!xdr_string(xdrs, &objp->file, ~0)) {
1110                 return (FALSE);
1111         }
1112         if (!xdr_int(xdrs, &objp->cache_level)) {
1113                 return (FALSE);
1114         }
1115         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1116                 return (FALSE);
1117         }
1118         return (TRUE);
1119 }
1120
1121 bool_t
1122 xdr_tt_obj_props_results(XDR *xdrs, _tt_obj_props_results *objp)
1123 {
1124         if (!xdr_array(xdrs, (char **)&objp->properties.properties_val, (u_int *)&objp->properties.properties_len, ~0, sizeof(_tt_property), (xdrproc_t)xdr_tt_property)) {
1125                 return (FALSE);
1126         }
1127         if (!xdr_string(xdrs, &objp->file, ~0)) {
1128                 return (FALSE);
1129         }
1130         if (!xdr_int(xdrs, &objp->cache_level)) {
1131                 return (FALSE);
1132         }
1133         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1134                 return (FALSE);
1135         }
1136         return (TRUE);
1137 }
1138
1139 bool_t
1140 xdr_tt_obj_type_results(XDR *xdrs, _tt_obj_type_results *objp)
1141 {
1142         if (!xdr_string(xdrs, &objp->otype, ~0)) {
1143                 return (FALSE);
1144         }
1145         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1146                 return (FALSE);
1147         }
1148         return (TRUE);
1149 }
1150
1151 bool_t
1152 xdr_tt_obj_file_results(XDR *xdrs, _tt_obj_file_results *objp)
1153 {
1154         if (!xdr_string(xdrs, &objp->file, ~0)) {
1155                 return (FALSE);
1156         }
1157         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1158                 return (FALSE);
1159         }
1160         return (TRUE);
1161 }
1162
1163 bool_t
1164 xdr_tt_obj_access_results(XDR *xdrs, _tt_obj_access_results *objp)
1165 {
1166         if (!xdr_tt_access(xdrs, &objp->access)) {
1167                 return (FALSE);
1168         }
1169         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1170                 return (FALSE);
1171         }
1172         return (TRUE);
1173 }
1174
1175 bool_t
1176 xdr_tt_is_file_in_db_results(XDR *xdrs, _tt_is_file_in_db_results *objp)
1177 {
1178         if (!xdr_bool(xdrs, &objp->directory_flag)) {
1179                 return (FALSE);
1180         }
1181         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1182                 return (FALSE);
1183         }
1184         return (TRUE);
1185 }
1186
1187 bool_t
1188 xdr_tt_is_obj_in_db_results(XDR *xdrs, _tt_is_obj_in_db_results *objp)
1189 {
1190         if (!xdr_string(xdrs, &objp->forward_pointer, ~0)) {
1191                 return (FALSE);
1192         }
1193         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1194                 return (FALSE);
1195         }
1196         return (TRUE);
1197 }
1198
1199 bool_t
1200 xdr_tt_dequeue_msgs_results(XDR *xdrs, _tt_dequeue_msgs_results *objp)
1201 {
1202         if (!xdr_array(xdrs, (char **)&objp->messages.messages_val, (u_int *)&objp->messages.messages_len, ~0, sizeof(_tt_message), (xdrproc_t)xdr_tt_message)) {
1203                 return (FALSE);
1204         }
1205         if (!xdr_tt_db_results(xdrs, &objp->results)) {
1206                 return (FALSE);
1207         }
1208         return (TRUE);
1209 }
1210
1211 bool_t
1212 xdr_tt_get_all_sessions_args(XDR *xdrs, _tt_get_all_sessions_args *objp)
1213 {
1214         return(xdr_array(xdrs, (char **)&objp->oidkey.oidkey_val, (u_int *)&objp->oidkey.oidkey_len, OID_KEY_LENGTH, sizeof(char), (xdrproc_t)xdr_char));
1215 }
1216
1217 bool_t
1218 xdr_tt_get_all_sessions_results(XDR *xdrs, _tt_get_all_sessions_results *objp)
1219 {
1220         if (!xdr_array(xdrs,
1221                        (char **)&objp->oidkey.oidkey_val,
1222                        (u_int *)&objp->oidkey.oidkey_len,
1223                        MAXKEYSIZE,
1224                        sizeof(char),
1225                        (xdrproc_t)xdr_char)) {
1226                 return(FALSE);
1227         }
1228
1229         if (!xdr_array(xdrs,
1230                        (char **)&objp->session_list.values_val,
1231                        (u_int *)&objp->session_list.values_len,
1232                        OPT_MAX_GET_SESSIONS,
1233                        sizeof(char *),
1234                        (xdrproc_t)xdr_tt_string)) {
1235                 return (FALSE);
1236         }
1237         return(TRUE);
1238 }
1239
1240 bool_t
1241 xdr_tt_garbage_collect_results(XDR *xdrs, _tt_garbage_collect_results *objp)
1242 {
1243         return(xdr_int(xdrs, &objp->tt_status));
1244 }
1245
1246 bool_t
1247 xdr_tt_delete_session_results(XDR *xdrs, _tt_delete_session_results *objp)
1248 {
1249         return(xdr_int(xdrs, &objp->tt_status));
1250 }
1251
1252
1253 bool_t
1254 xdr_tt_delete_session_args(XDR *xdrs, _tt_delete_session_args *objp)
1255 {
1256         return(xdr_string(xdrs, &objp->session.value, ~0));
1257 }
1258
1259