2 * Please do not edit this file.
3 * It was generated using rpcgen.
5 /* $DragonFly: src/lib/libc/rpc/key_prot_xdr.c,v 1.3 2006/03/13 14:36:46 swildner Exp $ */
7 #include <rpc/key_prot.h>
8 #include "un-namespace.h"
10 * Copyright (c) 2009, Sun Microsystems, Inc.
11 * All rights reserved.
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions are met:
15 * - Redistributions of source code must retain the above copyright notice,
16 * this list of conditions and the following disclaimer.
17 * - Redistributions in binary form must reproduce the above copyright notice,
18 * this list of conditions and the following disclaimer in the documentation
19 * and/or other materials provided with the distribution.
20 * - Neither the name of Sun Microsystems, Inc. nor the names of its
21 * contributors may be used to endorse or promote products derived
22 * from this software without specific prior written permission.
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
28 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34 * POSSIBILITY OF SUCH DAMAGE.
36 /* Copyright (c) 1990, 1991 Sun Microsystems, Inc. */
38 /* #pragma ident "@(#)key_prot.x 1.7 94/04/29 SMI" */
41 * Compiled from key_prot.x using rpcgen.
42 * DO NOT EDIT THIS FILE!
43 * This is NOT source code!
47 xdr_keystatus(XDR *xdrs, keystatus *objp)
50 if (!xdr_enum(xdrs, (enum_t *)objp))
56 xdr_keybuf(XDR *xdrs, keybuf objp)
59 if (!xdr_opaque(xdrs, objp, HEXKEYBYTES))
65 xdr_netnamestr(XDR *xdrs, netnamestr *objp)
68 if (!xdr_string(xdrs, objp, MAXNETNAMELEN))
74 xdr_cryptkeyarg(XDR *xdrs, cryptkeyarg *objp)
77 if (!xdr_netnamestr(xdrs, &objp->remotename))
79 if (!xdr_des_block(xdrs, &objp->deskey))
85 xdr_cryptkeyarg2(XDR *xdrs, cryptkeyarg2 *objp)
88 if (!xdr_netnamestr(xdrs, &objp->remotename))
90 if (!xdr_netobj(xdrs, &objp->remotekey))
92 if (!xdr_des_block(xdrs, &objp->deskey))
98 xdr_cryptkeyres(XDR *xdrs, cryptkeyres *objp)
101 if (!xdr_keystatus(xdrs, &objp->status))
103 switch (objp->status) {
105 if (!xdr_des_block(xdrs, &objp->cryptkeyres_u.deskey))
115 xdr_unixcred(XDR *xdrs, unixcred *objp)
119 if (!xdr_u_int(xdrs, &objp->uid))
121 if (!xdr_u_int(xdrs, &objp->gid))
123 pgids_val = &objp->gids.gids_val;
124 if (!xdr_array(xdrs, (char **) pgids_val, (u_int *) &objp->gids.gids_len, MAXGIDS,
125 sizeof (u_int), (xdrproc_t) xdr_u_int))
131 xdr_getcredres(XDR *xdrs, getcredres *objp)
134 if (!xdr_keystatus(xdrs, &objp->status))
136 switch (objp->status) {
138 if (!xdr_unixcred(xdrs, &objp->getcredres_u.cred))
148 xdr_key_netstarg(XDR *xdrs, key_netstarg *objp)
151 if (!xdr_keybuf(xdrs, objp->st_priv_key))
153 if (!xdr_keybuf(xdrs, objp->st_pub_key))
155 if (!xdr_netnamestr(xdrs, &objp->st_netname))
161 xdr_key_netstres(XDR *xdrs, key_netstres *objp)
164 if (!xdr_keystatus(xdrs, &objp->status))
166 switch (objp->status) {
168 if (!xdr_key_netstarg(xdrs, &objp->key_netstres_u.knet))