Silence warnings.
[dragonfly.git] / lib / libc / rpc / key_prot_xdr.c
CommitLineData
984263bc
MD
1/*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
ec2714c6 5/* $DragonFly: src/lib/libc/rpc/key_prot_xdr.c,v 1.3 2006/03/13 14:36:46 swildner Exp $ */
984263bc
MD
6
7#include <rpc/key_prot.h>
8/*
9 * Sun RPC is a product of Sun Microsystems, Inc. and is provided for
10 * unrestricted use provided that this legend is included on all tape
11 * media and as a part of the software program in whole or part. Users
12 * may copy or modify Sun RPC without charge, but are not authorized
13 * to license or distribute it to anyone else except as part of a product or
14 * program developed by the user.
15 *
16 * SUN RPC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE
17 * WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE.
19 *
20 * Sun RPC is provided with no support and without any obligation on the
21 * part of Sun Microsystems, Inc. to assist in its use, correction,
22 * modification or enhancement.
23 *
24 * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
25 * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY SUN RPC
26 * OR ANY PART THEREOF.
27 *
28 * In no event will Sun Microsystems, Inc. be liable for any lost revenue
29 * or profits or other special, indirect and consequential damages, even if
30 * Sun has been advised of the possibility of such damages.
31 *
32 * Sun Microsystems, Inc.
33 * 2550 Garcia Avenue
34 * Mountain View, California 94043
35 */
36#pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI"
37
38/* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
39
40/*
41 * Compiled from key_prot.x using rpcgen.
42 * DO NOT EDIT THIS FILE!
43 * This is NOT source code!
44 */
45
46bool_t
660c873b 47xdr_keystatus(XDR *xdrs, keystatus *objp)
984263bc
MD
48{
49
50 if (!xdr_enum(xdrs, (enum_t *)objp))
51 return (FALSE);
52 return (TRUE);
53}
54
55bool_t
660c873b 56xdr_keybuf(XDR *xdrs, keybuf objp)
984263bc
MD
57{
58
59 if (!xdr_opaque(xdrs, objp, HEXKEYBYTES))
60 return (FALSE);
61 return (TRUE);
62}
63
64bool_t
660c873b 65xdr_netnamestr(XDR *xdrs, netnamestr *objp)
984263bc
MD
66{
67
68 if (!xdr_string(xdrs, objp, MAXNETNAMELEN))
69 return (FALSE);
70 return (TRUE);
71}
72
73bool_t
660c873b 74xdr_cryptkeyarg(XDR *xdrs, cryptkeyarg *objp)
984263bc
MD
75{
76
77 if (!xdr_netnamestr(xdrs, &objp->remotename))
78 return (FALSE);
79 if (!xdr_des_block(xdrs, &objp->deskey))
80 return (FALSE);
81 return (TRUE);
82}
83
84bool_t
660c873b 85xdr_cryptkeyarg2(XDR *xdrs, cryptkeyarg2 *objp)
984263bc
MD
86{
87
88 if (!xdr_netnamestr(xdrs, &objp->remotename))
89 return (FALSE);
90 if (!xdr_netobj(xdrs, &objp->remotekey))
91 return (FALSE);
92 if (!xdr_des_block(xdrs, &objp->deskey))
93 return (FALSE);
94 return (TRUE);
95}
96
97bool_t
660c873b 98xdr_cryptkeyres(XDR *xdrs, cryptkeyres *objp)
984263bc
MD
99{
100
101 if (!xdr_keystatus(xdrs, &objp->status))
102 return (FALSE);
103 switch (objp->status) {
104 case KEY_SUCCESS:
105 if (!xdr_des_block(xdrs, &objp->cryptkeyres_u.deskey))
106 return (FALSE);
107 break;
ec2714c6
SW
108 default:
109 break;
984263bc
MD
110 }
111 return (TRUE);
112}
113
114bool_t
660c873b 115xdr_unixcred(XDR *xdrs, unixcred *objp)
984263bc
MD
116{
117
118 if (!xdr_u_int(xdrs, &objp->uid))
119 return (FALSE);
120 if (!xdr_u_int(xdrs, &objp->gid))
121 return (FALSE);
122 if (!xdr_array(xdrs, (char **)&objp->gids.gids_val, (u_int *) &objp->gids.gids_len, MAXGIDS,
123 sizeof (u_int), (xdrproc_t) xdr_u_int))
124 return (FALSE);
125 return (TRUE);
126}
127
128bool_t
660c873b 129xdr_getcredres(XDR *xdrs, getcredres *objp)
984263bc
MD
130{
131
132 if (!xdr_keystatus(xdrs, &objp->status))
133 return (FALSE);
134 switch (objp->status) {
135 case KEY_SUCCESS:
136 if (!xdr_unixcred(xdrs, &objp->getcredres_u.cred))
137 return (FALSE);
138 break;
ec2714c6
SW
139 default:
140 break;
984263bc
MD
141 }
142 return (TRUE);
143}
144
145bool_t
660c873b 146xdr_key_netstarg(XDR *xdrs, key_netstarg *objp)
984263bc
MD
147{
148
149 if (!xdr_keybuf(xdrs, objp->st_priv_key))
150 return (FALSE);
151 if (!xdr_keybuf(xdrs, objp->st_pub_key))
152 return (FALSE);
153 if (!xdr_netnamestr(xdrs, &objp->st_netname))
154 return (FALSE);
155 return (TRUE);
156}
157
158bool_t
660c873b 159xdr_key_netstres(XDR *xdrs, key_netstres *objp)
984263bc
MD
160{
161
162 if (!xdr_keystatus(xdrs, &objp->status))
163 return (FALSE);
164 switch (objp->status) {
165 case KEY_SUCCESS:
166 if (!xdr_key_netstarg(xdrs, &objp->key_netstres_u.knet))
167 return (FALSE);
168 break;
ec2714c6
SW
169 default:
170 break;
984263bc
MD
171 }
172 return (TRUE);
173}