1 /*
2  * Please do not edit this file.
3  * It was generated using rpcgen.
4  */
5 
6 #include "rpcsvc/nsm_addr.h"
7 
8 #ifndef _KERNEL
9 #include <stdlib.h>
10 #endif /* !_KERNEL */
11 
12 /*
13  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
14  * Use is subject to license terms.
15  *
16  * CDDL HEADER START
17  *
18  * The contents of this file are subject to the terms of the
19  * Common Development and Distribution License, Version 1.0 only
20  * (the "License").  You may not use this file except in compliance
21  * with the License.
22  *
23  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
24  * or http://www.opensolaris.org/os/licensing.
25  * See the License for the specific language governing permissions
26  * and limitations under the License.
27  *
28  * When distributing Covered Code, include this CDDL HEADER in each
29  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
30  * If applicable, add the following below this CDDL HEADER, with the
31  * fields enclosed by brackets "[]" replaced with your own identifying
32  * information: Portions Copyright [yyyy] [name of copyright owner]
33  *
34  * CDDL HEADER END
35  */
36 
37 #pragma ident	"%Z%%M%	%I%	%E% SMI"
38 
39 /* from nsm_addr.x */
40 
41 /*
42  * This is the definition for the REG procedure which is used
43  * to register name/address pairs with statd.
44  */
45 
46 
47 bool_t
48 xdr_nsm_addr_res(XDR *xdrs, nsm_addr_res *objp)
49 {
50 
51 	if (!xdr_enum(xdrs, (enum_t *)objp))
52 		return (FALSE);
53 	return (TRUE);
54 }
55 
56 bool_t
57 xdr_reg1args(XDR *xdrs, reg1args *objp)
58 {
59 
60 	if (!xdr_u_int(xdrs, &objp->family))
61 		return (FALSE);
62 	if (!xdr_string(xdrs, &objp->name, 1024))
63 		return (FALSE);
64 	if (!xdr_netobj(xdrs, &objp->address))
65 		return (FALSE);
66 	return (TRUE);
67 }
68 
69 bool_t
70 xdr_reg1res(XDR *xdrs, reg1res *objp)
71 {
72 
73 	if (!xdr_nsm_addr_res(xdrs, &objp->status))
74 		return (FALSE);
75 	return (TRUE);
76 }
77 
78 /*
79  * This is the definition for the UNREG procedure which is used
80  * to unregister an address (and its associated name, if that name
81  * has no other addresses registered with it) with statd.
82  */
83 
84 bool_t
85 xdr_unreg1args(XDR *xdrs, unreg1args *objp)
86 {
87 
88 	if (!xdr_u_int(xdrs, &objp->family))
89 		return (FALSE);
90 	if (!xdr_string(xdrs, &objp->name, 1024))
91 		return (FALSE);
92 	if (!xdr_netobj(xdrs, &objp->address))
93 		return (FALSE);
94 	return (TRUE);
95 }
96 
97 bool_t
98 xdr_unreg1res(XDR *xdrs, unreg1res *objp)
99 {
100 
101 	if (!xdr_nsm_addr_res(xdrs, &objp->status))
102 		return (FALSE);
103 	return (TRUE);
104 }
105 
106 /*
107  * This is the definition for the NSM address registration network
108  * protocol which is used to privately support address registration
109  * with the status daemon statd (NSM).
110  */
111