Lines Matching defs:handle

300  * The mlsvc_handle_t is a wrapper that is used to associate an RPC handle
301 * with the client context for an instance of the interface. The handle
302 * is zeroed to ensure that it doesn't look like a valid handle -
303 * handle content is provided by the remove service.
305 * The client points to this top-level handle so that we know when to
306 * unbind and teardown the connection. As each handle is initialized it
315 ndr_rpc_bind(mlsvc_handle_t *handle, char *server, char *domain,
330 if (handle == NULL || server == NULL || domain == NULL)
441 clnt->handle = &handle->handle;
454 bzero(&handle->handle, sizeof (ndr_hdid_t));
455 handle->clnt = clnt;
456 bcopy(&svinfo, &handle->svinfo, sizeof (srvsvc_server_info_t));
458 if (ndr_rpc_get_heap(handle) == NULL) {
472 handle->clnt = NULL;
564 ndr_rpc_unbind(mlsvc_handle_t *handle)
566 ndr_client_t *clnt = handle->clnt;
575 bzero(handle, sizeof (mlsvc_handle_t));
580 * identified by the handle, which should have been initialized by
588 ndr_rpc_call(mlsvc_handle_t *handle, int opnum, void *params)
590 ndr_client_t *clnt = handle->clnt;
593 if (ndr_rpc_get_heap(handle) == NULL)
605 ndr_rpc_release(handle);
613 * Some MSRPC services declare an RPC binding handle based on the
616 * The services are inconsistent on handle validation by the server.
618 * The RPC binding handle may be explicitly declared as a handle
622 * typedef [handle] wchar_t *RPC_HANDLE;
642 ndr_rpc_derive_nbhandle(mlsvc_handle_t *handle, const char *server)
646 if ((nbhandle = ndr_rpc_malloc(handle, NDR_BIND_NBNAME_SZ)) == NULL)
657 ndr_rpc_set_nonull(mlsvc_handle_t *handle)
659 handle->clnt->nonull = B_TRUE;
666 ndr_rpc_server_info(mlsvc_handle_t *handle)
668 return (&handle->svinfo);
675 ndr_rpc_server_os(mlsvc_handle_t *handle)
677 return (handle->svinfo.sv_os);
681 * Get the session key from a bound RPC client handle.
695 ndr_rpc_get_ssnkey(mlsvc_handle_t *handle,
698 ndr_client_t *clnt = handle->clnt;
709 ndr_rpc_malloc(mlsvc_handle_t *handle, size_t size)
713 if ((heap = ndr_rpc_get_heap(handle)) == NULL)
720 ndr_rpc_get_heap(mlsvc_handle_t *handle)
722 ndr_client_t *clnt = handle->clnt;
737 ndr_rpc_release(mlsvc_handle_t *handle)
739 ndr_client_t *clnt = handle->clnt;
750 * Returns true if the handle is null.
754 ndr_is_null_handle(mlsvc_handle_t *handle)
758 if (handle == NULL || handle->clnt == NULL)
761 if (!memcmp(&handle->handle, &zero_handle, sizeof (ndr_hdid_t)))
768 * Returns true if the handle is the top level bind handle.
772 ndr_is_bind_handle(mlsvc_handle_t *handle)
774 return (handle->clnt->handle == &handle->handle);
788 ndr_rpc_status(mlsvc_handle_t *handle, int opnum, DWORD status)
812 if (handle) {
813 svc = handle->clnt->binding->service;