Imported Upstream version 1.9.4
[deb_libnfs.git] / nsm / libnfs-raw-nsm.c
CommitLineData
f1f22dbf
RRS
1/*
2Copyright (c) 2014, Ronnie Sahlberg
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions are met:
7
81. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
102. 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
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21ON 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
23SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
25The views and conclusions contained in the software and documentation are those
26of the authors and should not be interpreted as representing official policies,
27either expressed or implied, of the FreeBSD Project.
28*/
29
ee872606
RRS
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
38bool_t
39zdr_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
49bool_t
50zdr_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
66bool_t
67zdr_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
79bool_t
80zdr_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
92bool_t
93zdr_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
103bool_t
104zdr_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
116bool_t
117zdr_NSM1_MONargs (ZDR *zdrs, NSM1_MONargs *objp)
118{
119 register int32_t *buf;
120 buf = NULL;
121
f1f22dbf 122 int i;
ee872606
RRS
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
130bool_t
131zdr_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
141bool_t
142zdr_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
152bool_t
153zdr_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
163bool_t
164zdr_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
174bool_t
175zdr_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}