rx-race-condition-cleanup-by-adding-busy-status-20010605
[openafs.git] / src / rx / xdr_afsuuid.c
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  * 
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * xdr_afsuuid.c, XDR routine for built in afsUUID data type.
12  */
13
14 #if defined(KERNEL) && !defined(UKERNEL)
15 #include "afs/param.h"
16 #ifdef AFS_LINUX20_ENV
17 #include "../h/string.h"
18 #define bzero(A,C) memset((A), 0, (C))
19 #else
20 #include <sys/param.h>
21 #include <sys/systm.h>
22 #endif
23 #else
24 #include <stdio.h>
25 #endif
26 #include "xdr.h"
27 #if defined(KERNEL) && !defined(UKERNEL)
28 #ifdef        AFS_DEC_ENV
29 #include <afs/longc_procs.h>
30 #endif
31 #endif
32
33 #ifndef lint
34 static char sccsid[] = "@(#)xdr_array.c 1.1 86/02/03 Copyr 1984 Sun Micro";
35 #endif
36
37 int
38 xdr_afsUUID(xdrs, objp)
39         XDR *xdrs;
40         afsUUID *objp;
41 {
42         if (!xdr_afs_uint32(xdrs, &objp->time_low)) {
43                 return (FALSE);
44         }
45         if (!xdr_u_short(xdrs, &objp->time_mid)) {
46                 return (FALSE);
47         }
48         if (!xdr_u_short(xdrs, &objp->time_hi_and_version)) {
49                 return (FALSE);
50         }
51         if (!xdr_char(xdrs, &objp->clock_seq_hi_and_reserved)) {
52                 return (FALSE);
53         }
54         if (!xdr_char(xdrs, &objp->clock_seq_low)) {
55                 return (FALSE);
56         }
57         if (!xdr_vector(xdrs, (char *)objp->node, 6, sizeof(char), xdr_char)) {
58                 return (FALSE);
59         }
60         return (TRUE);
61 }