ReactOS  0.4.14-dev-554-g2f8d847
npfs.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Named Pipe FileSystem
3  * LICENSE: BSD - See COPYING.ARM in the top level directory
4  * FILE: drivers/filesystems/npfs/npfs.h
5  * PURPOSE: Named Pipe FileSystem Header
6  * PROGRAMMERS: ReactOS Portable Systems Group
7  */
8 
9 #ifndef _NPFS_PCH_
10 #define _NPFS_PCH_
11 
12 /* INCLUDES *******************************************************************/
13 
14 /* System Headers */
15 #include <ntifs.h>
16 #include <ndk/obfuncs.h>
17 #include <pseh/pseh2.h>
18 //#define UNIMPLEMENTED
19 //#define DPRINT1 DbgPrint
20 
21 #define NDEBUG
22 #include <debug.h>
23 #define TRACE(...) /* DPRINT1("%s: ", __FUNCTION__); DbgPrint(__VA_ARGS__) */
24 
25 /* Allow Microsoft Extensions */
26 #ifdef _MSC_VER
27 #pragma warning(disable:4201)
28 #pragma warning(disable:4214)
29 #pragma warning(disable:4100)
30 #endif
31 
32 #define MIN_INDEXED_LENGTH 5
33 #define MAX_INDEXED_LENGTH 9
34 
35 /* TYPEDEFS & DEFINES *********************************************************/
36 
37 //
38 // Pool Tags for NPFS (from pooltag.txt)
39 //
40 // Npf* -npfs.sys - Npfs Allocations
41 // NpFc - npfs.sys - CCB, client control block
42 // NpFf - npfs.sys - FCB, file control block
43 // NpFC - npfs.sys - ROOT_DCB CCB
44 // NpFD - npfs.sys - DCB, directory block
45 // NpFg - npfs.sys - Global storage
46 // NpFi - npfs.sys - NPFS client info buffer.
47 // NpFn - npfs.sys - Name block
48 // NpFq - npfs.sys - Query template buffer used for directory query
49 // NpFr - npfs.sys - DATA_ENTRY records(read / write buffers)
50 // NpFs - npfs.sys - Client security context
51 // NpFw - npfs.sys - Write block
52 // NpFW - npfs.sys - Write block
53 #define NPFS_CCB_TAG 'cFpN'
54 #define NPFS_ROOT_DCB_CCB_TAG 'CFpN'
55 #define NPFS_DCB_TAG 'DFpN'
56 #define NPFS_FCB_TAG 'fFpN'
57 #define NPFS_GLOBAL_TAG 'gFpN'
58 #define NPFS_CLIENT_INFO_TAG 'iFpN'
59 #define NPFS_NAME_BLOCK_TAG 'nFpN'
60 #define NPFS_QUERY_TEMPLATE_TAG 'qFpN'
61 #define NPFS_DATA_ENTRY_TAG 'rFpN'
62 #define NPFS_CLIENT_SEC_CTX_TAG 'sFpN'
63 #define NPFS_WAIT_BLOCK_TAG 'tFpN'
64 #define NPFS_WRITE_BLOCK_TAG 'wFpN'
65 
66 //
67 // NPFS bugchecking support
68 //
69 // We define the NpBugCheck macro which triggers a NPFS_FILE_SYSTEM bugcheck
70 // containing the source file ID number and the line where it was emitted, as
71 // described in the MSDN article "Bug Check 0x25: NPFS_FILE_SYSTEM".
72 //
73 // The bugcheck emits 4 ULONGs; the first one is made, in its high word, by
74 // the current source file ID and in its low word, by the line number; the
75 // three other ones are user-defined.
76 //
77 // In order to avoid redefinition of the same file ID in different source files,
78 // we gather all of them here, so that you will have to add (or remove) a new
79 // one as soon as you add (or remove) a source file from the NPFS driver code.
80 //
81 // To use the NpBugCheck macro in a source file, define at its beginning
82 // the constant NPFS_BUGCHECK_FILE_ID with one of the following file IDs,
83 // then use the bugcheck macro wherever you want.
84 //
85 #define NPFS_BUGCHECK_CLEANUP 0x0001
86 #define NPFS_BUGCHECK_CLOSE 0x0002
87 #define NPFS_BUGCHECK_CREATE 0x0003
88 #define NPFS_BUGCHECK_DATASUP 0x0004
89 #define NPFS_BUGCHECK_FILEINFO 0x0005
90 #define NPFS_BUGCHECK_FILEOBSUP 0x0006
91 #define NPFS_BUGCHECK_FLUSHBUF 0x0007
92 #define NPFS_BUGCHECK_FSCTRL 0x0008
93 #define NPFS_BUGCHECK_MAIN 0x0009
94 #define NPFS_BUGCHECK_PREFXSUP 0x000a
95 #define NPFS_BUGCHECK_READ 0x000b
96 #define NPFS_BUGCHECK_READSUP 0x000c
97 #define NPFS_BUGCHECK_SECURSUP 0x000d
98 #define NPFS_BUGCHECK_SEINFO 0x000e
99 #define NPFS_BUGCHECK_STATESUP 0x000f
100 #define NPFS_BUGCHECK_STRUCSUP 0x0010
101 #define NPFS_BUGCHECK_VOLINFO 0x0011
102 #define NPFS_BUGCHECK_WAITSUP 0x0012
103 #define NPFS_BUGCHECK_WRITE 0x0013
104 #define NPFS_BUGCHECK_WRITESUP 0x0014
105 
106 #define NpBugCheck(p1, p2, p3) \
107  KeBugCheckEx(NPFS_FILE_SYSTEM, \
108  (NPFS_BUGCHECK_FILE_ID << 16) | __LINE__, \
109  (p1), (p2), (p3))
110 
111 /* Node Type Codes for NPFS */
112 #define NPFS_NTC_VCB 1
113 #define NPFS_NTC_ROOT_DCB 2
114 #define NPFS_NTC_FCB 4
115 #define NPFS_NTC_CCB 6
116 #define NPFS_NTC_NONPAGED_CCB 7
117 #define NPFS_NTC_ROOT_DCB_CCB 8
119 
120 /* Data Queue States */
122 {
125  Empty = 2
127 
128 /* Data Queue Entry Types */
130 {
131  Buffered = 0,
134 
135 /* An Input or Output Data Queue. Each CCB has two of these. */
136 typedef struct _NP_DATA_QUEUE
137 {
146 
147 /* The Entries that go into the Queue */
148 typedef struct _NP_DATA_QUEUE_ENTRY
149 {
157 
158 /* A Wait Queue. Only the VCB has one of these. */
159 typedef struct _NP_WAIT_QUEUE
160 {
164 
165 /* The Entries in the Queue above, one for each Waiter. */
166 typedef struct _NP_WAIT_QUEUE_ENTRY
167 {
175 
176 /* The event buffer in the NonPaged CCB */
177 typedef struct _NP_EVENT_BUFFER
178 {
181 
182 /* The CCB for the Root DCB */
183 typedef struct _NP_ROOT_DCB_CCB
184 {
189 
190 /* The header that both FCB and DCB share */
191 typedef struct _NP_CB_HEADER
192 {
200 
201 /* The footer that both FCB and DCB share */
202 typedef struct _NP_CB_FOOTER
203 {
207 } NP_CB_FOOTER;
208 
209 /* A Directory Control Block (DCB) */
210 typedef struct _NP_DCB
211 {
212  /* Common Header */
214 
215  /* DCB-specific data */
219 #ifndef _WIN64
221 #endif
222 
223  /* Common Footer */
225 } NP_DCB, *PNP_DCB;
226 
227 /* A File Control BLock (FCB) */
228 typedef struct _NP_FCB
229 {
230  /* Common Header */
232 
233  /* FCB-specific fields */
239 #ifdef _WIN64
240  PVOID Pad[2];
241 #endif
242 
243  /* Common Footer */
245 } NP_FCB, *PNP_FCB;
246 
248 
249 /* The nonpaged portion of the CCB */
250 typedef struct _NP_NONPAGED_CCB
251 {
256 
257 /* A Client Control Block (CCB) */
258 typedef struct _NP_CCB
259 {
274 } NP_CCB, *PNP_CCB;
275 
276 /* A Volume Control Block (VCB) */
277 typedef struct _NP_VCB
278 {
286 } NP_VCB, *PNP_VCB;
287 
288 extern PNP_VCB NpVcb;
289 
290 /* Defines an alias */
291 typedef struct _NPFS_ALIAS
292 {
293  struct _NPFS_ALIAS *Next;
297 
298 /* Private structure used to enumerate the alias values */
300 {
309 
310 extern PNPFS_ALIAS NpAliasList;
312 
313 /* This structure is actually a user-mode structure and should go into a share header */
314 typedef struct _NP_CLIENT_PROCESS
315 {
321 
322 /* FUNCTIONS ******************************************************************/
323 
324 /* Functions to lock/unlock the global VCB lock */
325 
327 VOID
329 {
330  /* Acquire the lock in shared mode */
332 }
333 
335 VOID
337 {
338  /* Acquire the lock in exclusive mode */
340 }
341 
343 VOID
345 {
346  /* Release the lock */
348 }
349 
350 //
351 // Function to process deferred IRPs outside the VCB lock but still within the
352 // critical region
353 //
355 VOID
357 {
358  PLIST_ENTRY ThisEntry, NextEntry;
359  PIRP Irp;
360 
361  /* Loop the list */
362  ThisEntry = DeferredList->Flink;
363  while (ThisEntry != DeferredList)
364  {
365  /* Remember the next entry, but don't switch to it yet */
366  NextEntry = ThisEntry->Flink;
367 
368  /* Complete the IRP for this entry */
369  Irp = CONTAINING_RECORD(ThisEntry, IRP, Tail.Overlay.ListEntry);
371 
372  /* And now switch to the next one */
373  ThisEntry = NextEntry;
374  }
375 }
376 
377 LONG
378 NTAPI
380  _In_ PCUNICODE_STRING String1,
382 
383 BOOLEAN
384 NTAPI
386  IN PVOID Buffer);
387 
388 VOID
389 NTAPI
391 
392 NTSTATUS
393 NTAPI
395 
397 NTAPI
400 
401 PIRP
402 NTAPI
404  IN BOOLEAN Flag,
406 
407 NTSTATUS
408 NTAPI
409 NpAddDataQueueEntry(IN ULONG NamedPipeEnd,
410  IN PNP_CCB Ccb,
411  IN PNP_DATA_QUEUE DataQueue,
412  IN ULONG Who,
413  IN ULONG Type,
414  IN ULONG DataSize,
415  IN PIRP Irp,
416  IN PVOID Buffer,
418 
419 VOID
420 NTAPI
423 
424 NTSTATUS
425 NTAPI
427  IN ULONG Quota);
428 
429 NTSTATUS
430 NTAPI
433  IN UCHAR State,
434  IN UCHAR ReadMode,
435  IN UCHAR CompletionMode,
436  IN ULONG InQuota,
437  IN ULONG OutQuota,
438  OUT PNP_CCB *NewCcb);
439 
440 NTSTATUS
441 NTAPI
443  IN PUNICODE_STRING PipeName,
444  IN ULONG MaximumInstances,
446  IN USHORT NamedPipeConfiguration,
447  IN USHORT NamedPipeType,
448  OUT PNP_FCB *NewFcb);
449 
450 NTSTATUS
451 NTAPI
453 
454 NTSTATUS
455 NTAPI
457 
458 VOID
459 NTAPI
461 
462 VOID
463 NTAPI
465  IN PLIST_ENTRY ListEntry);
466 
467 VOID
468 NTAPI
470  IN PLIST_ENTRY ListEntry);
471 
472 NTSTATUS
473 NTAPI
475  IN PIRP Irp);
476 
477 NTSTATUS
478 NTAPI
480  IN PIRP Irp);
481 
482 NTSTATUS
483 NTAPI
485  IN PIRP Irp);
486 
487 NTSTATUS
488 NTAPI
490  IN PIRP Irp);
491 
492 NTSTATUS
493 NTAPI
495  IN PIRP Irp);
496 
497 NTSTATUS
498 NTAPI
502 
503 NTSTATUS
504 NTAPI
506  IN PIRP Irp,
508 
509 NTSTATUS
510 NTAPI
513 
514 NTSTATUS
515 NTAPI
517  IN PIRP Irp,
518  IN ULONG NamedPipeEnd,
520 
521 VOID
522 NTAPI
524 
525 NTSTATUS
526 NTAPI
528 
529 VOID
530 NTAPI
532  IN PNP_DATA_QUEUE_ENTRY DataQueueEntry);
533 
534 VOID
535 NTAPI
537 
538 NTSTATUS
539 NTAPI
541  IN PSECURITY_QUALITY_OF_SERVICE SecurityQos,
542  IN PETHREAD Thread);
543 
544 NTSTATUS
545 NTAPI
546 NpGetClientSecurityContext(IN ULONG NamedPipeEnd,
547  IN PNP_CCB Ccb,
550 
551 VOID
552 NTAPI
554  IN PVOID PrimaryContext,
555  IN PVOID Ccb,
556  IN ULONG NamedPipeEnd);
557 
559 NTAPI
561  OUT PVOID *PrimaryContext OPTIONAL,
562  OUT PNP_CCB *Ccb,
563  OUT PULONG NamedPipeEnd OPTIONAL);
564 
565 PNP_FCB
566 NTAPI
570 
571 NTSTATUS
572 NTAPI
577  OUT PNP_FCB *FoundFcb);
578 
579 VOID
580 NTAPI
582  IN BOOLEAN SecondList,
584 
585 NTSTATUS
586 NTAPI
587 NpAddWaiter(IN PNP_WAIT_QUEUE WaitQueue,
588  IN LARGE_INTEGER WaitTime,
589  IN PIRP Irp,
590  IN PUNICODE_STRING AliasName);
591 
592 NTSTATUS
593 NTAPI
595  IN PUNICODE_STRING PipeName,
597  IN PLIST_ENTRY ListEntry);
598 
599 
601 NTAPI
603  IN BOOLEAN Peek,
604  IN BOOLEAN ReadOverflowOperation,
605  IN PVOID Buffer,
607  IN ULONG Mode,
608  IN PNP_CCB Ccb,
610 
611 
612 NTSTATUS
613 NTAPI
615  IN ULONG Mode,
616  IN PVOID OutBuffer,
618  IN ULONG PipeType,
620  IN PNP_CCB Ccb,
621  IN ULONG NamedPipeEnd,
624 
625 NTSTATUS
626 NTAPI
628  IN PIRP Irp);
629 
630 _Function_class_(FAST_IO_READ)
632 BOOLEAN
633 NTAPI
634 NpFastRead(
637  _In_ ULONG Length,
638  _In_ BOOLEAN Wait,
643 
644 _Function_class_(FAST_IO_WRITE)
646 BOOLEAN
647 NTAPI
648 NpFastWrite(
651  _In_ ULONG Length,
652  _In_ BOOLEAN Wait,
654  _In_ PVOID Buffer,
657 
658 
659 NTSTATUS
660 NTAPI
662  IN PIRP Irp);
663 
664 NTSTATUS
665 NTAPI
667  IN PIRP Irp);
668 
669 NTSTATUS
670 NTAPI
672  IN PIRP Irp);
673 
674 NTSTATUS
675 NTAPI
677  IN PIRP Irp);
678 
679 
680 NTSTATUS
681 NTAPI
683  IN PIRP Irp);
684 
685 NTSTATUS
686 NTAPI
688  IN PIRP Irp);
689 
690 NTSTATUS
691 NTAPI
693  IN PIRP Irp);
694 
695 #endif /* _NPFS_PCH_ */
VOID NTAPI NpDeleteFcb(IN PNP_FCB Fcb, IN PLIST_ENTRY ListEntry)
Definition: strucsup.c:63
PNP_WAIT_QUEUE WaitQueue
Definition: npfs.h:171
PNPFS_ALIAS CurrentAlias
Definition: npfs.h:305
NTSTATUS NTAPI NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue, IN ULONG Mode, IN PVOID OutBuffer, IN ULONG OutBufferSize, IN ULONG PipeType, OUT PULONG BytesWritten, IN PNP_CCB Ccb, IN ULONG NamedPipeEnd, IN PETHREAD Thread, IN PLIST_ENTRY List)
Definition: writesup.c:20
#define _IRQL_requires_same_
Definition: no_sal2.h:652
#define IN
Definition: typedefs.h:38
NTSTATUS NTAPI NpFsdFlushBuffers(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: flushbuf.c:70
char * Pad(char *Str, char PadChar, ULONG Length)
Definition: main.cxx:29
struct _NP_DATA_QUEUE_ENTRY NP_DATA_QUEUE_ENTRY
NODE_TYPE_CODE NTAPI NpDecodeFileObject(IN PFILE_OBJECT FileObject, OUT PVOID *PrimaryContext OPTIONAL, OUT PNP_CCB *Ccb, OUT PULONG NamedPipeEnd OPTIONAL)
Definition: fileobsup.c:20
struct _NP_DATA_QUEUE_ENTRY * PNP_DATA_QUEUE_ENTRY
ASMGENDATA Table[]
Definition: genincdata.c:61
_Must_inspect_result_ _In_ PFILE_OBJECT _In_opt_ PLARGE_INTEGER _In_ ULONG _In_ FLT_IO_OPERATION_FLAGS _Out_opt_ PULONG BytesWritten
Definition: fltkernel.h:1293
#define TRUE
Definition: types.h:120
_In_ __drv_aliasesMem PSTRING Prefix
Definition: rtlfuncs.h:1631
PVOID ClientSession
Definition: npfs.h:269
_NP_DATA_QUEUE_ENTRY_TYPE
Definition: npfs.h:129
FORCEINLINE VOID NpAcquireSharedVcb(VOID)
Definition: npfs.h:328
NTSTATUS NTAPI NpGetClientSecurityContext(IN ULONG NamedPipeEnd, IN PNP_CCB Ccb, IN PETHREAD Thread, IN PSECURITY_CLIENT_CONTEXT *Context)
Definition: secursup.c:129
NP_WAIT_QUEUE WaitQueue
Definition: npfs.h:285
Type
Definition: Type.h:6
NODE_TYPE_CODE NodeType
Definition: npfs.h:260
PNP_EVENT_BUFFER EventBuffer[2]
Definition: npfs.h:253
_In_ ULONG Mode
Definition: hubbusif.h:303
UCHAR ReadMode[2]
Definition: npfs.h:262
struct _NP_CB_FOOTER NP_CB_FOOTER
struct _NP_NONPAGED_CCB * PNP_NONPAGED_CCB
PNP_NONPAGED_CCB NonPagedCcb
Definition: npfs.h:270
_In_ PIRP Irp
Definition: csq.h:116
PNPFS_ALIAS NpAliasListByLength[MAX_INDEXED_LENGTH+1 - MIN_INDEXED_LENGTH]
Definition: main.c:21
PNPFS_ALIAS NpAliasList
Definition: main.c:20
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN Wait
Definition: npfs.h:636
NTSTATUS NTAPI NpFsdQueryInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fileinfo.c:462
#define MAX_INDEXED_LENGTH
Definition: npfs.h:33
_In_ __drv_aliasesMem PSTRING _Out_ PPREFIX_TABLE_ENTRY PrefixTableEntry
Definition: rtlfuncs.h:1631
LIST_ENTRY QueueEntry
Definition: npfs.h:150
PFILE_OBJECT FileObject
Definition: npfs.h:173
LONG NTSTATUS
Definition: precomp.h:26
NTSTATUS NTAPI NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb)
Definition: strucsup.c:149
NTSTATUS NTAPI NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: create.c:791
NTSTATUS NTAPI NpUninitializeDataQueue(IN PNP_DATA_QUEUE DataQueue)
Definition: datasup.c:20
_In_ PIRP _In_ ULONG _In_ ULONG _In_ ULONG _In_ ULONG OutBufferSize
Definition: classpnp.h:429
NTSTATUS NTAPI NpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: volinfo.c:185
NTSTATUS NTAPI NpSetConnectedPipeState(IN PNP_CCB Ccb, IN PFILE_OBJECT FileObject, IN PLIST_ENTRY List)
Definition: statesup.c:39
Definition: npfs.h:277
PNP_FCB NTAPI NpFindPrefix(IN PUNICODE_STRING Name, IN ULONG CaseInsensitiveIndex, IN PUNICODE_STRING Prefix)
Definition: prefxsup.c:20
UNICODE_STRING AliasName
Definition: npfs.h:172
LIST_ENTRY DcbEntry
Definition: npfs.h:194
NODE_TYPE_CODE NodeType
Definition: npfs.h:193
ULONG Quota
Definition: npfs.h:144
LIST_ENTRY NotifyList2
Definition: npfs.h:217
IRP
Definition: iotypes.h:2463
uint16_t * PWCHAR
Definition: typedefs.h:54
Definition: npfs.h:131
VOID NTAPI NpSetFileObject(IN PFILE_OBJECT FileObject, IN PVOID PrimaryContext, IN PVOID Ccb, IN ULONG NamedPipeEnd)
Definition: fileobsup.c:62
NTSTATUS NTAPI NpFsdCreate(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: create.c:360
struct _NP_WAIT_QUEUE_ENTRY * PNP_WAIT_QUEUE_ENTRY
USHORT NODE_TYPE_CODE
Definition: npfs.h:118
struct _NPFS_ALIAS * PNPFS_ALIAS
PSECURITY_DESCRIPTOR SecurityDescriptor
Definition: npfs.h:198
struct _NPFS_ALIAS NPFS_ALIAS
struct _NP_EVENT_BUFFER * PNP_EVENT_BUFFER
struct _NP_DCB * PNP_DCB
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK IoStatus
Definition: npfs.h:636
struct _NP_NONPAGED_CCB NP_NONPAGED_CCB
PNP_FCB Fcb
Definition: npfs.h:266
VOID NTAPI NpCopyClientContext(IN PNP_CCB Ccb, IN PNP_DATA_QUEUE_ENTRY DataQueueEntry)
Definition: secursup.c:58
ULONG EntriesInQueue
Definition: npfs.h:141
struct _NP_DATA_QUEUE * PNP_DATA_QUEUE
PVOID Unknown
Definition: npfs.h:186
BOOLEAN NTAPI ExAcquireResourceExclusiveLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:770
LIST_ENTRY CcbList
Definition: npfs.h:238
NP_CB_HEADER
Definition: npfs.h:213
struct _NP_CLIENT_PROCESS * PNP_CLIENT_PROCESS
Definition: npfs.h:210
ULONG ServerOpenCount
Definition: npfs.h:197
Definition: npfs.h:228
struct _NP_DCB NP_DCB
struct _NP_WAIT_QUEUE NP_WAIT_QUEUE
Definition: npfs.h:258
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
LONG NTAPI NpCompareAliasNames(_In_ PCUNICODE_STRING String1, _In_ PCUNICODE_STRING String2)
Definition: main.c:152
VOID NTAPI NpFreeClientSecurityContext(IN PSECURITY_CLIENT_CONTEXT ClientContext)
Definition: secursup.c:40
PFILE_OBJECT FileObject[2]
Definition: npfs.h:267
NODE_TYPE_CODE NodeType
Definition: npfs.h:279
long LONG
Definition: pedump.c:60
struct _NP_FCB NP_FCB
Definition: rtltypes.h:617
NTSTATUS NTAPI NpFindRelativePrefix(IN PNP_DCB Dcb, IN PUNICODE_STRING Name, IN ULONG CaseInsensitiveIndex, IN PUNICODE_STRING Prefix, OUT PNP_FCB *FoundFcb)
Definition: prefxsup.c:51
PVOID ParentDcb
Definition: npfs.h:195
UCHAR NamedPipeState
Definition: npfs.h:261
LIST_ENTRY IrpList
Definition: npfs.h:273
unsigned char BOOLEAN
ULONG ReferenceCount
Definition: npfs.h:280
#define FORCEINLINE
Definition: ntbasedef.h:221
#define _Out_
Definition: no_sal2.h:323
#define IoCompleteRequest
Definition: irp.c:1240
ULONG QuotaUsed
Definition: npfs.h:142
USHORT NamedPipeConfiguration
Definition: npfs.h:235
Definition: bufpool.h:45
NP_CB_FOOTER
Definition: npfs.h:244
KTIMER Timer
Definition: npfs.h:170
USHORT DataLength
Definition: npfs.h:318
_Inout_ PFILE_OBJECT FileObject
Definition: cdprocs.h:593
enum _NP_DATA_QUEUE_STATE NP_DATA_QUEUE_STATE
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560
enum _NP_DATA_QUEUE_ENTRY_TYPE NP_DATA_QUEUE_ENTRY_TYPE
ULONG QueueState
Definition: npfs.h:139
BOOLEAN NTAPI NpDeleteEventTableEntry(IN PRTL_GENERIC_TABLE Table, IN PVOID Buffer)
Definition: strucsup.c:52
struct _LIST_ENTRY * Flink
Definition: typedefs.h:119
USHORT * PNODE_TYPE_CODE
Definition: npfs.h:118
VOID NTAPI NpInitializeWaitQueue(IN PNP_WAIT_QUEUE WaitQueue)
Definition: waitsup.c:96
ULONG DataSize
Definition: npfs.h:155
ULONG BytesInQueue
Definition: npfs.h:140
struct _NP_WAIT_QUEUE_ENTRY NP_WAIT_QUEUE_ENTRY
LIST_ENTRY List
Definition: psmgr.c:57
__wchar_t WCHAR
Definition: xmlstorage.h:180
struct _NP_CB_HEADER * PNP_CB_HEADER
struct _NP_ROOT_DCB_CCB * PNP_ROOT_DCB_FCB
struct _NP_VCB NP_VCB
struct _NP_CB_HEADER NP_CB_HEADER
_In_ PVOID ClientContext
Definition: netioddk.h:55
ULONG MaximumInstances
Definition: npfs.h:234
IO_STATUS_BLOCK NTAPI NpReadDataQueue(IN PNP_DATA_QUEUE DataQueue, IN BOOLEAN Peek, IN BOOLEAN ReadOverflowOperation, IN PVOID Buffer, IN ULONG BufferSize, IN ULONG Mode, IN PNP_CCB Ccb, IN PLIST_ENTRY List)
Definition: readsup.c:20
NTSTATUS NTAPI NpAddWaiter(IN PNP_WAIT_QUEUE WaitQueue, IN LARGE_INTEGER WaitTime, IN PIRP Irp, IN PUNICODE_STRING AliasName)
Definition: waitsup.c:221
ULONG Pad
Definition: npfs.h:220
struct _NP_EVENT_BUFFER NP_EVENT_BUFFER
Definition: xml2sdb.h:79
NTSTATUS NTAPI NpFsdQuerySecurityInfo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: seinfo.c:100
#define BufferSize
Definition: classpnp.h:419
_In_opt_ PFILE_OBJECT _In_opt_ PETHREAD Thread
Definition: fltkernel.h:2653
NTSTATUS NTAPI NpImpersonateClientContext(IN PNP_CCB Ccb)
Definition: secursup.c:20
Definition: npfs.h:166
SECURITY_QUALITY_OF_SERVICE ClientQos
Definition: npfs.h:264
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
PVOID Unknown
Definition: npfs.h:316
VOID FASTCALL ExReleaseResourceLite(IN PERESOURCE Resource)
Definition: resource.c:1817
* PFILE_OBJECT
Definition: iotypes.h:1955
KSPIN_LOCK WaitLock
Definition: npfs.h:162
ULONG ByteOffset
Definition: npfs.h:143
PNP_VCB NpVcb
Definition: strucsup.c:19
#define IO_NAMED_PIPE_INCREMENT
Definition: iotypes.h:572
struct _NP_CCB NP_CCB
NTSTATUS NTAPI NpSetListeningPipeState(IN PNP_CCB Ccb, IN PIRP Irp, IN PLIST_ENTRY List)
Definition: statesup.c:188
struct _NPFS_ALIAS * Next
Definition: npfs.h:293
NTSTATUS NTAPI NpCreateFcb(IN PNP_DCB Dcb, IN PUNICODE_STRING PipeName, IN ULONG MaximumInstances, IN LARGE_INTEGER Timeout, IN USHORT NamedPipeConfiguration, IN USHORT NamedPipeType, OUT PNP_FCB *NewFcb)
Definition: strucsup.c:210
NP_CB_HEADER
Definition: npfs.h:231
VOID NTAPI NpCheckForNotify(IN PNP_DCB Dcb, IN BOOLEAN SecondList, IN PLIST_ENTRY List)
Definition: create.c:20
NTSTATUS NTAPI NpInitializeDataQueue(IN PNP_DATA_QUEUE DataQueue, IN ULONG Quota)
Definition: datasup.c:32
unsigned char UCHAR
Definition: xmlstorage.h:181
NTSTATUS NTAPI NpCreateRootDcb(VOID)
Definition: strucsup.c:165
PIRP Irp
Definition: npfs.h:168
Definition: ketypes.h:687
Definition: npfs.h:148
PLIST_ENTRY NTAPI NpGetNextRealDataQueueEntry(IN PNP_DATA_QUEUE DataQueue, IN PLIST_ENTRY List)
Definition: datasup.c:174
RTL_GENERIC_TABLE EventTable
Definition: npfs.h:284
NTSTATUS NTAPI NpFsdSetInformation(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fileinfo.c:114
NTSTATUS NTAPI NpFsdWrite(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: write.c:175
PUNICODE_STRING CurrentTargetName
Definition: npfs.h:306
static VOID Peek(PUCHAR ReadDataPort, PVOID Buffer, ULONG Length)
Definition: hardware.c:228
PEPROCESS Process
Definition: npfs.h:268
_Inout_ PFILE_OBJECT _In_ TYPE_OF_OPEN PFCB _In_opt_ PCCB Ccb
Definition: cdprocs.h:593
Definition: typedefs.h:117
ULONG CurrentInstances
Definition: npfs.h:196
VOID NTAPI NpInitializeVcb(VOID)
Definition: strucsup.c:130
LIST_ENTRY CcbEntry
Definition: npfs.h:265
VOID NTAPI NpCompleteStalledWrites(IN PNP_DATA_QUEUE DataQueue, IN PLIST_ENTRY List)
Definition: datasup.c:49
UNICODE_STRING Name
Definition: npfs.h:295
VOID NTAPI NpUninitializeSecurity(IN PNP_CCB Ccb)
Definition: secursup.c:72
ERESOURCE Lock
Definition: npfs.h:283
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG LockKey
Definition: npfs.h:636
NTSTATUS NTAPI NpInitializeSecurity(IN PNP_CCB Ccb, IN PSECURITY_QUALITY_OF_SERVICE SecurityQos, IN PETHREAD Thread)
Definition: secursup.c:82
NTSTATUS NTAPI NpCreateCcb(IN PNP_FCB Fcb, IN PFILE_OBJECT FileObject, IN UCHAR State, IN UCHAR ReadMode, IN UCHAR CompletionMode, IN ULONG InQuota, IN ULONG OutQuota, OUT PNP_CCB *NewCcb)
Definition: strucsup.c:304
Status
Definition: gdiplustypes.h:24
struct _NP_DATA_QUEUE NP_DATA_QUEUE
struct _NPFS_QUERY_VALUE_CONTEXT * PNPFS_QUERY_VALUE_CONTEXT
#define _In_
Definition: no_sal2.h:204
ULONG_PTR SIZE_T
Definition: typedefs.h:78
NTSTATUS NTAPI NpFsdSetSecurityInfo(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: seinfo.c:125
UNICODE_PREFIX_TABLE PrefixTable
Definition: npfs.h:282
PSECURITY_CLIENT_CONTEXT ClientSecurityContext
Definition: npfs.h:154
C_ASSERT(FIELD_OFFSET(NP_FCB, PrefixTableEntry)==FIELD_OFFSET(NP_DCB, PrefixTableEntry))
static ULONG Timeout
Definition: ping.c:61
PKEVENT Event
Definition: npfs.h:179
NTSTATUS NTAPI NpSetDisconnectedPipeState(IN PNP_CCB Ccb, IN PLIST_ENTRY List)
Definition: statesup.c:77
LIST_ENTRY Queue
Definition: npfs.h:138
VOID NTAPI NpDeleteCcb(IN PNP_CCB Ccb, IN PLIST_ENTRY ListEntry)
Definition: strucsup.c:92
ULONG Unknown2
Definition: npfs.h:187
unsigned short USHORT
Definition: pedump.c:61
FORCEINLINE VOID NpReleaseVcb(VOID)
Definition: npfs.h:344
NODE_TYPE_CODE NodeType
Definition: npfs.h:252
#define MIN_INDEXED_LENGTH
Definition: npfs.h:32
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
NTSTATUS NTAPI NpFsdRead(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: read.c:159
ULONG DataEntryType
Definition: npfs.h:151
PUNICODE_STRING TargetName
Definition: npfs.h:294
NP_CB_FOOTER
Definition: npfs.h:224
unsigned int * PULONG
Definition: retypes.h:1
LIST_ENTRY WaitList
Definition: npfs.h:161
struct _NP_WAIT_QUEUE * PNP_WAIT_QUEUE
struct _NP_VCB * PNP_VCB
struct _NP_CLIENT_PROCESS NP_CLIENT_PROCESS
NTSTATUS NTAPI NpSetClosingPipeState(IN PNP_CCB Ccb, IN PIRP Irp, IN ULONG NamedPipeEnd, IN PLIST_ENTRY List)
Definition: statesup.c:245
BOOLEAN NTAPI ExAcquireResourceSharedLite(IN PERESOURCE Resource, IN BOOLEAN Wait)
Definition: resource.c:885
PSECURITY_CLIENT_CONTEXT ClientContext
Definition: npfs.h:272
_In_ const STRING * String2
Definition: rtlfuncs.h:2261
struct _NPFS_QUERY_VALUE_CONTEXT NPFS_QUERY_VALUE_CONTEXT
PNP_DCB RootDcb
Definition: npfs.h:281
LARGE_INTEGER Timeout
Definition: npfs.h:237
KDPC Dpc
Definition: npfs.h:169
#define OUT
Definition: typedefs.h:39
_Function_class_(FAST_IO_READ) _IRQL_requires_same_ BOOLEAN NTAPI NpFastRead(_In_ PFILE_OBJECT FileObject
NP_DATA_QUEUE DataQueue[2]
Definition: npfs.h:271
NTSTATUS NTAPI NpAddDataQueueEntry(IN ULONG NamedPipeEnd, IN PNP_CCB Ccb, IN PNP_DATA_QUEUE DataQueue, IN ULONG Who, IN ULONG Type, IN ULONG DataSize, IN PIRP Irp, IN PVOID Buffer, IN ULONG ByteOffset)
Definition: datasup.c:295
ULONG ERESOURCE
Definition: env_spec_w32.h:594
unsigned int ULONG
Definition: retypes.h:1
NTSTATUS NTAPI NpCancelWaiter(IN PNP_WAIT_QUEUE WaitQueue, IN PUNICODE_STRING PipeName, IN NTSTATUS Status, IN PLIST_ENTRY ListEntry)
Definition: waitsup.c:120
NTSTATUS NTAPI NpFsdCleanup(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: cleanup.c:58
LIST_ENTRY FcbList
Definition: npfs.h:218
FORCEINLINE VOID NpAcquireExclusiveVcb(VOID)
Definition: npfs.h:336
UCHAR CompletionMode[2]
Definition: npfs.h:263
ERESOURCE Lock
Definition: npfs.h:254
USHORT NODE_TYPE_CODE
Definition: nodetype.h:22
NTSTATUS NTAPI NpFsdClose(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: close.c:59
NODE_TYPE_CODE NodeType
Definition: npfs.h:185
struct _NP_ROOT_DCB_CCB NP_ROOT_DCB_CCB
_In_ PFCB Fcb
Definition: cdprocs.h:151
USHORT NamedPipeType
Definition: npfs.h:236
_In_ PUNICODE_STRING _In_ ULONG CaseInsensitiveIndex
Definition: rtlfuncs.h:1682
_In_ PLARGE_INTEGER FileOffset
Definition: npfs.h:636
struct _NP_FCB * PNP_FCB
ULONG QuotaInEntry
Definition: npfs.h:153
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB * Dcb
Definition: create.c:4157
PVOID Process
Definition: npfs.h:317
FORCEINLINE VOID NpCompleteDeferredIrps(IN PLIST_ENTRY DeferredList)
Definition: npfs.h:356
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
Definition: ndis.h:4751
NTSTATUS NTAPI NpFsdFileSystemControl(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
Definition: fsctrl.c:857
PIRP NTAPI NpRemoveDataQueueEntry(IN PNP_DATA_QUEUE DataQueue, IN BOOLEAN Flag, IN PLIST_ENTRY List)
Definition: datasup.c:105
struct _NP_CCB * PNP_CCB
IN PDCB IN PCCB IN VBO IN OUT PULONG OUT PDIRENT OUT PBCB OUT PVBO ByteOffset
Definition: fatprocs.h:716
_In_ PLARGE_INTEGER _In_ ULONG _In_ BOOLEAN _In_ ULONG _Out_ PVOID _Out_ PIO_STATUS_BLOCK _In_ PDEVICE_OBJECT DeviceObject
Definition: npfs.h:636
_NP_DATA_QUEUE_STATE
Definition: npfs.h:121
Definition: npfs.h:125
PIRP Irp
Definition: npfs.h:152
LIST_ENTRY NotifyList
Definition: npfs.h:216
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
PWCHAR CurrentStringPointer
Definition: npfs.h:307