Lines Matching refs:mxa
46 ndr_xa_t mxa;
53 bzero(&mxa, sizeof (mxa));
59 mxa.binding_list = clnt->binding_list;
60 if ((mbind = ndr_svc_new_binding(&mxa)) == NULL)
63 ndr_clnt_init_hdr(clnt, &mxa);
65 bhdr = &mxa.send_hdr.bind_hdr;
93 if ((*clnt->xa_init)(clnt, &mxa) < 0)
96 rc = ndr_encode_pdu_hdr(&mxa);
100 if ((*clnt->xa_exchange)(clnt, &mxa) < 0) {
105 rc = ndr_decode_pdu_hdr(&mxa);
110 (*clnt->xa_destruct)(clnt, &mxa);
112 bahdr = &mxa.recv_hdr.bind_ack_hdr;
114 if (mxa.ptype != NDR_PTYPE_BIND_ACK)
135 (*clnt->xa_destruct)(clnt, &mxa);
144 ndr_xa_t mxa;
153 bzero(&mxa, sizeof (mxa));
154 mxa.ptype = NDR_PTYPE_REQUEST;
155 mxa.opnum = opnum;
156 mxa.binding = mbind;
158 ndr_clnt_init_hdr(clnt, &mxa);
160 reqhdr = &mxa.send_hdr.request_hdr;
165 rc = (*clnt->xa_init)(clnt, &mxa);
170 mxa.send_nds.pdu_scan_offset = sizeof (*reqhdr);
172 rc = ndr_encode_call(&mxa, params);
176 mxa.send_nds.pdu_scan_offset = 0;
182 mxa.send_hdr.common_hdr.frag_length = mxa.send_nds.pdu_size;
183 reqhdr->alloc_hint = mxa.send_nds.pdu_size -
186 rc = ndr_encode_pdu_hdr(&mxa);
190 rc = (*clnt->xa_exchange)(clnt, &mxa);
194 rc = ndr_decode_pdu_hdr(&mxa);
198 if (mxa.ptype != NDR_PTYPE_RESPONSE) {
203 rsphdr = &mxa.recv_hdr.common_hdr;
213 (void) NDS_GROW_PDU(&mxa.recv_nds, NDR_MULTI_FRAGSZ, NULL);
215 recv_pdu_scan_offset = mxa.recv_nds.pdu_scan_offset;
216 mxa.recv_nds.pdu_scan_offset = rsphdr->frag_length;
217 mxa.recv_nds.pdu_size = rsphdr->frag_length;
219 if (ndr_clnt_get_frags(clnt, &mxa) < 0) {
224 mxa.recv_nds.pdu_scan_offset = recv_pdu_scan_offset;
227 rc = ndr_decode_return(&mxa, params);
231 (*clnt->xa_preserve)(clnt, &mxa);
232 (*clnt->xa_destruct)(clnt, &mxa);
236 (*clnt->xa_destruct)(clnt, &mxa);
247 ndr_clnt_init_hdr(ndr_client_t *clnt, ndr_xa_t *mxa)
249 ndr_common_header_t *hdr = &mxa->send_hdr.common_hdr;
275 ndr_clnt_get_frags(ndr_client_t *clnt, ndr_xa_t *mxa)
277 ndr_stream_t *nds = &mxa->recv_nds;
283 if (ndr_clnt_get_frag(clnt, mxa, &hdr) < 0) {
309 ndr_clnt_get_frag(ndr_client_t *clnt, ndr_xa_t *mxa, ndr_common_header_t *hdr)
311 ndr_stream_t *nds = &mxa->recv_nds;
318 if ((nbytes += (*clnt->xa_read)(clnt, mxa)) <= 0)
327 if ((nbytes = (*clnt->xa_read)(clnt, mxa)) <= 0)