socket: fix broken connect for non broadcast traffic
[deb_libnfs.git] / portmap / libnfs-raw-portmap.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-portmap.h"
8
9 bool_t
10 zdr_pmap2_mapping (ZDR *zdrs, pmap2_mapping *objp)
11 {
12 register int32_t *buf;
13 buf = NULL;
14
15
16 if (zdrs->x_op == ZDR_ENCODE) {
17 buf = ZDR_INLINE (zdrs, 4 * BYTES_PER_ZDR_UNIT);
18 if (buf == NULL) {
19 if (!zdr_u_int (zdrs, &objp->prog))
20 return FALSE;
21 if (!zdr_u_int (zdrs, &objp->vers))
22 return FALSE;
23 if (!zdr_u_int (zdrs, &objp->prot))
24 return FALSE;
25 if (!zdr_u_int (zdrs, &objp->port))
26 return FALSE;
27 } else {
28 IZDR_PUT_U_LONG(buf, objp->prog);
29 IZDR_PUT_U_LONG(buf, objp->vers);
30 IZDR_PUT_U_LONG(buf, objp->prot);
31 IZDR_PUT_U_LONG(buf, objp->port);
32 }
33 return TRUE;
34 } else if (zdrs->x_op == ZDR_DECODE) {
35 buf = ZDR_INLINE (zdrs, 4 * BYTES_PER_ZDR_UNIT);
36 if (buf == NULL) {
37 if (!zdr_u_int (zdrs, &objp->prog))
38 return FALSE;
39 if (!zdr_u_int (zdrs, &objp->vers))
40 return FALSE;
41 if (!zdr_u_int (zdrs, &objp->prot))
42 return FALSE;
43 if (!zdr_u_int (zdrs, &objp->port))
44 return FALSE;
45 } else {
46 objp->prog = IZDR_GET_U_LONG(buf);
47 objp->vers = IZDR_GET_U_LONG(buf);
48 objp->prot = IZDR_GET_U_LONG(buf);
49 objp->port = IZDR_GET_U_LONG(buf);
50 }
51 return TRUE;
52 }
53
54 if (!zdr_u_int (zdrs, &objp->prog))
55 return FALSE;
56 if (!zdr_u_int (zdrs, &objp->vers))
57 return FALSE;
58 if (!zdr_u_int (zdrs, &objp->prot))
59 return FALSE;
60 if (!zdr_u_int (zdrs, &objp->port))
61 return FALSE;
62 return TRUE;
63 }
64
65 bool_t
66 zdr_pmap2_call_args (ZDR *zdrs, pmap2_call_args *objp)
67 {
68 register int32_t *buf;
69 buf = NULL;
70
71
72 if (zdrs->x_op == ZDR_ENCODE) {
73 buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
74 if (buf == NULL) {
75 if (!zdr_u_int (zdrs, &objp->prog))
76 return FALSE;
77 if (!zdr_u_int (zdrs, &objp->vers))
78 return FALSE;
79 if (!zdr_u_int (zdrs, &objp->proc))
80 return FALSE;
81
82 } else {
83 IZDR_PUT_U_LONG(buf, objp->prog);
84 IZDR_PUT_U_LONG(buf, objp->vers);
85 IZDR_PUT_U_LONG(buf, objp->proc);
86 }
87 if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
88 return FALSE;
89 return TRUE;
90 } else if (zdrs->x_op == ZDR_DECODE) {
91 buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
92 if (buf == NULL) {
93 if (!zdr_u_int (zdrs, &objp->prog))
94 return FALSE;
95 if (!zdr_u_int (zdrs, &objp->vers))
96 return FALSE;
97 if (!zdr_u_int (zdrs, &objp->proc))
98 return FALSE;
99
100 } else {
101 objp->prog = IZDR_GET_U_LONG(buf);
102 objp->vers = IZDR_GET_U_LONG(buf);
103 objp->proc = IZDR_GET_U_LONG(buf);
104 }
105 if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
106 return FALSE;
107 return TRUE;
108 }
109
110 if (!zdr_u_int (zdrs, &objp->prog))
111 return FALSE;
112 if (!zdr_u_int (zdrs, &objp->vers))
113 return FALSE;
114 if (!zdr_u_int (zdrs, &objp->proc))
115 return FALSE;
116 if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
117 return FALSE;
118 return TRUE;
119 }
120
121 bool_t
122 zdr_pmap2_call_result (ZDR *zdrs, pmap2_call_result *objp)
123 {
124 register int32_t *buf;
125 buf = NULL;
126
127 if (!zdr_u_int (zdrs, &objp->port))
128 return FALSE;
129 if (!zdr_bytes (zdrs, (char **)&objp->res.res_val, (u_int *) &objp->res.res_len, ~0))
130 return FALSE;
131 return TRUE;
132 }
133
134 bool_t
135 zdr_pmap2_mapping_list (ZDR *zdrs, pmap2_mapping_list *objp)
136 {
137 register int32_t *buf;
138 buf = NULL;
139
140 if (!zdr_pmap2_mapping (zdrs, &objp->map))
141 return FALSE;
142 if (!zdr_pointer (zdrs, (char **)&objp->next, sizeof (pmap2_mapping_list), (zdrproc_t) zdr_pmap2_mapping_list))
143 return FALSE;
144 return TRUE;
145 }
146
147 bool_t
148 zdr_pmap2_dump_result (ZDR *zdrs, pmap2_dump_result *objp)
149 {
150 register int32_t *buf;
151 buf = NULL;
152
153 if (!zdr_pointer (zdrs, (char **)&objp->list, sizeof (pmap2_mapping_list), (zdrproc_t) zdr_pmap2_mapping_list))
154 return FALSE;
155 return TRUE;
156 }
157
158 bool_t
159 zdr_pmap3_string_result (ZDR *zdrs, pmap3_string_result *objp)
160 {
161 register int32_t *buf;
162 buf = NULL;
163
164 if (!zdr_string (zdrs, &objp->addr, ~0))
165 return FALSE;
166 return TRUE;
167 }
168
169 bool_t
170 zdr_pmap3_mapping (ZDR *zdrs, pmap3_mapping *objp)
171 {
172 register int32_t *buf;
173 buf = NULL;
174
175 if (!zdr_u_int (zdrs, &objp->prog))
176 return FALSE;
177 if (!zdr_u_int (zdrs, &objp->vers))
178 return FALSE;
179 if (!zdr_string (zdrs, &objp->netid, ~0))
180 return FALSE;
181 if (!zdr_string (zdrs, &objp->addr, ~0))
182 return FALSE;
183 if (!zdr_string (zdrs, &objp->owner, ~0))
184 return FALSE;
185 return TRUE;
186 }
187
188 bool_t
189 zdr_pmap3_mapping_list (ZDR *zdrs, pmap3_mapping_list *objp)
190 {
191 register int32_t *buf;
192 buf = NULL;
193
194 if (!zdr_pmap3_mapping (zdrs, &objp->map))
195 return FALSE;
196 if (!zdr_pointer (zdrs, (char **)&objp->next, sizeof (pmap3_mapping_list), (zdrproc_t) zdr_pmap3_mapping_list))
197 return FALSE;
198 return TRUE;
199 }
200
201 bool_t
202 zdr_pmap3_dump_result (ZDR *zdrs, pmap3_dump_result *objp)
203 {
204 register int32_t *buf;
205 buf = NULL;
206
207 if (!zdr_pointer (zdrs, (char **)&objp->list, sizeof (pmap3_mapping_list), (zdrproc_t) zdr_pmap3_mapping_list))
208 return FALSE;
209 return TRUE;
210 }
211
212 bool_t
213 zdr_pmap3_call_args (ZDR *zdrs, pmap3_call_args *objp)
214 {
215 register int32_t *buf;
216 buf = NULL;
217
218
219 if (zdrs->x_op == ZDR_ENCODE) {
220 buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
221 if (buf == NULL) {
222 if (!zdr_u_int (zdrs, &objp->prog))
223 return FALSE;
224 if (!zdr_u_int (zdrs, &objp->vers))
225 return FALSE;
226 if (!zdr_u_int (zdrs, &objp->proc))
227 return FALSE;
228
229 } else {
230 IZDR_PUT_U_LONG(buf, objp->prog);
231 IZDR_PUT_U_LONG(buf, objp->vers);
232 IZDR_PUT_U_LONG(buf, objp->proc);
233 }
234 if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
235 return FALSE;
236 return TRUE;
237 } else if (zdrs->x_op == ZDR_DECODE) {
238 buf = ZDR_INLINE (zdrs, 3 * BYTES_PER_ZDR_UNIT);
239 if (buf == NULL) {
240 if (!zdr_u_int (zdrs, &objp->prog))
241 return FALSE;
242 if (!zdr_u_int (zdrs, &objp->vers))
243 return FALSE;
244 if (!zdr_u_int (zdrs, &objp->proc))
245 return FALSE;
246
247 } else {
248 objp->prog = IZDR_GET_U_LONG(buf);
249 objp->vers = IZDR_GET_U_LONG(buf);
250 objp->proc = IZDR_GET_U_LONG(buf);
251 }
252 if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
253 return FALSE;
254 return TRUE;
255 }
256
257 if (!zdr_u_int (zdrs, &objp->prog))
258 return FALSE;
259 if (!zdr_u_int (zdrs, &objp->vers))
260 return FALSE;
261 if (!zdr_u_int (zdrs, &objp->proc))
262 return FALSE;
263 if (!zdr_bytes (zdrs, (char **)&objp->args.args_val, (u_int *) &objp->args.args_len, ~0))
264 return FALSE;
265 return TRUE;
266 }
267
268 bool_t
269 zdr_pmap3_call_result (ZDR *zdrs, pmap3_call_result *objp)
270 {
271 register int32_t *buf;
272 buf = NULL;
273
274 if (!zdr_u_int (zdrs, &objp->port))
275 return FALSE;
276 if (!zdr_bytes (zdrs, (char **)&objp->res.res_val, (u_int *) &objp->res.res_len, ~0))
277 return FALSE;
278 return TRUE;
279 }
280
281 bool_t
282 zdr_pmap3_netbuf (ZDR *zdrs, pmap3_netbuf *objp)
283 {
284 register int32_t *buf;
285 buf = NULL;
286
287 if (!zdr_u_int (zdrs, &objp->maxlen))
288 return FALSE;
289 if (!zdr_bytes (zdrs, (char **)&objp->buf.buf_val, (u_int *) &objp->buf.buf_len, ~0))
290 return FALSE;
291 return TRUE;
292 }