OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright (c) 2008, 2009, 2010, 2011 Kernel Drivers, LLC. 00003 * Copyright (c) 2009, 2010, 2011 Your File System, Inc. 00004 * All rights reserved. 00005 * 00006 * Redistribution and use in source and binary forms, with or without 00007 * modification, are permitted provided that the following conditions 00008 * are met: 00009 * 00010 * - Redistributions of source code must retain the above copyright notice, 00011 * this list of conditions and the following disclaimer. 00012 * - Redistributions in binary form must reproduce the above copyright 00013 * notice, 00014 * this list of conditions and the following disclaimer in the 00015 * documentation 00016 * and/or other materials provided with the distribution. 00017 * - Neither the names of Kernel Drivers, LLC and Your File System, Inc. 00018 * nor the names of their contributors may be used to endorse or promote 00019 * products derived from this software without specific prior written 00020 * permission from Kernel Drivers, LLC and Your File System, Inc. 00021 * 00022 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 00023 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00024 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00025 * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 00026 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00027 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00028 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00029 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00030 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00031 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00032 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00033 */ 00034 00035 #ifndef _AFS_COMMON_H 00036 #define _AFS_COMMON_H 00037 00038 // 00039 // File: AFSCommon.h 00040 // 00041 00042 extern "C" 00043 { 00044 00045 #define AFS_KERNEL_MODE 00046 00047 #include <ntifs.h> 00048 #include <wdmsec.h> // for IoCreateDeviceSecure 00049 #include <initguid.h> 00050 00051 #include "AFSDefines.h" 00052 00053 #include "AFSUserDefines.h" 00054 00055 #include "AFSUserIoctl.h" 00056 00057 #include "AFSUserStructs.h" 00058 00059 #include "AFSRedirCommonDefines.h" 00060 00061 #include "AFSRedirCommonStructs.h" 00062 00063 #include "AFSStructs.h" 00064 00065 #include "AFSProvider.h" 00066 00067 #ifndef NO_EXTERN 00068 #include "AFSExtern.h" 00069 #endif 00070 00071 #define NTSTRSAFE_LIB 00072 #include "ntstrsafe.h" 00073 00074 NTSTATUS 00075 ZwQueryInformationProcess( 00076 __in HANDLE ProcessHandle, 00077 __in PROCESSINFOCLASS ProcessInformationClass, 00078 __out PVOID ProcessInformation, 00079 __in ULONG ProcessInformationLength, 00080 __out_opt PULONG ReturnLength 00081 ); 00082 00083 // 00084 // AFSInit.cpp Prototypes 00085 // 00086 00087 NTSTATUS 00088 DriverEntry( IN PDRIVER_OBJECT DriverObj, 00089 IN PUNICODE_STRING RegPath); 00090 00091 void 00092 AFSUnload( IN PDRIVER_OBJECT DriverObject); 00093 00094 // 00095 // AFSAuthGroupSupport.cpp 00096 // 00097 00098 void 00099 AFSRetrieveAuthGroup( IN ULONGLONG ProcessId, 00100 IN ULONGLONG ThreadId, 00101 OUT GUID *AuthGroup); 00102 00103 BOOLEAN 00104 AFSIsLocalSystemAuthGroup( IN GUID *AuthGroup); 00105 00106 BOOLEAN 00107 AFSIsLocalSystemSID( IN UNICODE_STRING *SIDString); 00108 00109 BOOLEAN 00110 AFSIsNoPAGAuthGroup( IN GUID *AuthGroup); 00111 00112 NTSTATUS 00113 AFSCreateSetProcessAuthGroup( AFSAuthGroupRequestCB *CreateSetAuthGroup); 00114 00115 NTSTATUS 00116 AFSQueryProcessAuthGroupList( IN GUID *GUIDList, 00117 IN ULONG BufferLength, 00118 OUT ULONG_PTR *ReturnLength); 00119 00120 NTSTATUS 00121 AFSSetActiveProcessAuthGroup( IN AFSAuthGroupRequestCB *ActiveAuthGroup); 00122 00123 NTSTATUS 00124 AFSResetActiveProcessAuthGroup( IN AFSAuthGroupRequestCB *ActiveAuthGroup); 00125 00126 NTSTATUS 00127 AFSCreateAuthGroupForSIDorLogonSession( IN AFSAuthGroupRequestCB *AuthGroupRequestCB, 00128 IN BOOLEAN bLogonSession); 00129 00130 NTSTATUS 00131 AFSQueryAuthGroup( IN AFSAuthGroupRequestCB *AuthGroupRequestCB, 00132 OUT GUID *AuthGroupGUID, 00133 OUT ULONG_PTR *ReturnLength); 00134 00135 // 00136 // AFSBTreeSupport.cpp Prototypes 00137 // 00138 00139 NTSTATUS 00140 AFSLocateHashEntry( IN AFSBTreeEntry *TopNode, 00141 IN ULONGLONG HashIndex, 00142 IN OUT AFSBTreeEntry **TreeEntry); 00143 00144 NTSTATUS 00145 AFSInsertHashEntry( IN AFSBTreeEntry *TopNode, 00146 IN AFSBTreeEntry *FileIDEntry); 00147 00148 NTSTATUS 00149 AFSRemoveHashEntry( IN AFSBTreeEntry **TopNode, 00150 IN AFSBTreeEntry *FileIDEntry); 00151 00152 // 00153 // AFSCommSupport.cpp Prototypes 00154 // 00155 00156 NTSTATUS 00157 AFSReleaseFid( IN AFSFileID *FileId); 00158 00159 NTSTATUS 00160 AFSProcessRequest( IN ULONG RequestType, 00161 IN ULONG RequestFlags, 00162 IN GUID *AuthGroup, 00163 IN PUNICODE_STRING FileName, 00164 IN AFSFileID *FileId, 00165 IN void *Data, 00166 IN ULONG DataLength, 00167 IN OUT void *ResultBuffer, 00168 IN OUT PULONG ResultBufferLength); 00169 00170 NTSTATUS 00171 AFSProcessControlRequest( IN PIRP Irp); 00172 00173 NTSTATUS 00174 AFSInitIrpPool( void); 00175 00176 void 00177 AFSCleanupIrpPool( void); 00178 00179 NTSTATUS 00180 AFSProcessIrpRequest( IN PIRP Irp); 00181 00182 NTSTATUS 00183 AFSProcessIrpResult( IN PIRP Irp); 00184 00185 NTSTATUS 00186 AFSInsertRequest( IN AFSCommSrvcCB *CommSrvc, 00187 IN AFSPoolEntry *Entry); 00188 00189 // 00190 // AFSCreate.cpp Prototypes 00191 // 00192 00193 NTSTATUS 00194 AFSCreate( IN PDEVICE_OBJECT DeviceObject, 00195 IN PIRP Irp); 00196 00197 NTSTATUS 00198 AFSCommonCreate( IN PDEVICE_OBJECT DeviceObject, 00199 IN PIRP Irp); 00200 00201 NTSTATUS 00202 AFSControlDeviceCreate( IN PIRP Irp); 00203 00204 NTSTATUS 00205 AFSOpenRedirector( IN PIRP Irp); 00206 00207 NTSTATUS 00208 AFSInitRdrFcb( OUT AFSFcb **RdrFcb); 00209 00210 void 00211 AFSRemoveRdrFcb( IN OUT AFSFcb **RdrFcb); 00212 00213 // 00214 // AFSClose.cpp Prototypes 00215 // 00216 00217 NTSTATUS 00218 AFSClose( IN PDEVICE_OBJECT DeviceObject, 00219 IN PIRP Irp); 00220 00221 NTSTATUS 00222 AFSCommonClose( IN PDEVICE_OBJECT DeviceObject, 00223 IN PIRP Irp); 00224 00225 // 00226 // AFSNetworkProviderSupport.cpp 00227 // 00228 00229 NTSTATUS 00230 AFSAddConnectionEx( IN UNICODE_STRING *RemoteName, 00231 IN ULONG DisplayType, 00232 IN ULONG Flags); 00233 00234 void 00235 AFSInitializeConnectionInfo( IN AFSProviderConnectionCB *Connection, 00236 IN ULONG DisplayType); 00237 00238 // 00239 // AFSRead.cpp Prototypes 00240 // 00241 00242 NTSTATUS 00243 AFSRead( IN PDEVICE_OBJECT DeviceObject, 00244 IN PIRP Irp); 00245 00246 // 00247 // AFSWrite.cpp Prototypes 00248 // 00249 00250 NTSTATUS 00251 AFSWrite( IN PDEVICE_OBJECT DeviceObject, 00252 IN PIRP Irp); 00253 00254 // 00255 // AFSFileInfo.cpp Prototypes 00256 // 00257 00258 NTSTATUS 00259 AFSQueryFileInfo( IN PDEVICE_OBJECT DeviceObject, 00260 IN PIRP Irp); 00261 00262 NTSTATUS 00263 AFSSetFileInfo( IN PDEVICE_OBJECT DeviceObject, 00264 IN PIRP Irp); 00265 00266 // 00267 // AFSEa.cpp Prototypes 00268 // 00269 00270 NTSTATUS 00271 AFSQueryEA( IN PDEVICE_OBJECT DeviceObject, 00272 IN PIRP Irp); 00273 00274 NTSTATUS 00275 AFSSetEA( IN PDEVICE_OBJECT DeviceObject, 00276 IN PIRP Irp); 00277 00278 // 00279 // AFSFlushBuffers.cpp Prototypes 00280 // 00281 00282 NTSTATUS 00283 AFSFlushBuffers( IN PDEVICE_OBJECT DeviceObject, 00284 IN PIRP Irp); 00285 00286 // 00287 // AFSVolumeInfo.cpp Prototypes 00288 // 00289 00290 NTSTATUS 00291 AFSQueryVolumeInfo( IN PDEVICE_OBJECT DeviceObject, 00292 IN PIRP Irp); 00293 00294 NTSTATUS 00295 AFSSetVolumeInfo( IN PDEVICE_OBJECT DeviceObject, 00296 IN PIRP Irp); 00297 00298 NTSTATUS 00299 AFSSetVolumeInfo( IN PDEVICE_OBJECT DeviceObject, 00300 IN PIRP Irp); 00301 00302 // 00303 // AFSDirControl.cpp Prototypes 00304 // 00305 00306 NTSTATUS 00307 AFSDirControl( IN PDEVICE_OBJECT DeviceObject, 00308 IN PIRP Irp); 00309 00310 // 00311 // AFSFSControl.cpp Prototypes 00312 // 00313 00314 NTSTATUS 00315 AFSFSControl( IN PDEVICE_OBJECT DeviceObject, 00316 IN PIRP Irp); 00317 00318 // 00319 // AFSDevControl.cpp Prototypes 00320 // 00321 00322 NTSTATUS 00323 AFSDevControl( IN PDEVICE_OBJECT DeviceObject, 00324 IN PIRP Irp); 00325 00326 // 00327 // AFSInternalDevControl.cpp Prototypes 00328 // 00329 00330 NTSTATUS 00331 AFSInternalDevControl( IN PDEVICE_OBJECT DeviceObject, 00332 IN PIRP Irp); 00333 00334 // 00335 // AFSShutdown.cpp Prototypes 00336 // 00337 00338 NTSTATUS 00339 AFSShutdown( IN PDEVICE_OBJECT DeviceObject, 00340 IN PIRP Irp); 00341 00342 00343 NTSTATUS 00344 AFSShutdownFilesystem( void); 00345 00346 // 00347 // AFSLockControl.cpp Prototypes 00348 // 00349 00350 NTSTATUS 00351 AFSLockControl( IN PDEVICE_OBJECT DeviceObject, 00352 IN PIRP Irp); 00353 00354 // 00355 // AFSCleanup.cpp Prototypes 00356 // 00357 00358 NTSTATUS 00359 AFSCleanup( IN PDEVICE_OBJECT DeviceObject, 00360 IN PIRP Irp); 00361 00362 NTSTATUS 00363 AFSCommonCleanup( IN PDEVICE_OBJECT DeviceObject, 00364 IN PIRP Irp); 00365 00366 // 00367 // AFSSecurity.cpp Prototypes 00368 // 00369 00370 NTSTATUS 00371 AFSQuerySecurity( IN PDEVICE_OBJECT DeviceObject, 00372 IN PIRP Irp); 00373 00374 NTSTATUS 00375 AFSSetSecurity( IN PDEVICE_OBJECT DeviceObject, 00376 IN PIRP Irp); 00377 00378 // 00379 // AFSSystemControl.cpp Prototypes 00380 // 00381 00382 NTSTATUS 00383 AFSSystemControl( IN PDEVICE_OBJECT DeviceObject, 00384 IN PIRP Irp); 00385 00386 // 00387 // AFSQuota.cpp Prototypes 00388 // 00389 00390 NTSTATUS 00391 AFSQueryQuota( IN PDEVICE_OBJECT DeviceObject, 00392 IN PIRP Irp); 00393 00394 NTSTATUS 00395 AFSSetQuota( IN PDEVICE_OBJECT DeviceObject, 00396 IN PIRP Irp); 00397 00398 // 00399 // AFSGeneric.cpp Prototypes 00400 // 00401 00402 ULONG 00403 AFSExceptionFilter( IN CHAR *FunctionString, 00404 IN ULONG Code, 00405 IN PEXCEPTION_POINTERS ExceptPtrs); 00406 00407 BOOLEAN 00408 AFSAcquireExcl( IN PERESOURCE Resource, 00409 IN BOOLEAN wait); 00410 00411 BOOLEAN 00412 AFSAcquireSharedStarveExclusive( IN PERESOURCE Resource, 00413 IN BOOLEAN Wait); 00414 00415 BOOLEAN 00416 AFSAcquireShared( IN PERESOURCE Resource, 00417 IN BOOLEAN wait); 00418 00419 void 00420 AFSReleaseResource( IN PERESOURCE Resource); 00421 00422 void 00423 AFSConvertToShared( IN PERESOURCE Resource); 00424 00425 void 00426 AFSCompleteRequest( IN PIRP Irp, 00427 IN ULONG Status); 00428 00429 NTSTATUS 00430 AFSReadRegistry( IN PUNICODE_STRING RegistryPath); 00431 00432 NTSTATUS 00433 AFSUpdateRegistryParameter( IN PUNICODE_STRING ValueName, 00434 IN ULONG ValueType, 00435 IN void *ValueData, 00436 IN ULONG ValueDataLength); 00437 00438 NTSTATUS 00439 AFSInitializeControlDevice( void); 00440 00441 NTSTATUS 00442 AFSRemoveControlDevice( void); 00443 00444 NTSTATUS 00445 AFSDefaultDispatch( IN PDEVICE_OBJECT DeviceObject, 00446 IN PIRP Irp); 00447 00448 NTSTATUS 00449 AFSIrpComplete( IN PDEVICE_OBJECT DeviceObject, 00450 IN PIRP Irp, 00451 IN PVOID Context); 00452 00453 void 00454 AFSInitServerStrings( void); 00455 00456 NTSTATUS 00457 AFSReadServerName( void); 00458 00459 NTSTATUS 00460 AFSSetSysNameInformation( IN AFSSysNameNotificationCB *SysNameInfo, 00461 IN ULONG SysNameInfoBufferLength); 00462 00463 void 00464 AFSResetSysNameList( IN AFSSysNameCB *SysNameList); 00465 00466 NTSTATUS 00467 AFSSendDeviceIoControl( IN DEVICE_OBJECT *TargetDeviceObject, 00468 IN ULONG IOControl, 00469 IN void *InputBuffer, 00470 IN ULONG InputBufferLength, 00471 IN OUT void *OutputBuffer, 00472 IN ULONG OutputBufferLength, 00473 OUT ULONG *ResultLength); 00474 00475 void * 00476 AFSExAllocatePoolWithTag( IN POOL_TYPE PoolType, 00477 IN SIZE_T NumberOfBytes, 00478 IN ULONG Tag); 00479 00480 void 00481 AFSExFreePoolWithTag( IN void *Buffer, IN ULONG Tag); 00482 00483 NTSTATUS 00484 AFSShutdownRedirector( void); 00485 00486 BOOLEAN 00487 AFSAcquireFcbForLazyWrite( IN PVOID Fcb, 00488 IN BOOLEAN Wait); 00489 00490 VOID 00491 AFSReleaseFcbFromLazyWrite( IN PVOID Fcb); 00492 00493 BOOLEAN 00494 AFSAcquireFcbForReadAhead( IN PVOID Fcb, 00495 IN BOOLEAN Wait); 00496 00497 VOID 00498 AFSReleaseFcbFromReadAhead( IN PVOID Fcb); 00499 00500 NTSTATUS 00501 AFSGetCallerSID( OUT UNICODE_STRING *SIDString, 00502 OUT BOOLEAN *pbImpersonation); 00503 00504 ULONG 00505 AFSGetSessionId( IN HANDLE ProcessId, 00506 OUT BOOLEAN *pbImpersonation); 00507 00508 NTSTATUS 00509 AFSCheckThreadDacl( OUT GUID *AuthGroup); 00510 00511 NTSTATUS 00512 AFSProcessSetProcessDacl( IN AFSProcessCB *ProcessCB); 00513 00514 // 00515 // Prototypes in AFSFastIoSupprt.cpp 00516 // 00517 00518 BOOLEAN 00519 AFSFastIoCheckIfPossible( IN struct _FILE_OBJECT *FileObject, 00520 IN PLARGE_INTEGER FileOffset, 00521 IN ULONG Length, 00522 IN BOOLEAN Wait, 00523 IN ULONG LockKey, 00524 IN BOOLEAN CheckForReadOperation, 00525 OUT PIO_STATUS_BLOCK IoStatus, 00526 IN struct _DEVICE_OBJECT *DeviceObject); 00527 00528 BOOLEAN 00529 AFSFastIoRead( IN struct _FILE_OBJECT *FileObject, 00530 IN PLARGE_INTEGER FileOffset, 00531 IN ULONG Length, 00532 IN BOOLEAN Wait, 00533 IN ULONG LockKey, 00534 OUT PVOID Buffer, 00535 OUT PIO_STATUS_BLOCK IoStatus, 00536 IN struct _DEVICE_OBJECT *DeviceObject); 00537 00538 BOOLEAN 00539 AFSFastIoWrite( IN struct _FILE_OBJECT *FileObject, 00540 IN PLARGE_INTEGER FileOffset, 00541 IN ULONG Length, 00542 IN BOOLEAN Wait, 00543 IN ULONG LockKey, 00544 IN PVOID Buffer, 00545 OUT PIO_STATUS_BLOCK IoStatus, 00546 IN struct _DEVICE_OBJECT *DeviceObject); 00547 00548 BOOLEAN 00549 AFSFastIoQueryBasicInfo( IN struct _FILE_OBJECT *FileObject, 00550 IN BOOLEAN Wait, 00551 OUT PFILE_BASIC_INFORMATION Buffer, 00552 OUT PIO_STATUS_BLOCK IoStatus, 00553 IN struct _DEVICE_OBJECT *DeviceObject); 00554 00555 BOOLEAN 00556 AFSFastIoQueryStandardInfo( IN struct _FILE_OBJECT *FileObject, 00557 IN BOOLEAN Wait, 00558 OUT PFILE_STANDARD_INFORMATION Buffer, 00559 OUT PIO_STATUS_BLOCK IoStatus, 00560 IN struct _DEVICE_OBJECT *DeviceObject); 00561 00562 BOOLEAN 00563 AFSFastIoLock( IN struct _FILE_OBJECT *FileObject, 00564 IN PLARGE_INTEGER FileOffset, 00565 IN PLARGE_INTEGER Length, 00566 IN PEPROCESS ProcessId, 00567 IN ULONG Key, 00568 IN BOOLEAN FailImmediately, 00569 IN BOOLEAN ExclusiveLock, 00570 OUT PIO_STATUS_BLOCK IoStatus, 00571 IN struct _DEVICE_OBJECT *DeviceObject); 00572 00573 BOOLEAN 00574 AFSFastIoUnlockSingle( IN struct _FILE_OBJECT *FileObject, 00575 IN PLARGE_INTEGER FileOffset, 00576 IN PLARGE_INTEGER Length, 00577 IN PEPROCESS ProcessId, 00578 IN ULONG Key, 00579 OUT PIO_STATUS_BLOCK IoStatus, 00580 IN struct _DEVICE_OBJECT *DeviceObject); 00581 00582 BOOLEAN 00583 AFSFastIoUnlockAll( IN struct _FILE_OBJECT *FileObject, 00584 IN PEPROCESS ProcessId, 00585 OUT PIO_STATUS_BLOCK IoStatus, 00586 IN struct _DEVICE_OBJECT *DeviceObject); 00587 00588 BOOLEAN 00589 AFSFastIoUnlockAllByKey( IN struct _FILE_OBJECT *FileObject, 00590 IN PVOID ProcessId, 00591 IN ULONG Key, 00592 OUT PIO_STATUS_BLOCK IoStatus, 00593 IN struct _DEVICE_OBJECT *DeviceObject); 00594 00595 BOOLEAN 00596 AFSFastIoDevCtrl( IN struct _FILE_OBJECT *FileObject, 00597 IN BOOLEAN Wait, 00598 IN PVOID InputBuffer OPTIONAL, 00599 IN ULONG InputBufferLength, 00600 OUT PVOID OutputBuffer OPTIONAL, 00601 IN ULONG OutputBufferLength, 00602 IN ULONG IoControlCode, 00603 OUT PIO_STATUS_BLOCK IoStatus, 00604 IN struct _DEVICE_OBJECT *DeviceObject); 00605 00606 VOID 00607 AFSFastIoAcquireFile( IN struct _FILE_OBJECT *FileObject); 00608 00609 VOID 00610 AFSFastIoReleaseFile( IN struct _FILE_OBJECT *FileObject); 00611 00612 VOID 00613 AFSFastIoDetachDevice( IN struct _DEVICE_OBJECT *SourceDevice, 00614 IN struct _DEVICE_OBJECT *TargetDevice); 00615 00616 BOOLEAN 00617 AFSFastIoQueryNetworkOpenInfo( IN struct _FILE_OBJECT *FileObject, 00618 IN BOOLEAN Wait, 00619 OUT struct _FILE_NETWORK_OPEN_INFORMATION *Buffer, 00620 OUT struct _IO_STATUS_BLOCK *IoStatus, 00621 IN struct _DEVICE_OBJECT *DeviceObject); 00622 00623 BOOLEAN 00624 AFSFastIoMdlRead( IN struct _FILE_OBJECT *FileObject, 00625 IN PLARGE_INTEGER FileOffset, 00626 IN ULONG Length, 00627 IN ULONG LockKey, 00628 OUT PMDL *MdlChain, 00629 OUT PIO_STATUS_BLOCK IoStatus, 00630 IN struct _DEVICE_OBJECT *DeviceObject); 00631 00632 BOOLEAN 00633 AFSFastIoMdlReadComplete( IN struct _FILE_OBJECT *FileObject, 00634 IN PMDL MdlChain, 00635 IN struct _DEVICE_OBJECT *DeviceObject); 00636 00637 BOOLEAN 00638 AFSFastIoPrepareMdlWrite( IN struct _FILE_OBJECT *FileObject, 00639 IN PLARGE_INTEGER FileOffset, 00640 IN ULONG Length, 00641 IN ULONG LockKey, 00642 OUT PMDL *MdlChain, 00643 OUT PIO_STATUS_BLOCK IoStatus, 00644 IN struct _DEVICE_OBJECT *DeviceObject); 00645 00646 BOOLEAN 00647 AFSFastIoMdlWriteComplete( IN struct _FILE_OBJECT *FileObject, 00648 IN PLARGE_INTEGER FileOffset, 00649 IN PMDL MdlChain, 00650 IN struct _DEVICE_OBJECT *DeviceObject); 00651 00652 NTSTATUS 00653 AFSFastIoAcquireForModWrite( IN struct _FILE_OBJECT *FileObject, 00654 IN PLARGE_INTEGER EndingOffset, 00655 OUT struct _ERESOURCE **ResourceToRelease, 00656 IN struct _DEVICE_OBJECT *DeviceObject); 00657 00658 NTSTATUS 00659 AFSFastIoReleaseForModWrite( IN struct _FILE_OBJECT *FileObject, 00660 IN struct _ERESOURCE *ResourceToRelease, 00661 IN struct _DEVICE_OBJECT *DeviceObject); 00662 00663 NTSTATUS 00664 AFSFastIoAcquireForCCFlush( IN struct _FILE_OBJECT *FileObject, 00665 IN struct _DEVICE_OBJECT *DeviceObject); 00666 00667 NTSTATUS 00668 AFSFastIoReleaseForCCFlush( IN struct _FILE_OBJECT *FileObject, 00669 IN struct _DEVICE_OBJECT *DeviceObject); 00670 00671 BOOLEAN 00672 AFSFastIoReadCompressed( IN struct _FILE_OBJECT *FileObject, 00673 IN PLARGE_INTEGER FileOffset, 00674 IN ULONG Length, 00675 IN ULONG LockKey, 00676 OUT PVOID Buffer, 00677 OUT PMDL *MdlChain, 00678 OUT PIO_STATUS_BLOCK IoStatus, 00679 OUT struct _COMPRESSED_DATA_INFO *CompressedDataInfo, 00680 IN ULONG CompressedDataInfoLength, 00681 IN struct _DEVICE_OBJECT *DeviceObject); 00682 00683 BOOLEAN 00684 AFSFastIoWriteCompressed( IN struct _FILE_OBJECT *FileObject, 00685 IN PLARGE_INTEGER FileOffset, 00686 IN ULONG Length, 00687 IN ULONG LockKey, 00688 IN PVOID Buffer, 00689 OUT PMDL *MdlChain, 00690 OUT PIO_STATUS_BLOCK IoStatus, 00691 IN struct _COMPRESSED_DATA_INFO *CompressedDataInfo, 00692 IN ULONG CompressedDataInfoLength, 00693 IN struct _DEVICE_OBJECT *DeviceObject); 00694 00695 BOOLEAN 00696 AFSFastIoMdlReadCompleteCompressed( IN struct _FILE_OBJECT *FileObject, 00697 IN PMDL MdlChain, 00698 IN struct _DEVICE_OBJECT *DeviceObject); 00699 00700 BOOLEAN 00701 AFSFastIoMdlWriteCompleteCompressed( IN struct _FILE_OBJECT *FileObject, 00702 IN PLARGE_INTEGER FileOffset, 00703 IN PMDL MdlChain, 00704 IN struct _DEVICE_OBJECT *DeviceObject); 00705 00706 BOOLEAN 00707 AFSFastIoQueryOpen( IN struct _IRP *Irp, 00708 OUT PFILE_NETWORK_OPEN_INFORMATION NetworkInformation, 00709 IN struct _DEVICE_OBJECT *DeviceObject); 00710 00711 // 00712 // AFSLibrarySupport.cpp Prototypes 00713 // 00714 00715 NTSTATUS 00716 AFSLoadLibrary( IN ULONG Flags, 00717 IN UNICODE_STRING *ServicePath); 00718 00719 NTSTATUS 00720 AFSUnloadLibrary( IN BOOLEAN CancelQueue); 00721 00722 NTSTATUS 00723 AFSCheckLibraryState( IN PIRP Irp); 00724 00725 NTSTATUS 00726 AFSClearLibraryRequest( void); 00727 00728 NTSTATUS 00729 AFSQueueLibraryRequest( IN PIRP Irp); 00730 00731 NTSTATUS 00732 AFSProcessQueuedResults( IN BOOLEAN CancelRequest); 00733 00734 NTSTATUS 00735 AFSSubmitLibraryRequest( IN PIRP Irp); 00736 00737 NTSTATUS 00738 AFSInitializeLibrary( IN AFSFileID *GlobalRootFid, 00739 IN BOOLEAN QueueRootEnumeration); 00740 00741 // 00742 // AFSRDRSupport.cpp Prototypes 00743 // 00744 00745 NTSTATUS 00746 AFSInitRDRDevice( void); 00747 00748 NTSTATUS 00749 AFSRDRDeviceControl( IN PDEVICE_OBJECT DeviceObject, 00750 IN PIRP Irp); 00751 00752 NTSTATUS 00753 AFSInitializeRedirector( IN AFSRedirectorInitInfo *CacheFileInfo); 00754 00755 NTSTATUS 00756 AFSCloseRedirector( void); 00757 00758 // 00759 // AFSLogSupport.cpp 00760 // 00761 00762 NTSTATUS 00763 AFSDbgLogMsg( IN ULONG Subsystem, 00764 IN ULONG Level, 00765 IN PCCH Format, 00766 ...); 00767 00768 NTSTATUS 00769 AFSInitializeDbgLog( void); 00770 00771 NTSTATUS 00772 AFSTearDownDbgLog( void); 00773 00774 NTSTATUS 00775 AFSConfigureTrace( IN AFSTraceConfigCB *TraceInfo); 00776 00777 NTSTATUS 00778 AFSGetTraceBuffer( IN ULONG TraceBufferLength, 00779 OUT void *TraceBuffer, 00780 OUT ULONG_PTR *CopiedLength); 00781 00782 void 00783 AFSTagInitialLogEntry( void); 00784 00785 void 00786 AFSDumpTraceFiles( void); 00787 00788 NTSTATUS 00789 AFSInitializeDumpFile( void); 00790 00791 // 00792 // AFSProcessSupport.cpp Prototypes 00793 // 00794 00795 void 00796 AFSProcessNotify( IN HANDLE ParentId, 00797 IN HANDLE ProcessId, 00798 IN BOOLEAN Create); 00799 00800 void 00801 AFSProcessNotifyEx( IN OUT PEPROCESS Process, 00802 IN HANDLE ProcessId, 00803 IN OUT PPS_CREATE_NOTIFY_INFO CreateInfo); 00804 00805 void 00806 AFSProcessCreate( IN HANDLE ParentId, 00807 IN HANDLE ProcessId, 00808 IN HANDLE CreatingProcessId, 00809 IN HANDLE CreatingThreadId); 00810 00811 void 00812 AFSProcessDestroy( IN HANDLE ProcessId); 00813 00814 GUID * 00815 AFSValidateProcessEntry( IN HANDLE ProcessId); 00816 00817 BOOLEAN 00818 AFSIs64BitProcess( IN ULONGLONG ProcessId); 00819 00820 AFSProcessCB * 00821 AFSInitializeProcessCB( IN ULONGLONG ParentProcessId, 00822 IN ULONGLONG ProcessId); 00823 00824 AFSThreadCB * 00825 AFSInitializeThreadCB( IN AFSProcessCB *ProcessCB, 00826 IN ULONGLONG ThreadId); 00827 00828 }; 00829 00830 #endif /* _AFS_COMMON_H */