Lines Matching refs:xdrs

62 typeset_emit_type(XDR *xdrs, adr_typeset_t *typeset, adr_type_t *type)
64 assert(xdrs->x_op != XDR_DECODE);
68 if (!xdr_int(xdrs, (int *)&type->t_type) ||
69 !xdr_typeref_t(xdrs, typeset, type->t_aux.t_array))
73 if (!xdr_int(xdrs, (int *)&type->t_type) ||
74 !xdr_string(xdrs, (char **)&type->adr_t_name, -1) ||
75 !xdr_u_int(xdrs, &type->t_size))
79 if (!xdr_string(xdrs, (char **)&field->sf_name, -1) ||
80 !xdr_bool(xdrs, (int *)&field->sf_nullable) ||
81 !xdr_typeref_t(xdrs, typeset, field->sf_type))
90 if (!xdr_int(xdrs, (int *)&type->t_type) ||
91 !xdr_string(xdrs, (char **)&type->adr_t_name, -1) ||
92 !xdr_typeref_t(xdrs, typeset, type->t_aux.t_union.type) ||
93 !xdr_bool(xdrs, &dflt) ||
95 (!xdr_bool(xdrs, (int *)&dfltarm->ua_nullable) ||
96 !xdr_typeref_t(xdrs, typeset, dfltarm->ua_type))) ||
97 !xdr_u_int(xdrs, &type->t_size))
102 if (!xdr_data_t(xdrs, ua->ua_value) ||
103 !xdr_bool(xdrs, (int *)&ua->ua_nullable) ||
104 !xdr_typeref_t(xdrs, typeset, ua->ua_type))
113 if (!xdr_int(xdrs, (int *)&type->t_type) ||
114 !xdr_string(xdrs, (char **)&type->adr_t_name, -1) ||
115 !xdr_bool(xdrs, &fallback) ||
116 (fallback && !xdr_string(xdrs, (char **)&fbname, -1)) ||
117 !xdr_u_int(xdrs, &type->t_size))
122 if (!xdr_string(xdrs, (char **)&ev->ev_name, -1) ||
123 !xdr_int(xdrs, &ev->ev_value))
134 typeset_read_type(XDR *xdrs, adr_typeset_t *typeset)
136 assert(xdrs->x_op == XDR_DECODE);
139 if (!xdr_int(xdrs, &ttype))
156 if (!xdr_r_typeref_t(xdrs, typeset, &atype))
164 if (!xdr_string(xdrs, &name, -1))
168 if (!xdr_u_int(xdrs, &result->t_size) ||
175 if (!xdr_string(xdrs, (char **)&f->sf_name, -1) ||
176 !xdr_bool(xdrs, &fopt) ||
177 !xdr_r_typeref_t(xdrs, typeset, &f->sf_type))
189 if (!xdr_string(xdrs, &name, -1) ||
190 !xdr_r_typeref_t(xdrs, typeset, &utype))
195 if (!xdr_bool(xdrs, &dflt) ||
197 !xdr_bool(xdrs, &dfltopt) ||
198 !xdr_r_typeref_t(xdrs, typeset, &dflttype))))
201 if (!xdr_u_int(xdrs, &result->t_size) ||
214 if (!xdr_r_data_t(xdrs, &ua->ua_value, utype, NULL) ||
215 !xdr_bool(xdrs, (int *)&ua->ua_nullable) ||
216 !xdr_r_typeref_t(xdrs, typeset, &ua->ua_type))
226 if (!xdr_string(xdrs, &name, -1))
230 if (!xdr_bool(xdrs, &fallback) ||
231 (fallback && !xdr_string(xdrs, &fbname, -1)))
234 if (!xdr_u_int(xdrs, &result->t_size) ||
245 if (!xdr_string(xdrs, (char **)&e->ev_name, -1) ||
246 !xdr_int(xdrs, &eval))
267 xdr_typeref_t(XDR *xdrs, adr_typeset_t *typeset, adr_type_t *type)
269 if (!xdr_int(xdrs, (int *)&type->t_type))
278 if (!xdr_int(xdrs, &tnum))
285 xdr_r_typeref_t(XDR *xdrs, adr_typeset_t *typeset, adr_type_t **typep)
288 if (!xdr_int(xdrs, &ttype) || !ADR_DT_VALID(ttype))
297 if (!xdr_int(xdrs, &tnum) ||
306 xdr_typeset_t(XDR *xdrs, adr_typeset_t *typeset)
308 if (!xdr_int(xdrs, &typeset->TS_USED))
312 if (!typeset_emit_type(xdrs, typeset, type))
319 xdr_r_typeset_t(XDR *xdrs, adr_typeset_t **typesetp)
323 if (!xdr_int(xdrs, &ntypes))
330 if (!typeset_read_type(xdrs, result)) {
351 xdr_errortype_t(XDR *xdrs, adr_typeset_t *typeset, adr_type_t *type)
353 assert(xdrs->x_op != XDR_DECODE);
356 if (!xdr_bool(xdrs, &b))
359 return (xdr_typeref_t(xdrs, typeset, type));
364 xdr_r_errortype_t(XDR *xdrs, adr_typeset_t *typeset, adr_type_t **type)
366 assert(xdrs->x_op == XDR_DECODE);
369 if (!xdr_bool(xdrs, &b))
372 return (xdr_r_typeref_t(xdrs, typeset, type));
378 xdr_stability_t(XDR *xdrs, adr_stability_t *stability)
380 if (!xdr_enum(xdrs, (int *)stability))
386 xdr_version_t(XDR *xdrs, adr_version_t *version)
388 if (!xdr_stability_t(xdrs, &version->av_stability) ||
389 !xdr_int(xdrs, &version->av_major) ||
390 !xdr_int(xdrs, &version->av_minor))
402 xdr_iface_t(XDR *xdrs, adr_object_t **objp, int nparents)
407 if (xdrs->x_op == XDR_DECODE) {
425 if (!xdr_iface_t(xdrs, &obj->ao_parents[i], 0))
427 if (!xdr_string(xdrs, (char **)&obj->ao_ifname, -1))
430 if (!xdr_version_t(xdrs, &obj->ao_versions[i]))
448 xdr_object_t(XDR *xdrs, adr_typeset_t *typeset, adr_object_t *obj)
452 assert(xdrs->x_op != XDR_DECODE);
458 if (!xdr_string(xdrs, (char **)&obj->ao_aname, -1) ||
459 !xdr_int(xdrs, &n) ||
460 !xdr_iface_t(xdrs, &obj, 0))
467 if (!xdr_typeset_t(xdrs, typeset))
473 if (!xdr_int(xdrs, &obj->ao_nattributes))
479 if (!xdr_string(xdrs, (char **)&a->aa_name, -1) ||
480 !xdr_stability_t(xdrs, &a->aa_stability) ||
481 !xdr_bool(xdrs, &br) ||
482 !xdr_bool(xdrs, &bw) ||
483 !xdr_bool(xdrs, (int *)&a->aa_nullable) ||
484 !xdr_typeref_t(xdrs, typeset, a->aa_type) ||
485 !xdr_errortype_t(xdrs, typeset, a->aa_read_error) ||
486 !xdr_errortype_t(xdrs, typeset, a->aa_write_error))
493 if (!xdr_int(xdrs, &obj->ao_nmethods))
497 if (!xdr_string(xdrs, (char **)&m->am_name, -1) ||
498 !xdr_stability_t(xdrs, &m->am_stability) ||
499 !xdr_bool(xdrs, (int *)&m->am_nullable) ||
500 !xdr_typeref_t(xdrs, typeset, m->am_result) ||
501 !xdr_errortype_t(xdrs, typeset, m->am_error) ||
502 !xdr_int(xdrs, &m->am_nargs))
507 if (!xdr_string(xdrs, (char **)&p->ap_name, -1) ||
508 !xdr_bool(xdrs, (int *)&p->ap_nullable) ||
509 !xdr_typeref_t(xdrs, typeset, p->ap_type))
517 if (!xdr_int(xdrs, &obj->ao_nevents))
521 if (!xdr_string(xdrs, (char **)&e->ae_name, -1) ||
522 !xdr_stability_t(xdrs, &e->ae_stability) ||
523 !xdr_typeref_t(xdrs, typeset, e->ae_type))
534 xdr_r_object_t(XDR *xdrs, adr_object_t **obj)
536 assert(xdrs->x_op == XDR_DECODE);
547 if (!xdr_string(xdrs, (char **)&result->ao_aname, -1) ||
548 !xdr_int(xdrs, &n) ||
549 !xdr_iface_t(xdrs, &result, n))
552 if (!xdr_r_typeset_t(xdrs, &typeset))
558 if (!xdr_int(xdrs, &n))
570 if (!xdr_string(xdrs, (char **)&attr->aa_name, -1) ||
571 !xdr_stability_t(xdrs, &attr->aa_stability) ||
572 !xdr_bool(xdrs, (bool_t *)&attr->aa_readable) ||
573 !xdr_bool(xdrs, (bool_t *)&attr->aa_writeable) ||
574 !xdr_bool(xdrs, (bool_t *)&attr->aa_nullable) ||
575 !xdr_r_typeref_t(xdrs, typeset, &attr->aa_type) ||
576 !xdr_r_errortype_t(xdrs, typeset, &attr->aa_read_error) ||
577 !xdr_r_errortype_t(xdrs, typeset, &attr->aa_write_error))
584 if (!xdr_int(xdrs, &n))
596 if (!xdr_string(xdrs, (char **)&method->am_name, -1) ||
597 !xdr_stability_t(xdrs, &method->am_stability) ||
598 !xdr_bool(xdrs, (bool_t *)&method->am_nullable) ||
599 !xdr_r_typeref_t(xdrs, typeset, &method->am_result) ||
600 !xdr_r_errortype_t(xdrs, typeset, &method->am_error) ||
601 !xdr_int(xdrs, &n))
611 if (!xdr_string(xdrs, (char **)&p->ap_name, -1) ||
612 !xdr_bool(xdrs, (bool_t *)&p->ap_nullable) ||
613 !xdr_r_typeref_t(xdrs, typeset, &p->ap_type))
621 if (!xdr_int(xdrs, &n))
630 if (!xdr_string(xdrs, (char **)&e->ae_name, -1) ||
631 !xdr_stability_t(xdrs, &e->ae_stability) ||
632 !xdr_r_typeref_t(xdrs, typeset, &e->ae_type))
651 xdr_data_t(XDR *xdrs, adr_data_t *data)
655 assert(xdrs->x_op != XDR_DECODE);
659 if (!xdr_bool(xdrs, (int *)&data->d_data.boolean))
663 if (!xdr_int(xdrs, &data->d_data.integer))
667 if (!xdr_hyper(xdrs, &data->d_data.longint))
671 if (!xdr_u_int(xdrs, &data->d_data.uinteger))
675 if (!xdr_u_hyper(xdrs, &data->d_data.ulongint))
679 if (!xdr_float(xdrs, &data->d_data.afloat))
683 if (!xdr_double(xdrs, &data->d_data.adouble))
691 if (!xdr_wiretime(xdrs, &tv))
696 if (!xdr_string(xdrs, (char **)&data->d_data.string, -1))
700 if (!xdr_string(xdrs, (char **)&data->d_data.string, -1))
707 if (!xdr_string(xdrs, &tmp, -1)) {
715 if (!xdr_u_int(xdrs, &data->d_rsize))
719 if (!xdr_data_t(xdrs, adr_array_get(data, i)))
728 if (!xdr_optdata_t(xdrs, data->d_data.array[i]))
731 if (!xdr_data_t(xdrs, data->d_data.array[i]))
738 if (!xdr_int(xdrs, &data->d_data.integer))
743 if (!xdr_bytes(xdrs, (char **)&data->d_data.opaque,
752 if (!xdr_u_int(xdrs, &data->d_rsize) ||
754 !xdr_data_t(xdrs, data->d_data.aunion.value)))
759 !xdr_optdata_t(xdrs, data->d_data.aunion.data) :
760 !xdr_data_t(xdrs, data->d_data.aunion.data)))
773 xdr_r_data_t(XDR *xdrs, adr_data_t **data, adr_type_t *type, char *buf)
775 assert(xdrs->x_op == XDR_DECODE);
780 if (!xdr_bool(xdrs, &b) ||
787 if (!xdr_int(xdrs, &i) ||
794 if (!xdr_hyper(xdrs, &l) ||
801 if (!xdr_u_int(xdrs, &ui) ||
808 if (!xdr_u_hyper(xdrs, &ul) ||
815 if (!xdr_float(xdrs, &f) ||
822 if (!xdr_double(xdrs, &d) ||
829 if (!xdr_wiretime(xdrs, &tv) ||
837 if (!xdr_string(xdrs, &c, -1))
848 if (!xdr_string(xdrs, &c, -1) ||
856 if (!xdr_string(xdrs, &c, -1) ||
866 if (!xdr_int(xdrs, &count))
870 if (!xdr_control(xdrs, XDR_GET_BYTES_AVAIL, &bytes) ||
881 if (!xdr_r_data_t(xdrs, &(*data)->d_data.array[i],
904 if (!xdr_r_optdata_t(xdrs, &d, sf->sf_type))
907 if (!xdr_r_data_t(xdrs, &d, sf->sf_type, buf))
924 if (!xdr_u_int(xdrs, &len))
928 if (!xdr_control(xdrs, XDR_GET_BYTES_AVAIL, &bytes) ||
937 if (!xdr_opaque(xdrs, c, len)) {
947 if (!xdr_int(xdrs, &index) || index > type->t_size || index < 0)
963 if (!xdr_u_int(xdrs, &index) || index > type->t_size)
971 if (!xdr_r_data_t(xdrs, &arm, type->t_aux.t_union.type,
987 !xdr_r_optdata_t(xdrs, &value, ua->ua_type) :
988 !xdr_r_data_t(xdrs, &value, ua->ua_type, buf))) {
1015 xdr_optdata_t(XDR *xdrs, adr_data_t *data)
1017 assert(xdrs->x_op != XDR_DECODE);
1020 if (!xdr_bool(xdrs, &b))
1023 return (xdr_data_t(xdrs, data));
1031 xdr_r_optdata_t(XDR *xdrs, adr_data_t **data, adr_type_t *type)
1033 assert(xdrs->x_op == XDR_DECODE);
1036 if (!xdr_bool(xdrs, &b))
1039 return (xdr_r_data_t(xdrs, data, type, NULL));