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 if ((*clnt->xa_init)(clnt, &mxa) < 0)
169 mxa.send_nds.pdu_scan_offset = sizeof (*reqhdr);
171 rc = ndr_encode_call(&mxa, params);
175 mxa.send_nds.pdu_scan_offset = 0;
181 mxa.send_hdr.common_hdr.frag_length = mxa.send_nds.pdu_size;
182 reqhdr->alloc_hint = mxa.send_nds.pdu_size -
185 rc = ndr_encode_pdu_hdr(&mxa);
189 if ((*clnt->xa_exchange)(clnt, &mxa) < 0) {
194 rc = ndr_decode_pdu_hdr(&mxa);
198 if (mxa.ptype != NDR_PTYPE_RESPONSE) {
203 rsphdr = &mxa.recv_hdr.common_hdr;
213 ndr_clnt_grow_pdu(&mxa);
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);
241 ndr_clnt_grow_pdu(ndr_xa_t *mxa)
243 ndr_response_hdr_t *hdr = &mxa->recv_hdr.response_hdr;
256 (void) NDS_GROW_PDU(&mxa->recv_nds, alloc_size, NULL);
266 ndr_clnt_init_hdr(ndr_client_t *clnt, ndr_xa_t *mxa)
268 ndr_common_header_t *hdr = &mxa->send_hdr.common_hdr;
294 ndr_clnt_get_frags(ndr_client_t *clnt, ndr_xa_t *mxa)
296 ndr_stream_t *nds = &mxa->recv_nds;
302 if (ndr_clnt_get_frag(clnt, mxa, &hdr) < 0) {
328 ndr_clnt_get_frag(ndr_client_t *clnt, ndr_xa_t *mxa, ndr_common_header_t *hdr)
330 ndr_stream_t *nds = &mxa->recv_nds;
337 if ((nbytes += (*clnt->xa_read)(clnt, mxa)) <= 0)
346 if ((nbytes = (*clnt->xa_read)(clnt, mxa)) <= 0)