[RXCE]
[reactos.git] / reactos / sdk / include / ddk / rxprocs.h
1 #ifndef _RDBSSPROCS_
2 #define _RDBSSPROCS_
3
4 #include "backpack.h"
5 #include "rxlog.h"
6 #include "rxtimer.h"
7 #include "rxstruc.h"
8
9 extern PVOID RxNull;
10
11 #define RxLogFailure(DO, Originator, Event, Status) \
12 RxLogEventDirect(DO, Originator, Event, Status, __LINE__)
13
14 VOID
15 NTAPI
16 RxLogEventDirect(
17 _In_ PRDBSS_DEVICE_OBJECT DeviceObject,
18 _In_ PUNICODE_STRING OriginatorId,
19 _In_ ULONG EventId,
20 _In_ NTSTATUS Status,
21 _In_ ULONG Line);
22
23 VOID
24 NTAPI
25 RxLogEventWithAnnotation(
26 _In_ PRDBSS_DEVICE_OBJECT DeviceObject,
27 _In_ ULONG EventId,
28 _In_ NTSTATUS Status,
29 _In_ PVOID DataBuffer,
30 _In_ USHORT DataBufferLength,
31 _In_ PUNICODE_STRING Annotation,
32 _In_ ULONG AnnotationCount);
33
34 NTSTATUS
35 RxPrefixClaim(
36 _In_ PRX_CONTEXT RxContext);
37
38 VOID
39 RxpPrepareCreateContextForReuse(
40 _In_ PRX_CONTEXT RxContext);
41
42 NTSTATUS
43 RxLowIoCompletionTail(
44 _In_ PRX_CONTEXT RxContext);
45
46 LUID
47 RxGetUid(
48 _In_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext);
49
50 ULONG
51 RxGetSessionId(
52 _In_ PIO_STACK_LOCATION IrpSp);
53
54 #if (_WIN32_WINNT >= 0x0600)
55 NTSTATUS
56 RxFindOrCreateConnections(
57 _In_ PRX_CONTEXT RxContext,
58 _In_ PIRP Irp,
59 _In_ PUNICODE_STRING CanonicalName,
60 _In_ NET_ROOT_TYPE NetRootType,
61 _In_ BOOLEAN TreeConnect,
62 _Out_ PUNICODE_STRING LocalNetRootName,
63 _Out_ PUNICODE_STRING FilePathName,
64 _Inout_ PLOCK_HOLDING_STATE LockState,
65 _In_ PRX_CONNECTION_ID RxConnectionId);
66 #else
67 NTSTATUS
68 RxFindOrCreateConnections(
69 _In_ PRX_CONTEXT RxContext,
70 _In_ PUNICODE_STRING CanonicalName,
71 _In_ NET_ROOT_TYPE NetRootType,
72 _Out_ PUNICODE_STRING LocalNetRootName,
73 _Out_ PUNICODE_STRING FilePathName,
74 _Inout_ PLOCK_HOLDING_STATE LockState,
75 _In_ PRX_CONNECTION_ID RxConnectionId);
76 #endif
77
78 #if (_WIN32_WINNT >= 0x0600)
79 NTSTATUS
80 RxCompleteMdl(
81 _In_ PRX_CONTEXT RxContext,
82 _In_ PIRP Irp);
83 #else
84 NTSTATUS
85 NTAPI
86 RxCompleteMdl(
87 _In_ PRX_CONTEXT RxContext);
88 #endif
89
90 #if (_WIN32_WINNT >= 0x0600)
91 VOID
92 RxLockUserBuffer(
93 _In_ PRX_CONTEXT RxContext,
94 _In_ PIRP Irp,
95 _In_ LOCK_OPERATION Operation,
96 _In_ ULONG BufferLength);
97
98 PVOID
99 RxMapSystemBuffer(
100 _In_ PRX_CONTEXT RxContext,
101 _In_ PIRP Irp);
102 #else
103 VOID
104 RxLockUserBuffer(
105 _In_ PRX_CONTEXT RxContext,
106 _In_ LOCK_OPERATION Operation,
107 _In_ ULONG BufferLength);
108
109 PVOID
110 RxMapSystemBuffer(
111 _In_ PRX_CONTEXT RxContext);
112 #endif
113
114 #define FCB_MODE_EXCLUSIVE 1
115 #define FCB_MODE_SHARED 2
116 #define FCB_MODE_SHARED_WAIT_FOR_EXCLUSIVE 3
117 #define FCB_MODE_SHARED_STARVE_EXCLUSIVE 4
118
119 NTSTATUS
120 __RxAcquireFcb(
121 _Inout_ PFCB Fcb,
122 _Inout_opt_ PRX_CONTEXT RxContext,
123 _In_ ULONG Mode
124 #ifdef RDBSS_TRACKER
125 ,
126 _In_ ULONG LineNumber,
127 _In_ PCSTR FileName,
128 _In_ ULONG SerialNumber
129 #endif
130 );
131
132 #ifdef RDBSS_TRACKER
133 #define RxAcquireExclusiveFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_EXCLUSIVE, __LINE__, __FILE__, 0)
134 #else
135 #define RxAcquireExclusiveFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_EXCLUSIVE)
136 #endif
137
138 #define RX_GET_MRX_FCB(F) ((PMRX_FCB)((F)))
139
140 #ifdef RDBSS_TRACKER
141 #define RxAcquireSharedFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_SHARED, __LINE__, __FILE__, 0)
142 #else
143 #define RxAcquireSharedFcb(R, F) __RxAcquireFcb((F), (R), FCB_MODE_SHARED)
144 #endif
145
146 #ifdef RDBSS_TRACKER
147 #define RxAcquireSharedFcbWaitForEx(R, F) __RxAcquireFcb((F),(R), FCB_MODE_SHARED_WAIT_FOR_EXCLUSIVE, __LINE__, __FILE__,0)
148 #else
149 #define RxAcquireSharedFcbWaitForEx(R, F) __RxAcquireFcb((F), (R), FCB_MODE_SHARED_WAIT_FOR_EXCLUSIVE)
150 #endif
151
152 VOID
153 __RxReleaseFcb(
154 _Inout_opt_ PRX_CONTEXT RxContext,
155 _Inout_ PMRX_FCB MrxFcb
156 #ifdef RDBSS_TRACKER
157 ,
158 _In_ ULONG LineNumber,
159 _In_ PCSTR FileName,
160 _In_ ULONG SerialNumber
161 #endif
162 );
163
164 #ifdef RDBSS_TRACKER
165 #define RxReleaseFcb(R, F) __RxReleaseFcb((R), RX_GET_MRX_FCB(F), __LINE__, __FILE__, 0)
166 #else
167 #define RxReleaseFcb(R, F) __RxReleaseFcb((R), RX_GET_MRX_FCB(F))
168 #endif
169
170 VOID
171 __RxReleaseFcbForThread(
172 _Inout_opt_ PRX_CONTEXT RxContext,
173 _Inout_ PMRX_FCB MrxFcb,
174 _In_ ERESOURCE_THREAD ResourceThreadId
175 #ifdef RDBSS_TRACKER
176 ,
177 _In_ ULONG LineNumber,
178 _In_ PCSTR FileName,
179 _In_ ULONG SerialNumber
180 #endif
181 );
182
183 #ifdef RDBSS_TRACKER
184 #define RxReleaseFcbForThread(R, F, T) __RxReleaseFcbForThread((R), RX_GET_MRX_FCB(F), (T), __LINE__, __FILE__, 0)
185 #else
186 #define RxReleaseFcbForThread(R, F, T) __RxReleaseFcbForThread((R), RX_GET_MRX_FCB(F), (T))
187 #endif
188
189 #ifdef RDBSS_TRACKER
190 VOID
191 RxTrackerUpdateHistory(
192 _Inout_opt_ PRX_CONTEXT RxContext,
193 _Inout_ PMRX_FCB MrxFcb,
194 _In_ ULONG Operation,
195 _In_ ULONG LineNumber,
196 _In_ PCSTR FileName,
197 _In_ ULONG SerialNumber);
198 #else
199 #define RxTrackerUpdateHistory(R, F, O, L, F, S) { NOTHING; }
200 #endif
201
202 VOID
203 RxTrackPagingIoResource(
204 _Inout_ PVOID Instance,
205 _In_ ULONG Type,
206 _In_ ULONG Line,
207 _In_ PCSTR File);
208
209 #define RxIsFcbAcquiredShared(Fcb) ExIsResourceAcquiredSharedLite((Fcb)->Header.Resource)
210 #define RxIsFcbAcquiredExclusive(Fcb) ExIsResourceAcquiredExclusiveLite((Fcb)->Header.Resource)
211 #define RxIsFcbAcquired(Fcb) (ExIsResourceAcquiredSharedLite((Fcb)->Header.Resource) || \
212 ExIsResourceAcquiredExclusiveLite((Fcb)->Header.Resource))
213
214 #define RxAcquirePagingIoResource(RxContext, Fcb) \
215 ExAcquireResourceExclusiveLite((Fcb)->Header.PagingIoResource, TRUE); \
216 if (RxContext != NULL) \
217 { \
218 (RxContext)->FcbPagingIoResourceAcquired = TRUE; \
219 } \
220 RxTrackPagingIoResource(Fcb, 1, __LINE__, __FILE__)
221
222 #define RxAcquirePagingIoResourceShared(RxContext, Fcb, Flag) \
223 ExAcquireResourceSharedLite((Fcb)->Header.PagingIoResource, Flag); \
224 if (AcquiredFile) \
225 { \
226 if (RxContext != NULL) \
227 { \
228 ((PRX_CONTEXT)RxContext)->FcbPagingIoResourceAcquired = TRUE; \
229 } \
230 RxTrackPagingIoResource(Fcb, 2, __LINE__, __FILE__); \
231 }
232
233 #define RxReleasePagingIoResource(RxContext, Fcb) \
234 RxTrackPagingIoResource(Fcb, 3, __LINE__, __FILE__); \
235 if (RxContext != NULL) \
236 { \
237 (RxContext)->FcbPagingIoResourceAcquired = FALSE; \
238 } \
239 ExReleaseResourceLite((Fcb)->Header.PagingIoResource)
240
241 #define RxReleasePagingIoResourceForThread(RxContext, Fcb, Thread) \
242 RxTrackPagingIoResource(Fcb, 3, __LINE__, __FILE__); \
243 if (RxContext != NULL) \
244 { \
245 (RxContext)->FcbPagingIoResourceAcquired = FALSE; \
246 } \
247 ExReleaseResourceForThreadLite((Fcb)->Header.PagingIoResource, (Thread))
248
249 BOOLEAN
250 NTAPI
251 RxAcquireFcbForLazyWrite(
252 _In_ PVOID Null,
253 _In_ BOOLEAN Wait);
254
255 VOID
256 NTAPI
257 RxReleaseFcbFromLazyWrite(
258 _In_ PVOID Null);
259
260 BOOLEAN
261 NTAPI
262 RxAcquireFcbForReadAhead(
263 _In_ PVOID Null,
264 _In_ BOOLEAN Wait);
265
266 VOID
267 NTAPI
268 RxReleaseFcbFromReadAhead(
269 _In_ PVOID Null);
270
271 BOOLEAN
272 NTAPI
273 RxNoOpAcquire(
274 _In_ PVOID Fcb,
275 _In_ BOOLEAN Wait);
276
277 VOID
278 NTAPI
279 RxNoOpRelease(
280 _In_ PVOID Fcb);
281
282 #define RxConvertToSharedFcb(R, F) ExConvertExclusiveToSharedLite(RX_GET_MRX_FCB(F)->Header.Resource)
283
284 VOID
285 RxVerifyOperationIsLegal(
286 _In_ PRX_CONTEXT RxContext);
287
288 VOID
289 RxPrePostIrp(
290 _In_ PVOID Context,
291 _In_ PIRP Irp);
292
293 VOID
294 RxAddToWorkque(
295 _In_ PRX_CONTEXT RxContext,
296 _In_ PIRP Irp);
297
298 NTSTATUS
299 RxFsdPostRequest(
300 _In_ PRX_CONTEXT RxContext);
301
302 #define QuadAlign(V) (ALIGN_UP(V, ULONGLONG))
303
304 VOID
305 RxCompleteRequest_Real(
306 _In_ PRX_CONTEXT RxContext,
307 _In_ PIRP Irp,
308 _In_ NTSTATUS Status);
309
310 NTSTATUS
311 RxCompleteRequest(
312 _In_ PRX_CONTEXT pContext,
313 _In_ NTSTATUS Status);
314
315 #if (_WIN32_WINNT >= 0x600)
316 NTSTATUS
317 RxConstructSrvCall(
318 _In_ PRX_CONTEXT RxContext,
319 _In_ PIRP Irp,
320 _In_ PSRV_CALL SrvCall,
321 _Out_ PLOCK_HOLDING_STATE LockHoldingState);
322 #else
323 NTSTATUS
324 RxConstructSrvCall(
325 _In_ PRX_CONTEXT RxContext,
326 _In_ PSRV_CALL SrvCall,
327 _Out_ PLOCK_HOLDING_STATE LockHoldingState);
328 #endif
329
330 #define RxCompleteAsynchronousRequest(C, S) RxCompleteRequest(C, S)
331
332 NTSTATUS
333 RxConstructNetRoot(
334 _In_ PRX_CONTEXT RxContext,
335 _In_ PSRV_CALL SrvCall,
336 _In_ PNET_ROOT NetRoot,
337 _In_ PV_NET_ROOT VirtualNetRoot,
338 _Out_ PLOCK_HOLDING_STATE LockHoldingState);
339
340 #if (_WIN32_WINNT >= 0x0600)
341 NTSTATUS
342 RxConstructVirtualNetRoot(
343 _In_ PRX_CONTEXT RxContext,
344 _In_ PIRP Irp,
345 _In_ PUNICODE_STRING CanonicalName,
346 _In_ NET_ROOT_TYPE NetRootType,
347 _In_ BOOLEAN TreeConnect,
348 _Out_ PV_NET_ROOT *VirtualNetRootPointer,
349 _Out_ PLOCK_HOLDING_STATE LockHoldingState,
350 _Out_ PRX_CONNECTION_ID RxConnectionId);
351
352 NTSTATUS
353 RxFindOrConstructVirtualNetRoot(
354 _In_ PRX_CONTEXT RxContext,
355 _In_ PIRP Irp,
356 _In_ PUNICODE_STRING CanonicalName,
357 _In_ NET_ROOT_TYPE NetRootType,
358 _In_ PUNICODE_STRING RemainingName);
359 #else
360 NTSTATUS
361 RxConstructVirtualNetRoot(
362 _In_ PRX_CONTEXT RxContext,
363 _In_ PUNICODE_STRING CanonicalName,
364 _In_ NET_ROOT_TYPE NetRootType,
365 _Out_ PV_NET_ROOT *VirtualNetRootPointer,
366 _Out_ PLOCK_HOLDING_STATE LockHoldingState,
367 _Out_ PRX_CONNECTION_ID RxConnectionId);
368
369 NTSTATUS
370 RxFindOrConstructVirtualNetRoot(
371 _In_ PRX_CONTEXT RxContext,
372 _In_ PUNICODE_STRING CanonicalName,
373 _In_ NET_ROOT_TYPE NetRootType,
374 _In_ PUNICODE_STRING RemainingName);
375 #endif
376
377 NTSTATUS
378 NTAPI
379 RxChangeBufferingState(
380 PSRV_OPEN SrvOpen,
381 PVOID Context,
382 BOOLEAN ComputeNewState);
383
384 VOID
385 NTAPI
386 RxIndicateChangeOfBufferingStateForSrvOpen(
387 PMRX_SRV_CALL SrvCall,
388 PMRX_SRV_OPEN SrvOpen,
389 PVOID SrvOpenKey,
390 PVOID Context);
391
392 NTSTATUS
393 NTAPI
394 RxPrepareToReparseSymbolicLink(
395 PRX_CONTEXT RxContext,
396 BOOLEAN SymbolicLinkEmbeddedInOldPath,
397 PUNICODE_STRING NewPath,
398 BOOLEAN NewPathIsAbsolute,
399 PBOOLEAN ReparseRequired);
400
401 VOID
402 RxReference(
403 _Inout_ PVOID Instance);
404
405 VOID
406 RxDereference(
407 _Inout_ PVOID Instance,
408 _In_ LOCK_HOLDING_STATE LockHoldingState);
409
410 VOID
411 RxWaitForStableCondition(
412 _In_ PRX_BLOCK_CONDITION Condition,
413 _Inout_ PLIST_ENTRY TransitionWaitList,
414 _Inout_ PRX_CONTEXT RxContext,
415 _Out_opt_ NTSTATUS *AsyncStatus);
416
417 VOID
418 RxUpdateCondition(
419 _In_ RX_BLOCK_CONDITION NewConditionValue,
420 _Out_ PRX_BLOCK_CONDITION Condition,
421 _In_ OUT PLIST_ENTRY TransitionWaitList);
422
423 #if (_WIN32_WINNT >= 0x0600)
424 NTSTATUS
425 RxCloseAssociatedSrvOpen(
426 _In_opt_ PRX_CONTEXT RxContext,
427 _In_ PFOBX Fobx);
428 #else
429 NTSTATUS
430 RxCloseAssociatedSrvOpen(
431 _In_ PFOBX Fobx,
432 _In_opt_ PRX_CONTEXT RxContext);
433 #endif
434
435 NTSTATUS
436 NTAPI
437 RxFinalizeConnection(
438 _Inout_ PNET_ROOT NetRoot,
439 _Inout_opt_ PV_NET_ROOT VNetRoot,
440 _In_ LOGICAL ForceFilesClosed);
441
442 #if DBG
443 VOID
444 RxDumpWantedAccess(
445 _In_ PSZ where1,
446 _In_ PSZ where2,
447 _In_ PSZ wherelogtag,
448 _In_ ACCESS_MASK DesiredAccess,
449 _In_ ULONG DesiredShareAccess);
450
451 VOID
452 RxDumpCurrentAccess(
453 _In_ PSZ where1,
454 _In_ PSZ where2,
455 _In_ PSZ wherelogtag,
456 _In_ PSHARE_ACCESS ShareAccess);
457 #else
458 #define RxDumpWantedAccess(w1,w2,wlt,DA,DSA) {NOTHING;}
459 #define RxDumpCurrentAccess(w1,w2,wlt,SA) {NOTHING;}
460 #endif
461
462 NTSTATUS
463 RxCheckShareAccessPerSrvOpens(
464 _In_ PFCB Fcb,
465 _In_ ACCESS_MASK DesiredAccess,
466 _In_ ULONG DesiredShareAccess);
467
468 VOID
469 RxUpdateShareAccessPerSrvOpens(
470 _In_ PSRV_OPEN SrvOpen);
471
472 VOID
473 RxRemoveShareAccessPerSrvOpens(
474 _Inout_ PSRV_OPEN SrvOpen);
475
476 #if DBG
477 NTSTATUS
478 RxCheckShareAccess(
479 _In_ ACCESS_MASK DesiredAccess,
480 _In_ ULONG DesiredShareAccess,
481 _Inout_ PFILE_OBJECT FileObject,
482 _Inout_ PSHARE_ACCESS ShareAccess,
483 _In_ BOOLEAN Update,
484 _In_ PSZ where,
485 _In_ PSZ wherelogtag);
486
487 VOID
488 RxRemoveShareAccess(
489 _Inout_ PFILE_OBJECT FileObject,
490 _Inout_ PSHARE_ACCESS ShareAccess,
491 _In_ PSZ where,
492 _In_ PSZ wherelogtag);
493
494 VOID
495 RxSetShareAccess(
496 _In_ ACCESS_MASK DesiredAccess,
497 _In_ ULONG DesiredShareAccess,
498 _Inout_ PFILE_OBJECT FileObject,
499 _Out_ PSHARE_ACCESS ShareAccess,
500 _In_ PSZ where,
501 _In_ PSZ wherelogtag);
502
503 VOID
504 RxUpdateShareAccess(
505 _Inout_ PFILE_OBJECT FileObject,
506 _Inout_ PSHARE_ACCESS ShareAccess,
507 _In_ PSZ where,
508 _In_ PSZ wherelogtag);
509 #else
510 #define RxCheckShareAccess(a1, a2, a3, a4, a5, a6, a7) IoCheckShareAccess(a1, a2, a3, a4, a5)
511 #define RxRemoveShareAccess(a1, a2, a3, a4) IoRemoveShareAccess(a1, a2)
512 #define RxSetShareAccess(a1, a2, a3, a4, a5, a6) IoSetShareAccess(a1, a2, a3, a4)
513 #define RxUpdateShareAccess(a1, a2, a3, a4) IoUpdateShareAccess(a1, a2)
514 #endif
515
516 NTSTATUS
517 NTAPI
518 RxDriverEntry(
519 _In_ PDRIVER_OBJECT DriverObject,
520 _In_ PUNICODE_STRING RegistryPath);
521
522 VOID
523 NTAPI
524 RxUnload(
525 _In_ PDRIVER_OBJECT DriverObject);
526
527 VOID
528 RxInitializeMinirdrDispatchTable(
529 _In_ PDRIVER_OBJECT DriverObject);
530
531 ULONG
532 RxGetNetworkProviderPriority(
533 _In_ PUNICODE_STRING DeviceName);
534
535 VOID
536 RxPrepareRequestForReuse(
537 PCHANGE_BUFFERING_STATE_REQUEST Request);
538
539 VOID
540 RxpDiscardChangeBufferingStateRequests(
541 _Inout_ PLIST_ENTRY DiscardedRequests);
542
543 VOID
544 RxGatherRequestsForSrvOpen(
545 _Inout_ PSRV_CALL SrvCall,
546 _In_ PSRV_OPEN SrvOpen,
547 _Inout_ PLIST_ENTRY RequestsListHead);
548
549 NTSTATUS
550 RxpLookupSrvOpenForRequestLite(
551 _In_ PSRV_CALL SrvCall,
552 _Inout_ PCHANGE_BUFFERING_STATE_REQUEST Request);
553
554 VOID
555 RxProcessChangeBufferingStateRequestsForSrvOpen(
556 PSRV_OPEN SrvOpen);
557
558 NTSTATUS
559 RxPurgeFobxFromCache(
560 PFOBX FobxToBePurged);
561
562 VOID
563 RxUndoScavengerFinalizationMarking(
564 PVOID Instance);
565
566 ULONG
567 RxTableComputePathHashValue(
568 _In_ PUNICODE_STRING Name);
569
570 VOID
571 RxExtractServerName(
572 _In_ PUNICODE_STRING FilePathName,
573 _Out_ PUNICODE_STRING SrvCallName,
574 _Out_ PUNICODE_STRING RestOfName);
575
576 VOID
577 NTAPI
578 RxCreateNetRootCallBack(
579 _In_ PMRX_CREATENETROOT_CONTEXT CreateNetRootContext);
580
581 PVOID
582 RxAllocateObject(
583 _In_ NODE_TYPE_CODE NodeType,
584 _In_opt_ PMINIRDR_DISPATCH MRxDispatch,
585 _In_ ULONG NameLength);
586
587 VOID
588 RxFreeObject(
589 _In_ PVOID pObject);
590
591 NTSTATUS
592 RxInitializeSrvCallParameters(
593 _In_ PRX_CONTEXT RxContext,
594 _Inout_ PSRV_CALL SrvCall);
595
596 VOID
597 RxAddVirtualNetRootToNetRoot(
598 _In_ PNET_ROOT NetRoot,
599 _In_ PV_NET_ROOT VNetRoot);
600
601 VOID
602 RxRemoveVirtualNetRootFromNetRoot(
603 _In_ PNET_ROOT NetRoot,
604 _In_ PV_NET_ROOT VNetRoot);
605
606 PVOID
607 RxAllocateFcbObject(
608 _In_ PRDBSS_DEVICE_OBJECT RxDeviceObject,
609 _In_ NODE_TYPE_CODE NodeType,
610 _In_ POOL_TYPE PoolType,
611 _In_ ULONG NameSize,
612 _In_opt_ PVOID AlreadyAllocatedObject);
613
614 VOID
615 RxFreeFcbObject(
616 _In_ PVOID Object);
617
618 VOID
619 RxPurgeFcb(
620 _In_ PFCB Fcb);
621
622 BOOLEAN
623 RxFinalizeNetFcb(
624 _Out_ PFCB ThisFcb,
625 _In_ BOOLEAN RecursiveFinalize,
626 _In_ BOOLEAN ForceFinalize,
627 _In_ LONG ReferenceCount);
628
629 BOOLEAN
630 RxIsThisACscAgentOpen(
631 _In_ PRX_CONTEXT RxContext);
632
633 VOID
634 NTAPI
635 RxCheckFcbStructuresForAlignment(
636 VOID);
637
638 NTSTATUS
639 RxInitializeWorkQueueDispatcher(
640 _In_ PRX_WORK_QUEUE_DISPATCHER Dispatcher);
641
642 VOID
643 RxInitializeWorkQueue(
644 _In_ PRX_WORK_QUEUE WorkQueue,
645 _In_ WORK_QUEUE_TYPE WorkQueueType,
646 _In_ ULONG MaximumNumberOfWorkerThreads,
647 _In_ ULONG MinimumNumberOfWorkerThreads);
648
649 NTSTATUS
650 RxSpinUpWorkerThread(
651 _In_ PRX_WORK_QUEUE WorkQueue,
652 _In_ PRX_WORKERTHREAD_ROUTINE Routine,
653 _In_ PVOID Parameter);
654
655 VOID
656 RxSpinUpWorkerThreads(
657 _In_ PRX_WORK_QUEUE WorkQueue);
658
659 VOID
660 NTAPI
661 RxSpinUpRequestsDispatcher(
662 _In_ PVOID Dispatcher);
663
664 VOID
665 RxpWorkerThreadDispatcher(
666 _In_ PRX_WORK_QUEUE WorkQueue,
667 _In_ PLARGE_INTEGER WaitInterval);
668
669 VOID
670 NTAPI
671 RxBootstrapWorkerThreadDispatcher(
672 _In_ PVOID WorkQueue);
673
674 PRX_PREFIX_ENTRY
675 RxTableLookupName_ExactLengthMatch(
676 _In_ PRX_PREFIX_TABLE ThisTable,
677 _In_ PUNICODE_STRING Name,
678 _In_ ULONG HashValue,
679 _In_opt_ PRX_CONNECTION_ID RxConnectionId);
680
681 PVOID
682 RxTableLookupName(
683 _In_ PRX_PREFIX_TABLE ThisTable,
684 _In_ PUNICODE_STRING Name,
685 _Out_ PUNICODE_STRING RemainingName,
686 _In_opt_ PRX_CONNECTION_ID RxConnectionId);
687
688 VOID
689 RxOrphanSrvOpens(
690 _In_ PV_NET_ROOT ThisVNetRoot);
691
692 VOID
693 RxOrphanThisFcb(
694 _In_ PFCB Fcb);
695
696 VOID
697 RxOrphanSrvOpensForThisFcb(
698 _In_ PFCB Fcb,
699 _In_ PV_NET_ROOT ThisVNetRoot,
700 _In_ BOOLEAN OrphanAll);
701
702 #define RxEqualConnectionId(C1, C2) RtlEqualMemory(C1, C2, sizeof(RX_CONNECTION_ID))
703
704 NTSTATUS
705 NTAPI
706 RxLockOperationCompletion(
707 _In_ PVOID Context,
708 _In_ PIRP Irp);
709
710 VOID
711 NTAPI
712 RxUnlockOperation(
713 _In_ PVOID Context,
714 _In_ PFILE_LOCK_INFO LockInfo);
715
716 #if (_WIN32_WINNT >= 0x0600)
717 NTSTATUS
718 RxPostStackOverflowRead(
719 _In_ PRX_CONTEXT RxContext,
720 _In_ PFCB Fcb);
721 #else
722 NTSTATUS
723 RxPostStackOverflowRead(
724 _In_ PRX_CONTEXT RxContext);
725 #endif
726
727 VOID
728 NTAPI
729 RxCancelRoutine(
730 _In_ PDEVICE_OBJECT DeviceObject,
731 _In_ PIRP Irp);
732
733 #endif