srvcall.c revision 78a072e1b56619e3230735ae073668311232ec94
/*
Copyright (c) 1989 - 1999 Microsoft Corporation
Module Name:
Abstract:
This module implements the routines for handling the creation/manipulation of
server entries in the connection engine database. It also contains the routines
for parsing the negotiate response from the server.
--*/
#include "precomp.h"
#pragma hdrstop
/*++
Routine Description:
This routine patches the RDBSS created srv call instance with the
information required by the mini redirector.
Arguments:
CallBackContext - the call back context in RDBSS for continuation.
Return Value:
RXSTATUS - The return status for the operation
--*/
{
PMRX_SRVCALLDOWN_STRUCTURE SrvCalldownStructure = (PMRX_SRVCALLDOWN_STRUCTURE)(SCCBC->SrvCalldownStructure);
/* Validate the server name with the test name of 'vboxsvr'. */
Log(("VBOXSF: ExecuteCreateSrvCall: Connection Name %.*ls Length: %d, pSrvCall = %p\n", pSrvCall->pSrvCallName->Length / sizeof(WCHAR), pSrvCall->pSrvCallName->Buffer, pSrvCall->pSrvCallName->Length, pSrvCall));
Log(("VBOXSF: ExecuteCreateSrvCall: Principal name = %.*ls\n", pSrvCall->pPrincipalName->Length / sizeof(WCHAR), pSrvCall->pPrincipalName->Buffer));
Log(("VBOXSF: ExecuteCreateSrvCall: Domain name = %.*ls\n", pSrvCall->pDomainName->Length / sizeof(WCHAR), pSrvCall->pDomainName->Buffer));
{
/* Both vboxsvr & vboxsrv are now accepted */
{
}
else
{
}
}
else
{
}
if (Verifier)
{
Log(("VBOXSF: ExecuteCreateSrvCall: Verifier succeeded!\n"));
}
else
{
Log(("VBOXSF: ExecuteCreateSrvCall: Verifier failed!\n"));
}
}
NTSTATUS VBoxMRxCreateSrvCall (PMRX_SRV_CALL pSrvCall, PMRX_SRVCALL_CALLBACK_CONTEXT pCallbackContext)
/*++
Routine Description:
This routine patches the RDBSS created srv call instance with the information required
by the mini redirector.
Arguments:
CallBackContext - the call back context in RDBSS for continuation.
Return Value:
RXSTATUS - The return status for the operation
--*/
{
PMRX_SRVCALLDOWN_STRUCTURE SrvCalldownStructure = (PMRX_SRVCALLDOWN_STRUCTURE)(pCallbackContext->SrvCalldownStructure);
//
// If this request was made on behalf of the RDBSS, do ExecuteCreatSrvCall
// immediately. If the request was made from somewhere else, create a work item
// and place it on a queue for a worker thread to process later. This distinction
// is made to simplify transport handle management.
//
if (IoGetCurrentProcess() == RxGetRDBSSProcess())
{
Log(("VBOXSF: VBoxMRxCreateSrvCall: Called in context of RDBSS process\n"));
//
// Peform the processing immediately because RDBSS is the initiator of this
// request
//
}
else
{
Log(("VBOXSF: VBoxMRxCreateSrvCall: Dispatching to worker thread\n"));
//
// Dispatch the request to a worker thread because the redirected drive
// buffering sub-system (RDBSS) was not the initiator
//
Status = RxDispatchToWorkerThread(VBoxMRxDeviceObject, DelayedWorkQueue, (PWORKER_THREAD_ROUTINE)ExecuteCreateSrvCall, /* explicit cast for first parameter type */
if (Status == STATUS_SUCCESS)
{
Log(("VBOXSF: VBoxMRxCreateSrvCall: queued!\n"));
}
else
{
}
}
//
// The wrapper expects PENDING.
//
return STATUS_PENDING;
}
/*++
Routine Description:
This routine destroys a given server call instance
Arguments:
pSrvCall - the server call instance to be disconnected.
Force - TRUE if a disconnection is to be enforced immediately.
Return Value:
RXSTATUS - The return status for the operation
--*/
{
return (Status);
}
NTSTATUS VBoxMRxSrvCallWinnerNotify (IN PMRX_SRV_CALL pSrvCall, IN BOOLEAN ThisMinirdrIsTheWinner, IN OUT PVOID pSrvCallContext)
/*++
Routine Description:
This routine finalizes the mini rdr context associated with an RDBSS Server call instance
Arguments:
pSrvCall - the Server Call
ThisMinirdrIsTheWinner - TRUE if this mini rdr is the choosen one.
pSrvCallContext - the server call context created by the mini redirector.
Return Value:
RXSTATUS - The return status for the operation
Notes:
The two phase construction protocol for Server calls is required because of parallel
initiation of a number of mini redirectors. The RDBSS finalizes the particular mini
redirector to be used in communicating with a given server based on quality of
service criterion.
--*/
{
{
}
return (Status);
}