#include <ntsrv.h>
#include <smbtrace.h>
#include <smbtrsup.h>
Go to the source code of this file.
Classes | |
struct | _SMBTRACE_QUEUE_ENTRY |
struct | _INSTANCE_DATA |
struct | _TRACE_DEREFERENCE_ITEM |
Defines | |
#define | _SMBTRSUP_SYS_ 1 |
#define | TrPrint(x) |
#define | PAGED_CODE_CHECK() |
#define | ACQUIRE_SPIN_LOCK(a, b) KeAcquireSpinLock(a, b) |
#define | RELEASE_SPIN_LOCK(a, b) KeReleaseSpinLock(a, b) |
#define | LOCK_INC_ID(var) |
#define | LOCK_ZERO_ID(var) |
#define | ID(field) (SmbTraceData[Component].field) |
#define | ACL_LENGTH |
#define | NUMBER_OF_BLOCKING_OBJECTS 4 |
#define | INDEX_WAIT_TERMINATIONEVENT 0 |
#define | INDEX_WAIT_APPTERMINATIONEVENT 1 |
#define | INDEX_WAIT_NEEDMEMORYEVENT 2 |
#define | INDEX_WAIT_QUEUESEMAPHORE 3 |
#define | STATUS_WAIT_TERMINATIONEVENT STATUS_WAIT_0 |
#define | STATUS_WAIT_APPTERMINATIONEVENT STATUS_WAIT_1 |
#define | STATUS_WAIT_NEEDMEMORYEVENT STATUS_WAIT_2 |
#define | STATUS_WAIT_QUEUESEMAPHORE STATUS_WAIT_3 |
Typedefs | |
typedef enum _SMBTRACE_STATE | SMBTRACE_STATE |
typedef _SMBTRACE_QUEUE_ENTRY | SMBTRACE_QUEUE_ENTRY |
typedef _SMBTRACE_QUEUE_ENTRY * | PSMBTRACE_QUEUE_ENTRY |
typedef _INSTANCE_DATA | INSTANCE_DATA |
typedef _TRACE_DEREFERENCE_ITEM | TRACE_DEREFERENCE_ITEM |
typedef _TRACE_DEREFERENCE_ITEM * | PTRACE_DEREFERENCE_ITEM |
Enumerations | |
enum | _SMBTRACE_STATE { TraceStopped, TraceStarting, TraceStartStopFile, TraceStartStopNull, TraceAppWaiting, TraceRunning, TraceStopping } |
Functions | |
BOOLEAN | SmbTraceReferenceHeap (IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceDereferenceHeap (IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceDisconnect (IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceEmptyQueue (IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceThreadEntry (IN PVOID Context) |
NTSTATUS | SmbTraceFreeMemory (IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceToClient (IN PVOID Smb, IN CLONG SmbLength, IN PVOID SmbAddress, IN SMBTRACE_COMPONENT Component) |
ULONG | SmbTraceMdlLength (IN PMDL Mdl) |
VOID | SmbTraceCopyMdlContiguous (OUT PVOID Destination, IN PMDL Mdl, IN ULONG Length) |
VOID | SmbTraceDeferredDereferenceHeap (IN PVOID Context) |
NTSTATUS | SmbTraceInitialize (IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceTerminate (IN SMBTRACE_COMPONENT Component) |
NTSTATUS | SmbTraceStart (IN ULONG InputBufferLength, IN ULONG OutputBufferLength, IN OUT PVOID ConfigInOut, IN PFILE_OBJECT FileObject, IN SMBTRACE_COMPONENT Component) |
NTSTATUS | SmbTraceStop (IN PFILE_OBJECT FileObject OPTIONAL, IN SMBTRACE_COMPONENT Component) |
VOID | SmbTraceCompleteSrv (IN PMDL SmbMdl, IN PVOID Smb, IN CLONG SmbLength) |
VOID | SmbTraceCompleteRdr (IN PMDL SmbMdl, IN PVOID Smb, IN CLONG SmbLength) |
Variables | |
INSTANCE_DATA | SmbTraceData [] |
BOOLEAN | SmbTraceActive [] = {FALSE, FALSE} |
BOOLEAN | SmbTraceTransitioning [] = {FALSE, FALSE} |
HANDLE | SmbTraceDiscardableCodeHandle = 0 |
HANDLE | SmbTraceDiscardableDataHandle = 0 |
|
Definition at line 35 of file smbtrsup.c. |
|
Value:
Referenced by SmbTraceStart(). |
|
Definition at line 84 of file smbtrsup.c. Referenced by SmbTraceDereferenceHeap(), and SmbTraceReferenceHeap(). |
|
|
Referenced by SmbTraceThreadEntry(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Value: Definition at line 91 of file smbtrsup.c. Referenced by SmbTraceCompleteRdr(), SmbTraceCompleteSrv(), SmbTraceThreadEntry(), and SmbTraceToClient(). |
|
Value:
Definition at line 98 of file smbtrsup.c. Referenced by SmbTraceToClient(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Definition at line 69 of file smbtrsup.c. |
|
Definition at line 85 of file smbtrsup.c. Referenced by SmbTraceDereferenceHeap(), and SmbTraceReferenceHeap(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Referenced by SmbTraceThreadEntry(). |
|
Definition at line 42 of file smbtrsup.c. Referenced by SmbTraceCompleteRdr(), SmbTraceCompleteSrv(), SmbTraceDereferenceHeap(), SmbTraceDisconnect(), SmbTraceFreeMemory(), SmbTraceReferenceHeap(), SmbTraceStart(), SmbTraceStop(), SmbTraceThreadEntry(), and SmbTraceToClient(). |
|
|
|
Referenced by SmbTraceCompleteRdr(), SmbTraceCompleteSrv(), SmbTraceEmptyQueue(), and SmbTraceThreadEntry(). |
|
Referenced by SmbTraceDeferredDereferenceHeap(), and SmbTraceDereferenceHeap(). |
|
|
|
|
|
|
|
Definition at line 109 of file smbtrsup.c.
|
|
Definition at line 1456 of file smbtrsup.c. References ASSERT, _SMBTRACE_QUEUE_ENTRY::Buffer, _SMBTRACE_QUEUE_ENTRY::BufferNonPaged, DISPATCH_LEVEL, ExAllocatePoolWithTag, ExFreePool(), ExInterlockedInsertTailList(), FALSE, ID, KeAttachProcess(), KeDetachProcess(), KeInitializeEvent, KeReleaseSemaphore(), KernelMode, KeSetEvent(), KeWaitForSingleObject(), _SMBTRACE_QUEUE_ENTRY::ListEntry, LOCK_INC_ID, NonPagedPool, NULL, PsGetCurrentProcess, PSMBTRACE_QUEUE_ENTRY, RtlAllocateHeap, SEMAPHORE_INCREMENT, _SMBTRACE_QUEUE_ENTRY::SmbAddress, _SMBTRACE_QUEUE_ENTRY::SmbLength, SmbTraceActive, SmbTraceCopyMdlContiguous(), SmbTraceDereferenceHeap(), SmbTraceMdlLength(), SmbTraceReferenceHeap(), TraceRunning, TrPrint, TRUE, UserRequest, and _SMBTRACE_QUEUE_ENTRY::WaitEvent.
|
|
Definition at line 1242 of file smbtrsup.c. References ASSERT, _SMBTRACE_QUEUE_ENTRY::Buffer, _SMBTRACE_QUEUE_ENTRY::BufferNonPaged, DISPATCH_LEVEL, ExAllocatePoolWithTag, ExFreePool(), ExInterlockedInsertTailList(), FALSE, ID, KeInitializeEvent, KeReleaseSemaphore(), KernelMode, KeSetEvent(), KeWaitForSingleObject(), _SMBTRACE_QUEUE_ENTRY::ListEntry, LOCK_INC_ID, NonPagedPool, NULL, PAGED_CODE, PsGetCurrentProcess, PSMBTRACE_QUEUE_ENTRY, RtlAllocateHeap, SEMAPHORE_INCREMENT, _SMBTRACE_QUEUE_ENTRY::SmbAddress, _SMBTRACE_QUEUE_ENTRY::SmbLength, SmbTraceActive, SmbTraceCopyMdlContiguous(), SmbTraceDereferenceHeap(), SmbTraceMdlLength(), SmbTraceReferenceHeap(), TraceRunning, TrPrint, UserRequest, and _SMBTRACE_QUEUE_ENTRY::WaitEvent.
|
|
Definition at line 2636 of file smbtrsup.c. References ASSERT, MmGetMdlByteCount, MmGetSystemAddressForMdl, and NULL. Referenced by SmbTraceCompleteRdr(), and SmbTraceCompleteSrv().
|
|
Definition at line 1760 of file smbtrsup.c. References _TRACE_DEREFERENCE_ITEM::Component, ExFreePool(), PAGED_CODE, PTRACE_DEREFERENCE_ITEM, and SmbTraceDereferenceHeap(). Referenced by SmbTraceDereferenceHeap().
|
|
Definition at line 1794 of file smbtrsup.c. References ACQUIRE_SPIN_LOCK, _TRACE_DEREFERENCE_ITEM::Component, DelayedWorkQueue, DISPATCH_LEVEL, ExAllocatePoolWithTag, ExInitializeWorkItem, ExQueueWorkItem(), ID, NonPagedPoolMustSucceed, PTRACE_DEREFERENCE_ITEM, RELEASE_SPIN_LOCK, SmbTraceDeferredDereferenceHeap(), SmbTraceDisconnect(), TrPrint, and _TRACE_DEREFERENCE_ITEM::WorkItem. Referenced by SmbTraceCompleteRdr(), SmbTraceCompleteSrv(), SmbTraceDeferredDereferenceHeap(), and SmbTraceThreadEntry().
|
|
Definition at line 1879 of file smbtrsup.c. References FALSE, ID, KeAttachProcess(), KeDetachProcess(), NULL, PAGED_CODE, PsGetCurrentProcess, RtlDestroyHeap(), TrPrint, and TRUE. Referenced by SmbTraceDereferenceHeap(), and SmbTraceStart().
|
|
Definition at line 1949 of file smbtrsup.c. References ASSERT, _SMBTRACE_QUEUE_ENTRY::Buffer, _SMBTRACE_QUEUE_ENTRY::BufferNonPaged, ExFreePool(), ExInterlockedRemoveHeadList(), FALSE, ID, KeSetEvent(), NULL, PAGED_CODE, PSMBTRACE_QUEUE_ENTRY, TRUE, and _SMBTRACE_QUEUE_ENTRY::WaitEvent. Referenced by SmbTraceThreadEntry().
|
|
Definition at line 2355 of file smbtrsup.c. References ID, L, PAGED_CODE, RtlFreeHeap, and TrPrint. Referenced by SmbTraceThreadEntry().
|
|
Definition at line 438 of file smbtrsup.c. References ERESOURCE, ExAllocatePoolWithTag, ExDeleteResource, ExFreePool(), ExInitializeResource, FALSE, ID, KeInitializeEvent, KeInitializeSpinLock(), NonPagedPool, NULL, PAGED_CODE, and TRUE.
|
|
Definition at line 2603 of file smbtrsup.c. References MmGetMdlByteCount, and NULL. Referenced by SmbTraceCompleteRdr(), and SmbTraceCompleteSrv().
|
|
Definition at line 1709 of file smbtrsup.c. References ACQUIRE_SPIN_LOCK, ASSERT, FALSE, ID, RELEASE_SPIN_LOCK, TraceRunning, TrPrint, and TRUE. Referenced by SmbTraceCompleteRdr(), SmbTraceCompleteSrv(), and SmbTraceStart().
|
|
Definition at line 551 of file smbtrsup.c. References ACL_LENGTH, ASSERT, Buffer, ExAcquireResourceExclusive, ExReleaseResource, FALSE, ID, KeResetEvent(), KernelMode, KeWaitForSingleObject(), L, MmLockPagableDataSection(), NT_SUCCESS, NTSTATUS(), NULL, PAGE_SIZE, PAGED_CODE, PKSTART_ROUTINE, PsCreateSystemThread(), PsGetCurrentProcess, RtlAddAccessAllowedAce(), RtlAllocateHeap, RtlCreateAcl(), RtlCreateHeap(), RtlCreateSecurityDescriptor(), RtlInitUnicodeString(), RtlSetDaclSecurityDescriptor(), _SE_EXPORTS::SeAliasAdminsSid, SeExports, SmbTraceActive, SmbTraceData, SmbTraceDiscardableCodeHandle, SmbTraceDiscardableDataHandle, SmbTraceDisconnect(), SmbTraceReferenceHeap(), SmbTraceStop(), SmbTraceThreadEntry(), TraceRunning, TraceStarting, TraceStartStopFile, TraceStartStopNull, TraceStopped, TrPrint, TRUE, UserRequest, and VOID().
|
|
Definition at line 1050 of file smbtrsup.c. References ASSERT, ExAcquireResourceExclusive, ExReleaseResource, FALSE, ID, KeAttachProcess(), KeDetachProcess(), KernelMode, KeSetEvent(), KeWaitForSingleObject(), MmUnlockPagableImageSection(), NULL, PAGED_CODE, PsGetCurrentProcess, SmbTraceActive, SmbTraceDiscardableCodeHandle, SmbTraceDiscardableDataHandle, TraceAppWaiting, TraceRunning, TraceStarting, TraceStartStopFile, TraceStartStopNull, TraceStopped, TraceStopping, TrPrint, TRUE, and UserRequest. Referenced by SmbTraceStart().
|
|
Definition at line 509 of file smbtrsup.c. References ExDeleteResource, ExFreePool(), FALSE, ID, and PAGED_CODE.
|
|
Definition at line 2020 of file smbtrsup.c. References ASSERT, _SMBTRACE_QUEUE_ENTRY::Buffer, _SMBTRACE_QUEUE_ENTRY::BufferNonPaged, ExFreePool(), ExInterlockedRemoveHeadList(), FALSE, ID, INDEX_WAIT_APPTERMINATIONEVENT, INDEX_WAIT_NEEDMEMORYEVENT, INDEX_WAIT_QUEUESEMAPHORE, INDEX_WAIT_TERMINATIONEVENT, KeInitializeSemaphore(), KeInitializeSpinLock(), KeResetEvent(), KernelMode, KeSetEvent(), KeWaitForMultipleObjects(), L, LOCK_INC_ID, NT_SUCCESS, NTSTATUS(), NULL, NUMBER_OF_BLOCKING_OBJECTS, PAGED_CODE, PSMBTRACE_QUEUE_ENTRY, PsTerminateSystemThread(), RtlAllocateHeap, _SMBTRACE_QUEUE_ENTRY::SmbAddress, _SMBTRACE_QUEUE_ENTRY::SmbLength, SmbTraceDereferenceHeap(), SmbTraceEmptyQueue(), SmbTraceFreeMemory(), SmbTraceToClient(), STATUS_WAIT_APPTERMINATIONEVENT, STATUS_WAIT_NEEDMEMORYEVENT, STATUS_WAIT_QUEUESEMAPHORE, STATUS_WAIT_TERMINATIONEVENT, THREAD_WAIT_OBJECTS, TraceAppWaiting, TrPrint, TRUE, UserRequest, and _SMBTRACE_QUEUE_ENTRY::WaitEvent. Referenced by SmbTraceStart().
|
|
Definition at line 2425 of file smbtrsup.c. References ASSERT, FALSE, ID, KeResetEvent(), KernelMode, L, LOCK_INC_ID, LOCK_ZERO_ID, NT_SUCCESS, NTSTATUS(), NULL, ObDereferenceObject, ObReferenceObjectByHandle(), PAGED_CODE, PsGetCurrentProcess, RtlFreeHeap, TraceRunning, and TrPrint. Referenced by SmbTraceThreadEntry().
|
|
Definition at line 333 of file smbtrsup.c. Referenced by SmbTraceCompleteRdr(), SmbTraceCompleteSrv(), SmbTraceStart(), and SmbTraceStop(). |
|
Definition at line 278 of file smbtrsup.c. Referenced by SmbTraceStart(). |
|
Definition at line 337 of file smbtrsup.c. Referenced by SmbTraceStart(), and SmbTraceStop(). |
|
Definition at line 340 of file smbtrsup.c. Referenced by SmbTraceStart(), and SmbTraceStop(). |
|
Definition at line 334 of file smbtrsup.c. |