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