MOUNT: The wrappers for the old MOUNT rpc calls should call the new functions and...
[deb_libnfs.git] / mount / libnfs-raw-mount.c
1 /*
2 * Please do not edit this file.
3 * It was generated using rpcgen.
4 */
5
6 #include "libnfs-zdr.h"
7 #include "libnfs-raw-mount.h"
8
9 bool_t
10 zdr_fhandle3 (ZDR *zdrs, fhandle3 *objp)
11 {
12 register int32_t *buf;
13 buf = NULL;
14
15 if (!zdr_bytes (zdrs, (char **)&objp->fhandle3_val, (u_int *) &objp->fhandle3_len, FHSIZE3))
16 return FALSE;
17 return TRUE;
18 }
19
20 bool_t
21 zdr_dirpath (ZDR *zdrs, dirpath *objp)
22 {
23 register int32_t *buf;
24 buf = NULL;
25
26 if (!zdr_string (zdrs, objp, MNTPATHLEN))
27 return FALSE;
28 return TRUE;
29 }
30
31 bool_t
32 zdr_name (ZDR *zdrs, name *objp)
33 {
34 register int32_t *buf;
35 buf = NULL;
36
37 if (!zdr_string (zdrs, objp, MNTNAMLEN))
38 return FALSE;
39 return TRUE;
40 }
41
42 bool_t
43 zdr_mountstat3 (ZDR *zdrs, mountstat3 *objp)
44 {
45 register int32_t *buf;
46 buf = NULL;
47
48 if (!zdr_enum (zdrs, (enum_t *) objp))
49 return FALSE;
50 return TRUE;
51 }
52
53 bool_t
54 zdr_mountlist (ZDR *zdrs, mountlist *objp)
55 {
56 register int32_t *buf;
57 buf = NULL;
58
59 if (!zdr_pointer (zdrs, (char **)objp, sizeof (struct mountbody), (zdrproc_t) zdr_mountbody))
60 return FALSE;
61 return TRUE;
62 }
63
64 bool_t
65 zdr_mountbody (ZDR *zdrs, mountbody *objp)
66 {
67 register int32_t *buf;
68 buf = NULL;
69
70 if (!zdr_name (zdrs, &objp->ml_hostname))
71 return FALSE;
72 if (!zdr_dirpath (zdrs, &objp->ml_directory))
73 return FALSE;
74 if (!zdr_mountlist (zdrs, &objp->ml_next))
75 return FALSE;
76 return TRUE;
77 }
78
79 bool_t
80 zdr_groups (ZDR *zdrs, groups *objp)
81 {
82 register int32_t *buf;
83 buf = NULL;
84
85 if (!zdr_pointer (zdrs, (char **)objp, sizeof (struct groupnode), (zdrproc_t) zdr_groupnode))
86 return FALSE;
87 return TRUE;
88 }
89
90 bool_t
91 zdr_groupnode (ZDR *zdrs, groupnode *objp)
92 {
93 register int32_t *buf;
94 buf = NULL;
95
96 if (!zdr_name (zdrs, &objp->gr_name))
97 return FALSE;
98 if (!zdr_groups (zdrs, &objp->gr_next))
99 return FALSE;
100 return TRUE;
101 }
102
103 bool_t
104 zdr_exports (ZDR *zdrs, exports *objp)
105 {
106 register int32_t *buf;
107 buf = NULL;
108
109 if (!zdr_pointer (zdrs, (char **)objp, sizeof (struct exportnode), (zdrproc_t) zdr_exportnode))
110 return FALSE;
111 return TRUE;
112 }
113
114 bool_t
115 zdr_exportnode (ZDR *zdrs, exportnode *objp)
116 {
117 register int32_t *buf;
118 buf = NULL;
119
120 if (!zdr_dirpath (zdrs, &objp->ex_dir))
121 return FALSE;
122 if (!zdr_groups (zdrs, &objp->ex_groups))
123 return FALSE;
124 if (!zdr_exports (zdrs, &objp->ex_next))
125 return FALSE;
126 return TRUE;
127 }
128
129 bool_t
130 zdr_mountres3_ok (ZDR *zdrs, mountres3_ok *objp)
131 {
132 register int32_t *buf;
133 buf = NULL;
134
135 if (!zdr_fhandle3 (zdrs, &objp->fhandle))
136 return FALSE;
137 if (!zdr_array (zdrs, (char **)&objp->auth_flavors.auth_flavors_val, (u_int *) &objp->auth_flavors.auth_flavors_len, ~0,
138 sizeof (int), (zdrproc_t) zdr_int))
139 return FALSE;
140 return TRUE;
141 }
142
143 bool_t
144 zdr_mountres3 (ZDR *zdrs, mountres3 *objp)
145 {
146 register int32_t *buf;
147 buf = NULL;
148
149 if (!zdr_mountstat3 (zdrs, &objp->fhs_status))
150 return FALSE;
151 switch (objp->fhs_status) {
152 case MNT3_OK:
153 if (!zdr_mountres3_ok (zdrs, &objp->mountres3_u.mountinfo))
154 return FALSE;
155 break;
156 default:
157 break;
158 }
159 return TRUE;
160 }
161
162 bool_t
163 zdr_mountstat1 (ZDR *zdrs, mountstat1 *objp)
164 {
165 register int32_t *buf;
166 buf = NULL;
167
168 if (!zdr_enum (zdrs, (enum_t *) objp))
169 return FALSE;
170 return TRUE;
171 }
172
173 bool_t
174 zdr_fhandle1 (ZDR *zdrs, fhandle1 objp)
175 {
176 register int32_t *buf;
177 buf = NULL;
178
179 if (!zdr_opaque (zdrs, objp, FHSIZE))
180 return FALSE;
181 return TRUE;
182 }
183
184 bool_t
185 zdr_mountres1_ok (ZDR *zdrs, mountres1_ok *objp)
186 {
187 register int32_t *buf;
188 buf = NULL;
189
190 if (!zdr_fhandle1 (zdrs, objp->fhandle))
191 return FALSE;
192 return TRUE;
193 }
194
195 bool_t
196 zdr_mountres1 (ZDR *zdrs, mountres1 *objp)
197 {
198 register int32_t *buf;
199 buf = NULL;
200
201 if (!zdr_mountstat1 (zdrs, &objp->fhs_status))
202 return FALSE;
203 switch (objp->fhs_status) {
204 case MNT1_OK:
205 if (!zdr_mountres1_ok (zdrs, &objp->mountres1_u.mountinfo))
206 return FALSE;
207 break;
208 default:
209 break;
210 }
211 return TRUE;
212 }