GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: lib/librpcsvc/yp.c Lines: 0 129 0.0 %
Date: 2017-11-07 Branches: 0 104 0.0 %

Line Branch Exec Source
1
/*
2
 * Please do not edit this file.
3
 * It was generated using rpcgen.
4
 */
5
6
#include "yp.h"
7
8
bool_t
9
xdr_ypstat(XDR *xdrs, ypstat *objp)
10
{
11
12
	if (!xdr_enum(xdrs, (enum_t *)objp))
13
		return (FALSE);
14
	return (TRUE);
15
}
16
17
bool_t
18
xdr_ypxfrstat(XDR *xdrs, ypxfrstat *objp)
19
{
20
21
	if (!xdr_enum(xdrs, (enum_t *)objp))
22
		return (FALSE);
23
	return (TRUE);
24
}
25
26
bool_t
27
xdr_domainname(XDR *xdrs, domainname *objp)
28
{
29
30
	if (!xdr_string(xdrs, objp, YPMAXDOMAIN))
31
		return (FALSE);
32
	return (TRUE);
33
}
34
35
bool_t
36
xdr_mapname(XDR *xdrs, mapname *objp)
37
{
38
39
	if (!xdr_string(xdrs, objp, YPMAXMAP))
40
		return (FALSE);
41
	return (TRUE);
42
}
43
44
bool_t
45
xdr_peername(XDR *xdrs, peername *objp)
46
{
47
48
	if (!xdr_string(xdrs, objp, YPMAXPEER))
49
		return (FALSE);
50
	return (TRUE);
51
}
52
53
bool_t
54
xdr_keydat(XDR *xdrs, keydat *objp)
55
{
56
57
	if (!xdr_bytes(xdrs, (char **)&objp->keydat_val,
58
	    (u_int *)&objp->keydat_len,
59
	    YPMAXRECORD))
60
		return (FALSE);
61
	return (TRUE);
62
}
63
64
bool_t
65
xdr_valdat(XDR *xdrs, valdat *objp)
66
{
67
68
	if (!xdr_bytes(xdrs, (char **)&objp->valdat_val,
69
	    (u_int *)&objp->valdat_len,
70
	    YPMAXRECORD))
71
		return (FALSE);
72
	return (TRUE);
73
}
74
75
bool_t
76
xdr_ypmap_parms(XDR *xdrs, ypmap_parms *objp)
77
{
78
79
80
	if (!xdr_domainname(xdrs, &objp->domain))
81
		return (FALSE);
82
	if (!xdr_mapname(xdrs, &objp->map))
83
		return (FALSE);
84
	if (!xdr_u_int(xdrs, &objp->ordernum))
85
		return (FALSE);
86
	if (!xdr_peername(xdrs, &objp->peer))
87
		return (FALSE);
88
	return (TRUE);
89
}
90
91
bool_t
92
xdr_ypreq_key(XDR *xdrs, ypreq_key *objp)
93
{
94
95
96
	if (!xdr_domainname(xdrs, &objp->domain))
97
		return (FALSE);
98
	if (!xdr_mapname(xdrs, &objp->map))
99
		return (FALSE);
100
	if (!xdr_keydat(xdrs, &objp->key))
101
		return (FALSE);
102
	return (TRUE);
103
}
104
105
bool_t
106
xdr_ypreq_nokey(XDR *xdrs, ypreq_nokey *objp)
107
{
108
109
110
	if (!xdr_domainname(xdrs, &objp->domain))
111
		return (FALSE);
112
	if (!xdr_mapname(xdrs, &objp->map))
113
		return (FALSE);
114
	return (TRUE);
115
}
116
117
bool_t
118
xdr_ypreq_xfr(XDR *xdrs, ypreq_xfr *objp)
119
{
120
121
122
	if (!xdr_ypmap_parms(xdrs, &objp->map_parms))
123
		return (FALSE);
124
	if (!xdr_u_int(xdrs, &objp->transid))
125
		return (FALSE);
126
	if (!xdr_u_int(xdrs, &objp->prog))
127
		return (FALSE);
128
	if (!xdr_u_int(xdrs, &objp->port))
129
		return (FALSE);
130
	return (TRUE);
131
}
132
133
bool_t
134
xdr_ypresp_val(XDR *xdrs, ypresp_val *objp)
135
{
136
137
138
	if (!xdr_ypstat(xdrs, &objp->stat))
139
		return (FALSE);
140
	if (!xdr_valdat(xdrs, &objp->val))
141
		return (FALSE);
142
	return (TRUE);
143
}
144
145
bool_t
146
xdr_ypresp_key_val(XDR *xdrs, ypresp_key_val *objp)
147
{
148
149
150
	if (!xdr_ypstat(xdrs, &objp->stat))
151
		return (FALSE);
152
	if (!xdr_valdat(xdrs, &objp->val))
153
		return (FALSE);
154
	if (!xdr_keydat(xdrs, &objp->key))
155
		return (FALSE);
156
	return (TRUE);
157
}
158
159
bool_t
160
xdr_ypresp_master(XDR *xdrs, ypresp_master *objp)
161
{
162
163
164
	if (!xdr_ypstat(xdrs, &objp->stat))
165
		return (FALSE);
166
	if (!xdr_peername(xdrs, &objp->peer))
167
		return (FALSE);
168
	return (TRUE);
169
}
170
171
bool_t
172
xdr_ypresp_order(XDR *xdrs, ypresp_order *objp)
173
{
174
175
176
	if (!xdr_ypstat(xdrs, &objp->stat))
177
		return (FALSE);
178
	if (!xdr_u_int(xdrs, &objp->ordernum))
179
		return (FALSE);
180
	return (TRUE);
181
}
182
183
bool_t
184
xdr_ypresp_all(XDR *xdrs, ypresp_all *objp)
185
{
186
187
	if (!xdr_bool(xdrs, &objp->more))
188
		return (FALSE);
189
	switch (objp->more) {
190
	case TRUE:
191
		if (!xdr_ypresp_key_val(xdrs, &objp->ypresp_all_u.val))
192
			return (FALSE);
193
		break;
194
	case FALSE:
195
		break;
196
	default:
197
		return (FALSE);
198
	}
199
	return (TRUE);
200
}
201
202
bool_t
203
xdr_ypresp_xfr(XDR *xdrs, ypresp_xfr *objp)
204
{
205
206
207
	if (!xdr_u_int(xdrs, &objp->transid))
208
		return (FALSE);
209
	if (!xdr_ypxfrstat(xdrs, &objp->xfrstat))
210
		return (FALSE);
211
	return (TRUE);
212
}
213
214
bool_t
215
xdr_ypmaplist(XDR *xdrs, ypmaplist *objp)
216
{
217
218
219
	if (!xdr_mapname(xdrs, &objp->map))
220
		return (FALSE);
221
	if (!xdr_pointer(xdrs, (char **)&objp->next, sizeof(ypmaplist), (xdrproc_t)xdr_ypmaplist))
222
		return (FALSE);
223
	return (TRUE);
224
}
225
226
bool_t
227
xdr_ypresp_maplist(XDR *xdrs, ypresp_maplist *objp)
228
{
229
230
231
	if (!xdr_ypstat(xdrs, &objp->stat))
232
		return (FALSE);
233
	if (!xdr_pointer(xdrs, (char **)&objp->maps, sizeof(ypmaplist), (xdrproc_t)xdr_ypmaplist))
234
		return (FALSE);
235
	return (TRUE);
236
}
237
238
bool_t
239
xdr_yppush_status(XDR *xdrs, yppush_status *objp)
240
{
241
242
	if (!xdr_enum(xdrs, (enum_t *)objp))
243
		return (FALSE);
244
	return (TRUE);
245
}
246
247
bool_t
248
xdr_yppushresp_xfr(XDR *xdrs, yppushresp_xfr *objp)
249
{
250
251
252
	if (!xdr_u_int(xdrs, &objp->transid))
253
		return (FALSE);
254
	if (!xdr_yppush_status(xdrs, &objp->status))
255
		return (FALSE);
256
	return (TRUE);
257
}
258
259
bool_t
260
xdr_ypbind_resptype(XDR *xdrs, ypbind_resptype *objp)
261
{
262
263
	if (!xdr_enum(xdrs, (enum_t *)objp))
264
		return (FALSE);
265
	return (TRUE);
266
}
267
268
bool_t
269
xdr_ypbind_binding(XDR *xdrs, ypbind_binding *objp)
270
{
271
272
273
	if (!xdr_opaque(xdrs, objp->ypbind_binding_addr, 4))
274
		return (FALSE);
275
	if (!xdr_opaque(xdrs, objp->ypbind_binding_port, 2))
276
		return (FALSE);
277
	return (TRUE);
278
}
279
280
bool_t
281
xdr_ypbind_resp(XDR *xdrs, ypbind_resp *objp)
282
{
283
284
	if (!xdr_ypbind_resptype(xdrs, &objp->ypbind_status))
285
		return (FALSE);
286
	switch (objp->ypbind_status) {
287
	case YPBIND_FAIL_VAL:
288
		if (!xdr_u_int(xdrs, &objp->ypbind_resp_u.ypbind_error))
289
			return (FALSE);
290
		break;
291
	case YPBIND_SUCC_VAL:
292
		if (!xdr_ypbind_binding(xdrs, &objp->ypbind_resp_u.ypbind_bindinfo))
293
			return (FALSE);
294
		break;
295
	default:
296
		return (FALSE);
297
	}
298
	return (TRUE);
299
}
300
301
bool_t
302
xdr_ypbind_setdom(XDR *xdrs, ypbind_setdom *objp)
303
{
304
305
306
	if (!xdr_domainname(xdrs, &objp->ypsetdom_domain))
307
		return (FALSE);
308
	if (!xdr_ypbind_binding(xdrs, &objp->ypsetdom_binding))
309
		return (FALSE);
310
	if (!xdr_u_int(xdrs, &objp->ypsetdom_vers))
311
		return (FALSE);
312
	return (TRUE);
313
}
314
bool_t xdr_ypresp_all_seq(XDR *, u_long *);