Lines Matching refs:clnt
89 ndr_client_t *clnt = NULL;
167 if ((clnt = malloc(sizeof (ndr_client_t))) == NULL) {
171 bzero(clnt, sizeof (ndr_client_t));
173 clnt->handle = &handle->handle;
174 clnt->xa_init = ndr_xa_init;
175 clnt->xa_exchange = ndr_xa_exchange;
176 clnt->xa_read = ndr_xa_read;
177 clnt->xa_preserve = ndr_xa_preserve;
178 clnt->xa_destruct = ndr_xa_destruct;
179 clnt->xa_release = ndr_xa_release;
180 clnt->xa_private = ctx;
181 clnt->xa_fd = fd;
183 ndr_svc_binding_pool_init(&clnt->binding_list,
184 clnt->binding_pool, NDR_N_BINDING_POOL);
186 if ((clnt->heap = ndr_heap_create()) == NULL) {
195 handle->clnt = clnt;
201 rc = ndr_clnt_bind(clnt, service, &clnt->binding);
224 handle->clnt = NULL;
225 if (clnt != NULL) {
226 ndr_heap_destroy(clnt->heap);
227 free(clnt);
250 ndr_client_t *clnt = handle->clnt;
251 struct smb_ctx *ctx = clnt->xa_private;
253 if (clnt->heap_preserved)
254 ndr_clnt_free_heap(clnt);
256 ndr_heap_destroy(clnt->heap);
258 (void) smb_fh_close(clnt->xa_fd);
260 free(clnt);
276 ndr_client_t *clnt = handle->clnt;
282 rc = ndr_clnt_call(clnt->binding, opnum, params);
288 clnt->nonull = B_FALSE;
304 handle->clnt->nonull = B_TRUE;
340 ndr_client_t *clnt = handle->clnt;
343 if (clnt == NULL)
346 rc = smb_fh_getssnkey(clnt->xa_fd, ssn_key, len);
364 ndr_client_t *clnt = handle->clnt;
366 if (clnt->heap == NULL)
367 clnt->heap = ndr_heap_create();
369 return (clnt->heap);
381 ndr_client_t *clnt = handle->clnt;
383 if (clnt->heap_preserved)
384 ndr_clnt_free_heap(clnt);
386 ndr_heap_destroy(clnt->heap);
388 clnt->heap = NULL;
400 if (handle == NULL || handle->clnt == NULL)
416 return (handle->clnt->handle == &handle->handle);
425 child->clnt = parent->clnt;
452 svc = handle->clnt->binding->service;
465 ndr_xa_init(ndr_client_t *clnt, ndr_xa_t *mxa)
469 ndr_heap_t *heap = clnt->heap;
476 clnt->heap = heap;
491 clnt->heap = NULL;
495 if (clnt->nonull)
509 ndr_xa_exchange(ndr_client_t *clnt, ndr_xa_t *mxa)
516 err = smb_fh_xactnp(clnt->xa_fd,
539 ndr_xa_read(ndr_client_t *clnt, ndr_xa_t *mxa)
548 nbytes = smb_fh_read(clnt->xa_fd, 0, len,
569 ndr_xa_preserve(ndr_client_t *clnt, ndr_xa_t *mxa)
571 assert(clnt->heap == mxa->heap);
573 clnt->heap_preserved = B_TRUE;
582 ndr_xa_destruct(ndr_client_t *clnt, ndr_xa_t *mxa)
587 if (!clnt->heap_preserved) {
590 clnt->heap = NULL;
598 ndr_xa_release(ndr_client_t *clnt)
600 if (clnt->heap_preserved) {
601 ndr_heap_destroy(clnt->heap);
602 clnt->heap = NULL;
603 clnt->heap_preserved = B_FALSE;