Imported Upstream version 1.9.4
[deb_libnfs.git] / nsm / libnfs-raw-nsm.c
1 /*
2 Copyright (c) 2014, Ronnie Sahlberg
3 All rights reserved.
4
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25 The views and conclusions contained in the software and documentation are those
26 of the authors and should not be interpreted as representing official policies,
27 either expressed or implied, of the FreeBSD Project.
28 */
29
30 /*
31 * Please do not edit this file.
32 * It was generated using rpcgen.
33 */
34
35 #include "libnfs-zdr.h"
36 #include "libnfs-raw-nsm.h"
37
38 bool_t
39 zdr_nsmstat1 (ZDR *zdrs, nsmstat1 *objp)
40 {
41 register int32_t *buf;
42 buf = NULL;
43
44 if (!zdr_enum (zdrs, (enum_t *) objp))
45 return FALSE;
46 return TRUE;
47 }
48
49 bool_t
50 zdr_nsm_my_id (ZDR *zdrs, nsm_my_id *objp)
51 {
52 register int32_t *buf;
53 buf = NULL;
54
55 if (!zdr_string (zdrs, &objp->my_name, NSM_MAXSTRLEN))
56 return FALSE;
57 if (!zdr_int (zdrs, &objp->my_prog))
58 return FALSE;
59 if (!zdr_int (zdrs, &objp->my_vers))
60 return FALSE;
61 if (!zdr_int (zdrs, &objp->my_proc))
62 return FALSE;
63 return TRUE;
64 }
65
66 bool_t
67 zdr_nsm_mon_id (ZDR *zdrs, nsm_mon_id *objp)
68 {
69 register int32_t *buf;
70 buf = NULL;
71
72 if (!zdr_string (zdrs, &objp->mon_name, NSM_MAXSTRLEN))
73 return FALSE;
74 if (!zdr_nsm_my_id (zdrs, &objp->my_id))
75 return FALSE;
76 return TRUE;
77 }
78
79 bool_t
80 zdr_NSM1_STATres (ZDR *zdrs, NSM1_STATres *objp)
81 {
82 register int32_t *buf;
83 buf = NULL;
84
85 if (!zdr_nsmstat1 (zdrs, &objp->res))
86 return FALSE;
87 if (!zdr_int (zdrs, &objp->state))
88 return FALSE;
89 return TRUE;
90 }
91
92 bool_t
93 zdr_NSM1_STATargs (ZDR *zdrs, NSM1_STATargs *objp)
94 {
95 register int32_t *buf;
96 buf = NULL;
97
98 if (!zdr_string (zdrs, &objp->mon_name, NSM_MAXSTRLEN))
99 return FALSE;
100 return TRUE;
101 }
102
103 bool_t
104 zdr_NSM1_MONres (ZDR *zdrs, NSM1_MONres *objp)
105 {
106 register int32_t *buf;
107 buf = NULL;
108
109 if (!zdr_nsmstat1 (zdrs, &objp->res))
110 return FALSE;
111 if (!zdr_int (zdrs, &objp->state))
112 return FALSE;
113 return TRUE;
114 }
115
116 bool_t
117 zdr_NSM1_MONargs (ZDR *zdrs, NSM1_MONargs *objp)
118 {
119 register int32_t *buf;
120 buf = NULL;
121
122 int i;
123 if (!zdr_nsm_mon_id (zdrs, &objp->mon_id))
124 return FALSE;
125 if (!zdr_opaque (zdrs, objp->priv, 16))
126 return FALSE;
127 return TRUE;
128 }
129
130 bool_t
131 zdr_NSM1_UNMONres (ZDR *zdrs, NSM1_UNMONres *objp)
132 {
133 register int32_t *buf;
134 buf = NULL;
135
136 if (!zdr_int (zdrs, &objp->state))
137 return FALSE;
138 return TRUE;
139 }
140
141 bool_t
142 zdr_NSM1_UNMONargs (ZDR *zdrs, NSM1_UNMONargs *objp)
143 {
144 register int32_t *buf;
145 buf = NULL;
146
147 if (!zdr_nsm_mon_id (zdrs, &objp->mon_id))
148 return FALSE;
149 return TRUE;
150 }
151
152 bool_t
153 zdr_NSM1_UNMONALLres (ZDR *zdrs, NSM1_UNMONALLres *objp)
154 {
155 register int32_t *buf;
156 buf = NULL;
157
158 if (!zdr_int (zdrs, &objp->state))
159 return FALSE;
160 return TRUE;
161 }
162
163 bool_t
164 zdr_NSM1_UNMONALLargs (ZDR *zdrs, NSM1_UNMONALLargs *objp)
165 {
166 register int32_t *buf;
167 buf = NULL;
168
169 if (!zdr_nsm_my_id (zdrs, &objp->my_id))
170 return FALSE;
171 return TRUE;
172 }
173
174 bool_t
175 zdr_NSM1_NOTIFYargs (ZDR *zdrs, NSM1_NOTIFYargs *objp)
176 {
177 register int32_t *buf;
178 buf = NULL;
179
180 if (!zdr_string (zdrs, &objp->mon_name, NSM_MAXSTRLEN))
181 return FALSE;
182 if (!zdr_int (zdrs, &objp->state))
183 return FALSE;
184 return TRUE;
185 }