161 RxAssert(#exp, __FILE__, __LINE__, NULL); \
167#undef RxAllocatePoolWithTag
170#define RxAllocatePool(P, S) _RxAllocatePoolWithTag(P, S, 0)
171#define RxAllocatePoolWithTag _RxAllocatePoolWithTag
172#define RxFreePool _RxFreePool
173#define RxFreePoolWithTag _RxFreePoolWithTag
302 DPRINT(
"RxAddVirtualNetRootToNetRoot(%p, %p)\n", NetRoot, VNetRoot);
321 PVOID AlreadyAllocatedObject)
329 ULONG NonPagedSize, FobxSize, SrvOpenSize, FcbSize;
349 FobxSize =
sizeof(
FOBX);
364 FobxSize =
sizeof(
FOBX);
374 FcbSize =
sizeof(
FCB);
397 FobxSize =
sizeof(
FOBX);
406 if (AlreadyAllocatedObject !=
NULL)
408 Buffer = AlreadyAllocatedObject;
449 if (NonPagedFcb ==
NULL)
455 PAPNBuffer =
Add2Ptr(
Buffer, FcbSize + SrvOpenSize + FobxSize);
460 NonPagedFcb =
Add2Ptr(Fobx, FobxSize);
461 PAPNBuffer =
Add2Ptr(Fobx, FobxSize + NonPagedSize);
507 Fcb->CopyOfNonPaged = NonPagedFcb;
508 NonPagedFcb->FcbBackPointer =
Fcb;
731 Fobx = (
PFOBX)RxContext->pFobx;
739 RxContext->RxContextSerializationQLinks.Flink !=
NULL &&
748 RxContext->RxContextSerializationQLinks.Flink =
NULL;
749 RxContext->RxContextSerializationQLinks.Blink =
NULL;
790 ULONG NewBufferingState, OldBufferingState;
794 DPRINT(
"RxChangeBufferingState(%p, %p, %d)\n", SrvOpen,
Context, ComputeNewState);
812 NewBufferingState = 0;
818 NewBufferingState = SrvOpen->BufferingFlags;
824 SetFlag(NewBufferingState, FCB_STATE_BUFFERING_STATE_WITH_NO_SHARES);
828 if (
Fcb->OutstandingLockOperationsCount != 0)
835 DPRINT(
"ChangeBufferingState %x -> %x (%x)\n", OldBufferingState, NewBufferingState, SrvOpen->BufferingFlags);
856 DPRINT(
"Previous flush failed with status: %lx\n",
Status);
872 if (RxContext !=
NULL)
886 DPRINT(
"Oplock break close for %p\n", SrvOpen);
976 DPRINT(
"LoudCompletion: %lx/%lx with %wZ\n",
Status,
Irp->IoStatus.Information,
Context->LoudCompletionString);
1005 DPRINT(
"RxCompleteRequest_Real(%p, %p, %lx)\n", RxContext,
Irp,
Status);
1010 DPRINT(
"NULL IRP for %p\n", RxContext);
1011 if (RxContext !=
NULL)
1031 Irp->IoStatus.Information = 0;
1036 if (RxContext !=
NULL)
1041 DPRINT(
"Completing: MN: %d, Context: %p, IRP: %p, Status: %lx, Info: %lx, #%lx\n",
1042 RxContext->MinorFunction, RxContext,
Irp,
1043 Status,
Irp->IoStatus.Information, RxContext->SerialNumber);
1056 Stack->FileObject->FileName.Length +=
sizeof(
WCHAR);
1060 ASSERT(RxContext->Create.CanonicalNameBuffer ==
NULL);
1068 ASSERT(
Irp->IoStatus.Information <=
Stack->Parameters.Write.Length);
1073 if (RxContext !=
NULL)
1075 if (RxContext->PendingReturned)
1082 DPRINT(
"Completing IRP with %x/%x\n",
Irp->IoStatus.Status,
Irp->IoStatus.Information);
1086 if (RxContext !=
NULL)
1101 SrvCall = (
PSRV_CALL)((
PFCB)SrvOpen->pFcb)->VNetRoot->pNetRoot->pSrvCall;
1129 ProcessChange =
FALSE;
1177 DPRINT(
"RxConstructNetRoot(%p, %p, %p, %p, %p)\n", RxContext, SrvCall, NetRoot,
1178 VirtualNetRoot, LockHoldingState);
1181 PrefixTable = RxContext->RxDeviceObject->pRxNetNameTable;
1201 Context->RxContext = RxContext;
1202 Context->pVNetRoot = VirtualNetRoot;
1275 DPRINT(
"RxConstructSrvCall(%p, %p, %p)\n", RxContext, SrvCall, LockHoldingState);
1278 RxDeviceObject = RxContext->RxDeviceObject;
1284 if (Calldown ==
NULL)
1286 SrvCall->Context =
NULL;
1296 SrvCall->Context =
NULL;
1304 DPRINT(
"With calldown %p and SrvCall %p\n", Calldown, SrvCall);
1386 &LocalNetRootName, &FilePathName,
1387 LockHoldingState, RxConnectionId);
1393 CanonicalName, &LocalNetRootName, &FilePathName, RxConnectionId);
1394 if (VNetRoot !=
NULL)
1402 RxContext->Create.pSrvCall =
NULL;
1403 RxContext->Create.pNetRoot =
NULL;
1404 RxContext->Create.pVNetRoot =
NULL;
1407 if (VNetRoot !=
NULL)
1410 (
PNET_ROOT)VNetRoot->pNetRoot, VNetRoot, LockHoldingState);
1432 *VirtualNetRootPointer = VNetRoot;
1433 DPRINT(
"RxConstructVirtualNetRoot() = Status: %x\n",
Status);
1439 VNetRoot = (
PV_NET_ROOT)RxContext->Create.pVNetRoot;
1453 if (VNetRoot !=
NULL)
1468 *VirtualNetRootPointer = VNetRoot;
1473 *VirtualNetRootPointer = VNetRoot;
1499 NetRoot = (
PNET_ROOT)VNetRoot->pNetRoot;
1503 RxDeviceObject = NetRoot->pSrvCall->RxDeviceObject;
1504 ASSERT(RxDeviceObject == RxContext->RxDeviceObject);
1506 Stack = RxContext->CurrentIrpSp;
1518 NetRoot->InnerNamePrefix.Length +
Name->Length,
NULL);
1525 Fcb->CachedNetRootType = NetRoot->Type;
1529 Fcb->pNetRoot = VNetRoot->pNetRoot;
1532 Fcb->SrvOpenListVersion = 0;
1538 NetRoot->InnerNamePrefix.Length);
1649 Fobx->Flags =
Flags;
1652 NetRoot = (
PNET_ROOT)RxContext->Create.pNetRoot;
1658 NetRoot->DiskParameters.LockThrottlingParameters.Increment,
1659 NetRoot->DiskParameters.LockThrottlingParameters.MaximumDelay);
1664 NetRoot->NamedPipeParameters.PipeReadThrottlingParameters.Increment,
1665 NetRoot->NamedPipeParameters.PipeReadThrottlingParameters.MaximumDelay);
1683 Fobx->NodeReferenceCount = 1;
1712 USHORT CaseInsensitiveLength;
1715 DPRINT(
"RxCreateNetRoot(%p, %wZ, %x, %p)\n", SrvCall,
Name, NetRootFlags, RxConnectionId);
1722 PrefixTable = SrvCall->RxDeviceObject->pRxNetNameTable;
1726 CaseInsensitiveLength = SrvCall->PrefixEntry.Prefix.Length +
Name->Length;
1734 CaseInsensitiveLength);
1735 if (NetRoot ==
NULL)
1743 if (SrvCall->PrefixEntry.Prefix.Length != 0)
1746 SrvCall->PrefixEntry.Prefix.Length);
1751 CaseInsensitiveLength = SrvCall->PrefixEntry.CaseInsensitiveLength;
1755 (
PULONG)&NetRoot->NodeReferenceCount, CaseInsensitiveLength,
1768 NetRoot->Flags |= NetRootFlags;
1769 NetRoot->DiskParameters.ClusterSize = 1;
1775 DPRINT(
"NetRootName: %wZ (%p)\n", NetRoot->pNetRootName, NetRoot);
1807 DPRINT(
"RxCreateRxContext(%p, %p, %u)\n",
Irp, RxDeviceObject, InitialContextFlags);
1854 DPRINT(
"RxCreateSrvCall(%p, %wZ, %wZ, %p)\n", RxContext,
Name, InnerNamePrefix, RxConnectionId);
1859 NameLength =
Name->Length + 2 *
sizeof(
WCHAR);
1860 if (InnerNamePrefix !=
NULL)
1862 NameLength += InnerNamePrefix->Length;
1867 if (SrvCall ==
NULL)
1874 SrvCall->RxDeviceObject = RxContext->RxDeviceObject;
1884 SrvCall, (
PULONG)&SrvCall->NodeReferenceCount,
Name->Length, RxConnectionId);
1886 DPRINT(
"SrvCallName: %wZ (%p)\n", SrvCall->pSrvCallName, SrvCall);
1901 ULONG NumberRemaining;
1908 Calldown =
Context->SrvCalldownStructure;
1919 SrvCall->Status =
Context->Status;
1923 if (NumberRemaining != 0)
1943 DPRINT(
"Queuing RxFinishSrvCallConstruction() call\n");
1950 if (StartDispatcher)
2007 if (SrvOpen !=
NULL)
2009 SrvOpen->Flags =
Flags;
2014 SrvOpen->NodeReferenceCount = 1;
2020 ++
Fcb->SrvOpenListVersion;
2032 if (SrvOpen !=
NULL)
2040 DPRINT(
"SrvOpen %p for FCB %p\n", SrvOpen, SrvOpen->pFcb);
2062 USHORT CaseInsensitiveLength;
2066 DPRINT(
"RxCreateVNetRoot(%p, %p, %wZ, %wZ, %wZ, %p)\n", RxContext, NetRoot, CanonicalName,
2067 LocalNetRootName,
FilePath, RxConnectionId);
2073 if (LocalNetRootName->Length + NetRoot->PrefixEntry.Prefix.Length >
MAXUSHORT)
2079 CaseInsensitiveLength = LocalNetRootName->Length + NetRoot->PrefixEntry.Prefix.Length;
2081 CaseInsensitiveLength);
2082 if (VNetRoot ==
NULL)
2089 &VNetRoot->pUserName, &VNetRoot->pUserDomainName,
2090 &VNetRoot->pPassword, &VNetRoot->Flags);
2094 VNetRoot->pPassword, &VNetRoot->Flags);
2103 VNetRoot->
PrefixOffsetInBytes = LocalNetRootName->Length + NetRoot->PrefixEntry.Prefix.Length;
2117 CaseInsensitiveLength = NetRoot->PrefixEntry.CaseInsensitiveLength;
2121 CaseInsensitiveLength = NetRoot->SrvCall->PrefixEntry.CaseInsensitiveLength;
2124 for (
i = 1;
i < CanonicalName->Length /
sizeof(
WCHAR); ++
i)
2132 CaseInsensitiveLength += (
i *
sizeof(
WCHAR));
2137 VNetRoot, (
PULONG)&VNetRoot->NodeReferenceCount, CaseInsensitiveLength,
2259 ASSERT(NetRoot->pSrvCall->RxDeviceObject !=
NULL);
2271 ASSERT(VNetRoot->pNetRoot->pSrvCall->RxDeviceObject !=
NULL);
2284 if (SrvOpen->OpenCount == 0)
2329 RxDeviceObject = RxContext->RxDeviceObject;
2337 ASSERT((RxContext->ContextListEntry.Flink->Blink == &RxContext->ContextListEntry) &&
2338 (RxContext->ContextListEntry.Blink->Flink == &RxContext->ContextListEntry));
2357 ASSERT(RxContext->ReferenceCount == 0);
2362 ASSERT(RxContext->AcquireReleaseFcbTrackerX == 0);
2365 if (StopContext !=
NULL)
2367 StopContext->
Flags &= ~RX_CONTEXT_FLAG_RECURSIVE_CALL;
2373 if (RxContext->ShadowCritOwner != 0)
2375 DPRINT1(
"ShadowCritOwner not null! %lx\n", RxContext->ShadowCritOwner);
2412 if (DispatchItem ==
NULL)
2428 DPRINT1(
"RxInsertWorkQueueItem failed! Queue: %ld, Routine: %p, Context: %p, Status: %lx\n", WorkQueueType, Routine, pContext,
Status);
2431 DPRINT(
"Dispatching: %p, %p\n", Routine, pContext);
2464 SrvCallName->Buffer = FilePathName->Buffer;
2465 for (
i = 1;
i < FilePathName->Length /
sizeof(
WCHAR); ++
i)
2475 SrvCallName->MaximumLength =
Length;
2476 SrvCallName->Length =
Length;
2479 if (RestOfName !=
NULL)
2482 RestOfName->Buffer = &FilePathName->Buffer[
i];
2483 RestOfName->MaximumLength =
Length;
2484 RestOfName->Length =
Length;
2549 HashBucket = FCB_HASH_BUCKET(FcbTable,
Hash);
2558 for (ListEntry = HashBucket->
Flink;
2559 ListEntry != HashBucket;
2560 ListEntry = ListEntry->
Flink)
2575 if (ListEntry == HashBucket)
2614 FcbTable->TableEntryForNull =
NULL;
2639 IN LOGICAL ForceFilesClosed)
2643 ULONG UncleanAny, UncleanDir;
2644 LONG FilesOpen, AdditionalRef;
2645 BOOLEAN PrefixLocked, FcbTableLocked, ForceClose;
2666 PrefixTable = NetRoot->pSrvCall->RxDeviceObject->pRxNetNameTable;
2668 PrefixLocked =
FALSE;
2669 FcbTableLocked =
FALSE;
2677 PrefixLocked =
TRUE;
2682 FcbTableLocked =
TRUE;
2685 if (!VNetRoot->ConnectionFinalizationDone)
2690 DPRINT(
"Finalizing connection %p: %wZ\n", NetRoot, &NetRoot->PrefixEntry.Prefix);
2693 FcbTable = &NetRoot->FcbTable;
2700 while (
Entry != BucketList)
2743 if (VNetRoot->NumberOfFobxs == 0)
2745 VNetRoot->ConnectionFinalizationDone =
TRUE;
2750 FilesOpen = VNetRoot->NumberOfFobxs;
2751 AdditionalRef = VNetRoot->AdditionalReferenceForDeleteFsctlTaken;
2785 DPRINT(
"UncleanAny: %ld, UncleanDir: %ld, FilesOpen: %ld\n", UncleanAny, UncleanDir, FilesOpen);
2792 VNetRoot->AdditionalReferenceForDeleteFsctlTaken = 0;
2822 for (Bucket = 0; Bucket < FcbTable->NumberOfBuckets; ++Bucket)
2840 DPRINT(
"RxFinalizeNetFcb(%p, %d, %d, %d)\n", ThisFcb, RecursiveFinalize, ForceFinalize, ReferenceCount);
2841 DPRINT(
"Finalize: %wZ\n", &ThisFcb->FcbTableEntry.Path);
2851 if (RecursiveFinalize)
2855 for (ListEntry = ThisFcb->SrvOpenList.
Flink;
2856 ListEntry != &ThisFcb->SrvOpenList;
2857 ListEntry = ListEntry->
Flink)
2868 if (ThisFcb->OpenCount != 0 || ThisFcb->UncleanCount != 0)
2870 ASSERT(ReferenceCount > 0);
2876 ASSERT(ReferenceCount >= 1);
2879 if (ReferenceCount != 1 && !ForceFinalize)
2884 ASSERT(ForceFinalize || ((ThisFcb->OpenCount == 0) && (ThisFcb->UncleanCount == 0)));
2886 DPRINT(
"Finalizing FCB open: %d (%d)\n", ThisFcb->OpenCount, ForceFinalize);
2889 if (!ThisFcb->UpperFinalizationDone)
2896 while (ThisFcb->BufferedLocks.List !=
NULL)
2900 Entry = ThisFcb->BufferedLocks.List;
2901 ThisFcb->BufferedLocks.List =
Entry->Next;
2922 ThisFcb->UpperFinalizationDone =
TRUE;
2925 ASSERT(ReferenceCount >= 1);
2928 if (ReferenceCount != 1)
2934 if (ThisFcb->pBufferingStateChangeCompletedEvent !=
NULL)
2936 RxFreePool(ThisFcb->pBufferingStateChangeCompletedEvent);
2939 if (ThisFcb->MRxDispatch !=
NULL)
2941 ThisFcb->MRxDispatch->MRxDeallocateForFcb(
RX_GET_MRX_FCB(ThisFcb));
2952 ASSERT(!ThisFcb->fMiniInited);
2977 if (ThisFobx->NodeReferenceCount != 0 &&
2983 DPRINT(
"Finalize Fobx: %p (with %d ref), forced: %d\n", ThisFobx, ThisFobx->NodeReferenceCount, ForceFinalize);
2985 SrvOpen = ThisFobx->SrvOpen;
2988 if (!ThisFobx->UpperFinalizationDone)
3014 DPRINT(
"Closing SRV_OPEN %p for %p: %x\n", SrvOpen, ThisFobx,
Status);
3018 ThisFobx->UpperFinalizationDone =
TRUE;
3022 if (ThisFobx->NodeReferenceCount != 0)
3042 ThisFobx->pSrvOpen =
NULL;
3075 PrefixTable = ThisNetRoot->pSrvCall->RxDeviceObject->pRxNetNameTable;
3087 FcbTable = &ThisNetRoot->FcbTable;
3089 if (RecursiveFinalize)
3100 ListEntry = HashBucket->
Flink;
3101 while (ListEntry != HashBucket)
3108 ListEntry = ListEntry->
Flink;
3125 if (ThisNetRoot->NodeReferenceCount != 1 && !ForceFinalize)
3130 DPRINT(
"Finalizing NetRoot %p for %wZ\n", ThisNetRoot, &ThisNetRoot->PrefixEntry.Prefix);
3133 if (ThisNetRoot->NodeReferenceCount != 1)
3148 SrvCall = (
PSRV_CALL)ThisNetRoot->pSrvCall;
3152 if (SrvCall !=
NULL)
3175 PrefixTable = ThisSrvCall->RxDeviceObject->pRxNetNameTable;
3179 if (ThisSrvCall->NodeReferenceCount != 1 &&
3185 DPRINT(
"Finalizing SrvCall %p for %wZ\n", ThisSrvCall, &ThisSrvCall->PrefixEntry.Prefix);
3188 if (!ThisSrvCall->UpperFinalizationDone)
3202 ThisSrvCall->UpperFinalizationDone =
TRUE;
3205 WillFree = (ThisSrvCall->NodeReferenceCount == 1);
3208 if (ThisSrvCall->RxDeviceObject !=
NULL)
3226 MRxFinalizeSrvCall, ((
PMRX_SRV_CALL)ThisSrvCall, ForceFinalize));
3232 if (ThisSrvCall->NodeReferenceCount != 1)
3238 if (ThisSrvCall->pDomainName !=
NULL)
3267 if (RecursiveFinalize)
3271 ListEntry = ThisSrvOpen->FobxList.
Flink;
3272 while (ListEntry != &ThisSrvOpen->FobxList)
3277 ListEntry = ListEntry->
Flink;
3283 if (ThisSrvOpen->NodeReferenceCount != 0 &&
3289 DPRINT(
"Finalize SRV_OPEN: %p (with %d ref), forced: %d\n", ThisSrvOpen, ThisSrvOpen->NodeReferenceCount, ForceFinalize);
3292 Fcb = (
PFCB)ThisSrvOpen->pFcb;
3293 if ((!ThisSrvOpen->UpperFinalizationDone && ThisSrvOpen->Condition !=
Condition_Good) ||
3317 ++
Fcb->SrvOpenListVersion;
3325 ThisSrvOpen->pVNetRoot =
NULL;
3329 ThisSrvOpen->UpperFinalizationDone =
TRUE;
3333 if (ThisSrvOpen->NodeReferenceCount != 0)
3379 PrefixTable = ThisVNetRoot->pNetRoot->pSrvCall->RxDeviceObject->pRxNetNameTable;
3383 if (ThisVNetRoot->NodeReferenceCount != 1 &&
3389 DPRINT(
"Finalizing VNetRoot %p for %wZ\n", ThisVNetRoot, &ThisVNetRoot->PrefixEntry.Prefix);
3391 NetRoot = (
PNET_ROOT)ThisVNetRoot->pNetRoot;
3393 if (!ThisVNetRoot->UpperFinalizationDone)
3409 ThisVNetRoot->UpperFinalizationDone =
TRUE;
3413 if (ThisVNetRoot->NodeReferenceCount != 1)
3419 if (NetRoot->pSrvCall->RxDeviceObject !=
NULL)
3430 ThisVNetRoot->pPassword, &ThisVNetRoot->Flags);
3458 RxDeviceObject = RxContext->RxDeviceObject;
3470 DPRINT1(
"Failed to initialize connection ID\n");
3475 RxContext->Create.NetNamePrefixEntry =
NULL;
3491 if (Container !=
NULL)
3501 VNetRoot = Container;
3506 NetRoot->
SrvCall->RxDeviceObject != RxContext->RxDeviceObject)
3509 SavedVNetRoot =
NULL;
3524 SavedVNetRoot = VNetRoot;
3535 ListEntry = ListEntry->
Flink)
3550 SavedVNetRoot =
NULL;
3556 SavedVNetRoot =
NULL;
3566 if (SavedVNetRoot ==
NULL)
3572 else if (SavedVNetRoot != VNetRoot)
3575 if (SavedVNetRoot !=
NULL)
3619 DPRINT(
"CanonicalName: %wZ (%d)\n", CanonicalName, CanonicalName->Length);
3629 DPRINT(
"CSC instance, VNetRoot: %p\n", VNetRoot);
3631 VNetRoot->Flags |=
Flags;
3644 DPRINT1(
"RxFindOrConstructVirtualNetRoot() = Status: %x\n",
Status);
3649 DPRINT(
"Waiting for stable condition for: %p\n", VNetRoot);
3664 RxContext->Create.pVNetRoot =
NULL;
3694 DPRINT(
"RxFindOrCreateConnections(%p, %wZ, %x, %p, %p, %p, %p)\n",
3695 RxContext, CanonicalName, NetRootType, LocalNetRootName,
3696 FilePathName,
LockState, RxConnectionId);
3698 *FilePathName = *CanonicalName;
3699 LocalNetRootName->Length = 0;
3700 LocalNetRootName->MaximumLength = 0;
3701 LocalNetRootName->Buffer = CanonicalName->Buffer;
3704 if (FilePathName->Buffer[1] ==
';')
3710 for (
i = 2;
i < FilePathName->Length /
sizeof(
WCHAR); ++
i)
3724 FilePathName->Buffer = &FilePathName->Buffer[
i];
3726 LocalNetRootName->Length =
Length;
3727 LocalNetRootName->MaximumLength =
Length;
3728 FilePathName->Length -=
Length;
3730 DPRINT(
"CanonicalName: %wZ\n", CanonicalName);
3731 DPRINT(
" -> FilePathName: %wZ\n", FilePathName);
3732 DPRINT(
" -> LocalNetRootName: %wZ\n", LocalNetRootName);
3736 PrefixTable = RxContext->RxDeviceObject->pRxNetNameTable;
3744 if (Container !=
NULL)
3769 DPRINT(
"Container %p for path %wZ\n", Container, FilePathName);
3780 RxContext->Create.pVNetRoot =
NULL;
3781 RxContext->Create.pNetRoot =
NULL;
3782 RxContext->Create.pSrvCall =
NULL;
3783 RxContext->Create.Type = NetRootType;
3786 if (Container !=
NULL)
3791 VNetRoot = Container;
3799 DPRINT(
"Waiting for stable condition for: %p\n", NetRoot);
3818 SrvCall->RxDeviceObject == RxContext->RxDeviceObject)
3836 Status = VNetRoot->ConstructionStatus;
3846 SrvCall = Container;
3852 DPRINT(
"Waiting for stable condition for: %p\n", SrvCall);
3874 Status = SrvCall->Status;
3885 SrvCall->RxDeviceObject != RxContext->RxDeviceObject)
3910 if (Container !=
NULL)
3917 DPRINT(
" -> SrvCallName: %wZ\n", &SrvCallName);
3920 if (SrvCall ==
NULL)
3928 RxContext->Create.pVNetRoot =
NULL;
3929 RxContext->Create.pNetRoot =
NULL;
3930 RxContext->Create.pSrvCall =
NULL;
3931 RxContext->Create.Type = NetRootType;
3932 Container = SrvCall;
3952 ASSERT(SrvCall->RxDeviceObject == RxContext->RxDeviceObject);
3955 SrvCall->RxDeviceObject->Dispatch->MRxExtractNetRootName(FilePathName, (
PMRX_SRV_CALL)SrvCall, &NetRootName,
NULL);
3958 if (NetRoot ==
NULL)
3963 NetRoot->Type = NetRootType;
3968 VNetRoot =
RxCreateVNetRoot(RxContext, NetRoot, CanonicalName, LocalNetRootName, FilePathName, RxConnectionId);
3969 if (VNetRoot ==
NULL)
3988 DPRINT1(
"RxConstructNetRoot failed Ctxt: %p, VNet: %p, Status: %lx, Condition: %d\n", RxContext, VNetRoot,
Status, VNetRoot->
Condition);
3991 RxContext->Create.pNetRoot =
NULL;
3992 RxContext->Create.pVNetRoot =
NULL;
4000 Stack = RxContext->CurrentIrpSp;
4021 DPRINT(
"RxFindOrCreateConnections() = Status: %x\n",
Status);
4046 FILL_IN_FCB((
PFCB)
Fcb, 0, 0, 0, 0, 0, 0, 0, 0, 0);
4049 else if (InitPacket !=
NULL)
4051 FILL_IN_FCB((
PFCB)
Fcb, *InitPacket->pAttributes, *InitPacket->pNumLinks,
4052 InitPacket->pCreationTime->QuadPart, InitPacket->pLastAccessTime->QuadPart,
4053 InitPacket->pLastWriteTime->QuadPart, InitPacket->pLastChangeTime->QuadPart,
4054 InitPacket->pAllocationSize->QuadPart, InitPacket->pFileSize->QuadPart,
4055 InitPacket->pValidDataLength->QuadPart);
4072 ((
PFCB)
Fcb)->BufferedLocks.PendingLockOps = 0;
4098 DPRINT(
"RxFinishSrvCallConstruction(%p)\n", Calldown);
4102 PrefixTable =
Context->RxDeviceObject->pRxNetNameTable;
4112 MRxSrvCallWinnerNotify,
4138 DPRINT(
"Finishing async call\n");
4166 Context->CurrentIrp->IoStatus.Information = 0;
4179 DPRINT(
"Not completing, pending\n");
4198 DPRINT(
"RxFinishSrvCallConstructionDispatcher(%p)\n",
Context);
4341 SrvCall->RxDeviceObject =
NULL;
4349 NetRoot->pSrvCall =
NULL;
4375 Entry = SrvCall->BufferingManager.HandlerList.Flink;
4376 while (
Entry != &SrvCall->BufferingManager.HandlerList)
4380 if (
Request->SrvOpenKey == SrvOpen->Key &&
Request->SrvOpen == SrvOpen)
4389 Entry = SrvCall->BufferingManager.LastChanceHandlerList.Flink;
4390 while (
Entry != &SrvCall->BufferingManager.LastChanceHandlerList)
4394 if (
Request->SrvOpenKey == SrvOpen->Key &&
Request->SrvOpen == SrvOpen)
4457 DeviceObject = VNetRoot->pNetRoot->pSrvCall->RxDeviceObject;
4539 RxContext->NodeByteSize =
sizeof(
RX_CONTEXT);
4540 RxContext->ReferenceCount = 1;
4542 RxContext->RxDeviceObject = RxDeviceObject;
4546 RxContext->MRxCancelRoutine =
NULL;
4547 RxContext->ResumeRoutine =
NULL;
4548 RxContext->Flags |= InitialContextFlags;
4549 RxContext->CurrentIrp =
Irp;
4551 RxContext->OriginalThread = RxContext->LastExecutionThread;
4556 RxContext->CurrentIrpSp =
NULL;
4558 RxContext->MinorFunction = 0;
4598 RxContext->MajorFunction =
Stack->MajorFunction;
4599 RxContext->MinorFunction =
Stack->MinorFunction;
4601 RxContext->CurrentIrpSp =
Stack;
4611 Fobx =
Stack->FileObject->FsContext2;
4622 RxContext->pRelevantSrvOpen = Fobx->pSrvOpen;
4630 RxContext->pFobx =
NULL;
4648 if (VNetRoot !=
NULL)
4650 RxContext->NotifyChangeDirectory.pVNetRoot = (
PMRX_V_NET_ROOT)VNetRoot;
4655 RxContext->RealDevice =
Stack->FileObject->DeviceObject;
4665 DPRINT(
"New Ctxt: %p for MN: %d, IRP: %p, THRD: %p, FCB: %p, FOBX:%p #%lx\n",
4666 RxContext, RxContext->MinorFunction,
Irp,
4668 RxContext->SerialNumber);