Lines Matching refs:clnt

66 	ndr_client_t	*clnt = NULL;  in mlrpc_clh_create()  local
74 if ((clnt = calloc(1, sizeof (*clnt))) == NULL) in mlrpc_clh_create()
77 clnt->xa_fd = -1; in mlrpc_clh_create()
83 clnt->xa_private = ctx; in mlrpc_clh_create()
84 clnt->xa_init = ndr_xa_init; in mlrpc_clh_create()
85 clnt->xa_exchange = ndr_xa_exchange; in mlrpc_clh_create()
86 clnt->xa_read = ndr_xa_read; in mlrpc_clh_create()
87 clnt->xa_preserve = ndr_xa_preserve; in mlrpc_clh_create()
88 clnt->xa_destruct = ndr_xa_destruct; in mlrpc_clh_create()
89 clnt->xa_release = ndr_xa_release; in mlrpc_clh_create()
92 clnt->handle = &handle->handle; in mlrpc_clh_create()
94 ndr_svc_binding_pool_init(&clnt->binding_list, in mlrpc_clh_create()
95 clnt->binding_pool, NDR_N_BINDING_POOL); in mlrpc_clh_create()
97 if ((clnt->heap = ndr_heap_create()) == NULL) in mlrpc_clh_create()
102 handle->clnt = clnt; in mlrpc_clh_create()
106 free(clnt); in mlrpc_clh_create()
116 ndr_client_t *clnt = NULL; in mlrpc_clh_set_auth() local
118 if ((clnt = handle->clnt) == NULL) in mlrpc_clh_set_auth()
123 clnt->auth_ctx = *auth_ctx; in mlrpc_clh_set_auth()
157 ndr_client_t *clnt = NULL; in mlrpc_clh_bind() local
163 if ((clnt = handle->clnt) == NULL) in mlrpc_clh_bind()
165 if ((ctx = clnt->xa_private) == NULL) in mlrpc_clh_bind()
167 if (clnt->xa_fd != -1) in mlrpc_clh_bind()
205 clnt->xa_fd = fd; in mlrpc_clh_bind()
213 rc = ndr_clnt_bind(clnt, svc, &clnt->binding); in mlrpc_clh_bind()
235 clnt->xa_fd = -1; in mlrpc_clh_bind()
250 ndr_client_t *clnt = handle->clnt; in mlrpc_clh_unbind() local
252 if (clnt->xa_fd != -1) { in mlrpc_clh_unbind()
253 (void) smb_fh_close(clnt->xa_fd); in mlrpc_clh_unbind()
254 clnt->xa_fd = -1; in mlrpc_clh_unbind()
271 ndr_client_t *clnt = handle->clnt; in mlrpc_clh_free() local
274 if (clnt == NULL) in mlrpc_clh_free()
284 assert(handle->clnt->handle == &handle->handle); in mlrpc_clh_free()
288 if (clnt->heap_preserved) in mlrpc_clh_free()
289 ndr_clnt_free_heap(clnt); /* xa_release */ in mlrpc_clh_free()
291 ndr_heap_destroy(clnt->heap); in mlrpc_clh_free()
297 private = clnt->xa_private; in mlrpc_clh_free()
298 free(clnt); in mlrpc_clh_free()
315 ndr_client_t *clnt = handle->clnt; in ndr_rpc_call() local
321 rc = ndr_clnt_call(clnt->binding, opnum, params); in ndr_rpc_call()
327 clnt->nonull = B_FALSE; in ndr_rpc_call()
343 handle->clnt->nonull = B_TRUE; in ndr_rpc_set_nonull()
360 ndr_client_t *clnt = handle->clnt; in ndr_rpc_get_ssnkey() local
362 if (clnt == NULL || clnt->xa_fd == -1) in ndr_rpc_get_ssnkey()
365 return (smb_fh_getssnkey(clnt->xa_fd, key, len)); in ndr_rpc_get_ssnkey()
382 ndr_client_t *clnt = handle->clnt; in ndr_rpc_get_heap() local
384 if (clnt->heap == NULL) in ndr_rpc_get_heap()
385 clnt->heap = ndr_heap_create(); in ndr_rpc_get_heap()
387 return (clnt->heap); in ndr_rpc_get_heap()
399 ndr_client_t *clnt = handle->clnt; in ndr_rpc_release() local
401 if (clnt->heap_preserved) in ndr_rpc_release()
402 ndr_clnt_free_heap(clnt); in ndr_rpc_release()
404 ndr_heap_destroy(clnt->heap); in ndr_rpc_release()
406 clnt->heap = NULL; in ndr_rpc_release()
418 if (handle == NULL || handle->clnt == NULL) in ndr_is_null_handle()
434 return (handle->clnt->handle == &handle->handle); in ndr_is_bind_handle()
443 child->clnt = parent->clnt; in ndr_inherit_handle()
455 ndr_xa_init(ndr_client_t *clnt, ndr_xa_t *mxa) in ndr_xa_init() argument
459 ndr_heap_t *heap = clnt->heap; in ndr_xa_init()
466 clnt->heap = heap; in ndr_xa_init()
481 clnt->heap = NULL; in ndr_xa_init()
485 if (clnt->nonull) in ndr_xa_init()
499 ndr_xa_exchange(ndr_client_t *clnt, ndr_xa_t *mxa) in ndr_xa_exchange() argument
506 err = smb_fh_xactnp(clnt->xa_fd, in ndr_xa_exchange()
529 ndr_xa_read(ndr_client_t *clnt, ndr_xa_t *mxa) in ndr_xa_read() argument
538 nbytes = smb_fh_read(clnt->xa_fd, 0, len, in ndr_xa_read()
559 ndr_xa_preserve(ndr_client_t *clnt, ndr_xa_t *mxa) in ndr_xa_preserve() argument
561 assert(clnt->heap == mxa->heap); in ndr_xa_preserve()
563 clnt->heap_preserved = B_TRUE; in ndr_xa_preserve()
572 ndr_xa_destruct(ndr_client_t *clnt, ndr_xa_t *mxa) in ndr_xa_destruct() argument
577 if (!clnt->heap_preserved) { in ndr_xa_destruct()
580 clnt->heap = NULL; in ndr_xa_destruct()
588 ndr_xa_release(ndr_client_t *clnt) in ndr_xa_release() argument
590 if (clnt->heap_preserved) { in ndr_xa_release()
591 ndr_heap_destroy(clnt->heap); in ndr_xa_release()
592 clnt->heap = NULL; in ndr_xa_release()
593 clnt->heap_preserved = B_FALSE; in ndr_xa_release()