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
118typedef USHORT NODE_TYPE_CODE, *PNODE_TYPE_CODE;
119
120/* Data Queue States */
121typedef enum _NP_DATA_QUEUE_STATE
122{
123    ReadEntries = 0,
124    WriteEntries = 1,
125    Empty = 2
126} NP_DATA_QUEUE_STATE;
127
128/* Data Queue Entry Types */
129typedef enum _NP_DATA_QUEUE_ENTRY_TYPE
130{
131    Buffered = 0,
132    Unbuffered
133} NP_DATA_QUEUE_ENTRY_TYPE;
134
135/* An Input or Output Data Queue. Each CCB has two of these. */
136typedef struct _NP_DATA_QUEUE
137{
138    LIST_ENTRY Queue;
139    ULONG QueueState;
140    ULONG BytesInQueue;
141    ULONG EntriesInQueue;
142    ULONG QuotaUsed;
143    ULONG ByteOffset;
144    ULONG Quota;
145} NP_DATA_QUEUE, *PNP_DATA_QUEUE;
146
147/* The Entries that go into the Queue */
148typedef struct _NP_DATA_QUEUE_ENTRY
149{
150    LIST_ENTRY QueueEntry;
151    ULONG DataEntryType;
152    PIRP Irp;
153    ULONG QuotaInEntry;
154    PSECURITY_CLIENT_CONTEXT ClientSecurityContext;
155    ULONG DataSize;
156} NP_DATA_QUEUE_ENTRY, *PNP_DATA_QUEUE_ENTRY;
157
158/* A Wait Queue. Only the VCB has one of these. */
159typedef struct _NP_WAIT_QUEUE
160{
161    LIST_ENTRY WaitList;
162    KSPIN_LOCK WaitLock;
163} NP_WAIT_QUEUE, *PNP_WAIT_QUEUE;
164
165/* The Entries in the Queue above, one for each Waiter. */
166typedef struct _NP_WAIT_QUEUE_ENTRY
167{
168    PIRP Irp;
169    KDPC Dpc;
170    KTIMER Timer;
171    PNP_WAIT_QUEUE WaitQueue;
172    UNICODE_STRING AliasName;
173    PFILE_OBJECT FileObject;
174} NP_WAIT_QUEUE_ENTRY, *PNP_WAIT_QUEUE_ENTRY;
175
176/* The event buffer in the NonPaged CCB */
177typedef struct _NP_EVENT_BUFFER
178{
179    PKEVENT Event;
180} NP_EVENT_BUFFER, *PNP_EVENT_BUFFER;
181
182/* The CCB for the Root DCB */
183typedef struct _NP_ROOT_DCB_CCB
184{
185    NODE_TYPE_CODE NodeType;
186    PVOID Unknown;
187    ULONG Unknown2;
188} NP_ROOT_DCB_CCB, *PNP_ROOT_DCB_FCB;
189
190/* The header that both FCB and DCB share */
191typedef struct _NP_CB_HEADER
192{
193    NODE_TYPE_CODE NodeType;
194    LIST_ENTRY DcbEntry;
195    PVOID ParentDcb;
196    ULONG CurrentInstances;
197    ULONG ServerOpenCount;
198    PSECURITY_DESCRIPTOR SecurityDescriptor;
199} NP_CB_HEADER, *PNP_CB_HEADER;
200
201/* The footer that both FCB and DCB share */
202typedef struct _NP_CB_FOOTER
203{
204    UNICODE_STRING FullName;
205    UNICODE_STRING ShortName;
206    UNICODE_PREFIX_TABLE_ENTRY PrefixTableEntry;
207} NP_CB_FOOTER;
208
209/* A Directory Control Block (DCB) */
210typedef struct _NP_DCB
211{
212    /* Common Header */
213    NP_CB_HEADER;
214
215    /* DCB-specific data */
216    LIST_ENTRY NotifyList;
217    LIST_ENTRY NotifyList2;
218    LIST_ENTRY FcbList;
219#ifndef _WIN64
220    ULONG Pad;
221#endif
222
223    /* Common Footer */
224    NP_CB_FOOTER;
225} NP_DCB, *PNP_DCB;
226
227/* A File Control BLock (FCB) */
228typedef struct _NP_FCB
229{
230    /* Common Header */
231    NP_CB_HEADER;
232
233    /* FCB-specific fields */
234    ULONG MaximumInstances;
235    USHORT NamedPipeConfiguration;
236    USHORT NamedPipeType;
237    LARGE_INTEGER Timeout;
238    LIST_ENTRY CcbList;
239#ifdef _WIN64
240    PVOID Pad[2];
241#endif
242
243    /* Common Footer */
244    NP_CB_FOOTER;
245} NP_FCB, *PNP_FCB;
246
247C_ASSERT(FIELD_OFFSET(NP_FCB, PrefixTableEntry) == FIELD_OFFSET(NP_DCB, PrefixTableEntry));
248
249/* The nonpaged portion of the CCB */
250typedef struct _NP_NONPAGED_CCB
251{
252    NODE_TYPE_CODE NodeType;
253    PNP_EVENT_BUFFER EventBuffer[2];
254    ERESOURCE Lock;
255} NP_NONPAGED_CCB, *PNP_NONPAGED_CCB;
256
257/* A Client Control Block (CCB) */
258typedef struct _NP_CCB
259{
260    NODE_TYPE_CODE NodeType;
261    UCHAR NamedPipeState;
262    UCHAR ReadMode[2];
263    UCHAR CompletionMode[2];
264    SECURITY_QUALITY_OF_SERVICE ClientQos;
265    LIST_ENTRY CcbEntry;
266    PNP_FCB Fcb;
267    PFILE_OBJECT FileObject[2];
268    PEPROCESS Process;
269    PVOID ClientSession;
270    PNP_NONPAGED_CCB NonPagedCcb;
271    NP_DATA_QUEUE DataQueue[2];
272    PSECURITY_CLIENT_CONTEXT ClientContext;
273    LIST_ENTRY IrpList;
274} NP_CCB, *PNP_CCB;
275
276/* A Volume Control Block (VCB) */
277typedef struct _NP_VCB
278{
279    NODE_TYPE_CODE NodeType;
280    ULONG ReferenceCount;
281    PNP_DCB RootDcb;
282    UNICODE_PREFIX_TABLE PrefixTable;
283    ERESOURCE Lock;
284    RTL_GENERIC_TABLE EventTable;
285    NP_WAIT_QUEUE WaitQueue;
286} NP_VCB, *PNP_VCB;
287
288extern PNP_VCB NpVcb;
289
290/* Defines an alias */
291typedef struct _NPFS_ALIAS
292{
293    struct _NPFS_ALIAS *Next;
294    PUNICODE_STRING TargetName;
295    UNICODE_STRING Name;
296} NPFS_ALIAS, *PNPFS_ALIAS;
297
298/* Private structure used to enumerate the alias values */
299typedef struct _NPFS_QUERY_VALUE_CONTEXT
300{
301    BOOLEAN SizeOnly;
302    SIZE_T FullSize;
303    ULONG NumberOfAliases;
304    ULONG NumberOfEntries;
305    PNPFS_ALIAS CurrentAlias;
306    PUNICODE_STRING CurrentTargetName;
307    PWCHAR CurrentStringPointer;
308} NPFS_QUERY_VALUE_CONTEXT, *PNPFS_QUERY_VALUE_CONTEXT;
309
310extern PNPFS_ALIAS NpAliasList;
311extern PNPFS_ALIAS NpAliasListByLength[MAX_INDEXED_LENGTH + 1 - MIN_INDEXED_LENGTH];
312
313/* This structure is actually a user-mode structure and should go into a share header */
314typedef struct _NP_CLIENT_PROCESS
315{
316    PVOID Unknown;
317    PVOID Process;
318    USHORT DataLength;
319    WCHAR Buffer[17];
320} NP_CLIENT_PROCESS, *PNP_CLIENT_PROCESS;
321
322/* FUNCTIONS ******************************************************************/
323
324/* Functions to lock/unlock the global VCB lock */
325
326FORCEINLINE
327VOID
328NpAcquireSharedVcb(VOID)
329{
330    /* Acquire the lock in shared mode */
331    ExAcquireResourceSharedLite(&NpVcb->Lock, TRUE);
332}
333
334FORCEINLINE
335VOID
336NpAcquireExclusiveVcb(VOID)
337{
338    /* Acquire the lock in exclusive mode */
339    ExAcquireResourceExclusiveLite(&NpVcb->Lock, TRUE);
340}
341
342FORCEINLINE
343VOID
344NpReleaseVcb(VOID)
345{
346    /* Release the lock */
347    ExReleaseResourceLite(&NpVcb->Lock);
348}
349
350//
351// Function to process deferred IRPs outside the VCB lock but still within the
352// critical region
353//
354FORCEINLINE
355VOID
356NpCompleteDeferredIrps(IN PLIST_ENTRY DeferredList)
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);
370        IoCompleteRequest(Irp, IO_NAMED_PIPE_INCREMENT);
371
372        /* And now switch to the next one */
373        ThisEntry = NextEntry;
374    }
375}
376
377LONG
378NTAPI
379NpCompareAliasNames(
380    _In_ PCUNICODE_STRING String1,
381    _In_ PCUNICODE_STRING String2);
382
383BOOLEAN
384NTAPI
385NpDeleteEventTableEntry(IN PRTL_GENERIC_TABLE Table,
386                        IN PVOID Buffer);
387
388VOID
389NTAPI
390NpInitializeWaitQueue(IN PNP_WAIT_QUEUE WaitQueue);
391
392NTSTATUS
393NTAPI
394NpUninitializeDataQueue(IN PNP_DATA_QUEUE DataQueue);
395
396PLIST_ENTRY
397NTAPI
398NpGetNextRealDataQueueEntry(IN PNP_DATA_QUEUE DataQueue,
399                            IN PLIST_ENTRY List);
400
401PIRP
402NTAPI
403NpRemoveDataQueueEntry(IN PNP_DATA_QUEUE DataQueue,
404                       IN BOOLEAN Flag,
405                       IN PLIST_ENTRY List);
406
407NTSTATUS
408NTAPI
409NpAddDataQueueEntry(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,
417                    IN ULONG ByteOffset);
418
419VOID
420NTAPI
421NpCompleteStalledWrites(IN PNP_DATA_QUEUE DataQueue,
422                        IN PLIST_ENTRY List);
423
424NTSTATUS
425NTAPI
426NpInitializeDataQueue(IN PNP_DATA_QUEUE DataQueue,
427                      IN ULONG Quota);
428
429NTSTATUS
430NTAPI
431NpCreateCcb(IN PNP_FCB Fcb,
432            IN PFILE_OBJECT FileObject,
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
440NTSTATUS
441NTAPI
442NpCreateFcb(IN PNP_DCB Dcb,
443            IN PUNICODE_STRING PipeName,
444            IN ULONG MaximumInstances,
445            IN LARGE_INTEGER Timeout,
446            IN USHORT NamedPipeConfiguration,
447            IN USHORT NamedPipeType,
448            OUT PNP_FCB *NewFcb);
449
450NTSTATUS
451NTAPI
452NpCreateRootDcb(VOID);
453
454NTSTATUS
455NTAPI
456NpCreateRootDcbCcb(IN PNP_ROOT_DCB_FCB *NewRootCcb);
457
458VOID
459NTAPI
460NpInitializeVcb(VOID);
461
462VOID
463NTAPI
464NpDeleteCcb(IN PNP_CCB Ccb,
465            IN PLIST_ENTRY ListEntry);
466
467VOID
468NTAPI
469NpDeleteFcb(IN PNP_FCB Fcb,
470            IN PLIST_ENTRY ListEntry);
471
472NTSTATUS
473NTAPI
474NpFsdCreateNamedPipe(IN PDEVICE_OBJECT DeviceObject,
475                     IN PIRP Irp);
476
477NTSTATUS
478NTAPI
479NpFsdCreate(IN PDEVICE_OBJECT DeviceObject,
480            IN PIRP Irp);
481
482NTSTATUS
483NTAPI
484NpFsdClose(IN PDEVICE_OBJECT DeviceObject,
485                     IN PIRP Irp);
486
487NTSTATUS
488NTAPI
489NpFsdCleanup(IN PDEVICE_OBJECT DeviceObject,
490                    IN PIRP Irp);
491
492NTSTATUS
493NTAPI
494NpFsdFileSystemControl(IN PDEVICE_OBJECT DeviceObject,
495                     IN PIRP Irp);
496
497NTSTATUS
498NTAPI
499NpSetConnectedPipeState(IN PNP_CCB Ccb,
500                        IN PFILE_OBJECT FileObject,
501                        IN PLIST_ENTRY List);
502
503NTSTATUS
504NTAPI
505NpSetListeningPipeState(IN PNP_CCB Ccb,
506                        IN PIRP Irp,
507                        IN PLIST_ENTRY List);
508
509NTSTATUS
510NTAPI
511NpSetDisconnectedPipeState(IN PNP_CCB Ccb,
512                           IN PLIST_ENTRY List);
513
514NTSTATUS
515NTAPI
516NpSetClosingPipeState(IN PNP_CCB Ccb,
517                      IN PIRP Irp,
518                      IN ULONG NamedPipeEnd,
519                      IN PLIST_ENTRY List);
520
521VOID
522NTAPI
523NpFreeClientSecurityContext(IN PSECURITY_CLIENT_CONTEXT ClientContext);
524
525NTSTATUS
526NTAPI
527NpImpersonateClientContext(IN PNP_CCB Ccb);
528
529VOID
530NTAPI
531NpCopyClientContext(IN PNP_CCB Ccb,
532                    IN PNP_DATA_QUEUE_ENTRY DataQueueEntry);
533
534VOID
535NTAPI
536NpUninitializeSecurity(IN PNP_CCB Ccb);
537
538NTSTATUS
539NTAPI
540NpInitializeSecurity(IN PNP_CCB Ccb,
541                     IN PSECURITY_QUALITY_OF_SERVICE SecurityQos,
542                     IN PETHREAD Thread);
543
544NTSTATUS
545NTAPI
546NpGetClientSecurityContext(IN ULONG NamedPipeEnd,
547                           IN PNP_CCB Ccb,
548                           IN PETHREAD Thread,
549                           IN PSECURITY_CLIENT_CONTEXT *Context);
550
551VOID
552NTAPI
553NpSetFileObject(IN PFILE_OBJECT FileObject,
554                IN PVOID PrimaryContext,
555                IN PVOID Ccb,
556                IN ULONG NamedPipeEnd);
557
558NODE_TYPE_CODE
559NTAPI
560NpDecodeFileObject(IN PFILE_OBJECT FileObject,
561                   OUT PVOID *PrimaryContext OPTIONAL,
562                   OUT PNP_CCB *Ccb,
563                   OUT PULONG NamedPipeEnd OPTIONAL);
564
565PNP_FCB
566NTAPI
567NpFindPrefix(IN PUNICODE_STRING Name,
568             IN ULONG CaseInsensitiveIndex,
569             IN PUNICODE_STRING Prefix);
570
571NTSTATUS
572NTAPI
573NpFindRelativePrefix(IN PNP_DCB Dcb,
574                     IN PUNICODE_STRING Name,
575                     IN ULONG CaseInsensitiveIndex,
576                     IN PUNICODE_STRING Prefix,
577                     OUT PNP_FCB *FoundFcb);
578
579VOID
580NTAPI
581NpCheckForNotify(IN PNP_DCB Dcb,
582                 IN BOOLEAN SecondList,
583                 IN PLIST_ENTRY List);
584
585NTSTATUS
586NTAPI
587NpAddWaiter(IN PNP_WAIT_QUEUE WaitQueue,
588            IN LARGE_INTEGER WaitTime,
589            IN PIRP Irp,
590            IN PUNICODE_STRING AliasName);
591
592NTSTATUS
593NTAPI
594NpCancelWaiter(IN PNP_WAIT_QUEUE WaitQueue,
595               IN PUNICODE_STRING PipeName,
596               IN NTSTATUS Status,
597               IN PLIST_ENTRY ListEntry);
598
599
600IO_STATUS_BLOCK
601NTAPI
602NpReadDataQueue(IN PNP_DATA_QUEUE DataQueue,
603                IN BOOLEAN Peek,
604                IN BOOLEAN ReadOverflowOperation,
605                IN PVOID Buffer,
606                IN ULONG BufferSize,
607                IN ULONG Mode,
608                IN PNP_CCB Ccb,
609                IN PLIST_ENTRY List);
610
611
612NTSTATUS
613NTAPI
614NpWriteDataQueue(IN PNP_DATA_QUEUE WriteQueue,
615                 IN ULONG Mode,
616                 IN PVOID OutBuffer,
617                 IN ULONG OutBufferSize,
618                 IN ULONG PipeType,
619                 OUT PULONG BytesWritten,
620                 IN PNP_CCB Ccb,
621                 IN ULONG NamedPipeEnd,
622                 IN PETHREAD Thread,
623                 IN PLIST_ENTRY List);
624
625NTSTATUS
626NTAPI
627NpFsdRead(IN PDEVICE_OBJECT DeviceObject,
628          IN PIRP Irp);
629
630_Function_class_(FAST_IO_READ)
631_IRQL_requires_same_
632BOOLEAN
633NTAPI
634NpFastRead(
635    _In_ PFILE_OBJECT FileObject,
636    _In_ PLARGE_INTEGER FileOffset,
637    _In_ ULONG Length,
638    _In_ BOOLEAN Wait,
639    _In_ ULONG LockKey,
640    _Out_ PVOID Buffer,
641    _Out_ PIO_STATUS_BLOCK IoStatus,
642    _In_ PDEVICE_OBJECT DeviceObject);
643
644_Function_class_(FAST_IO_WRITE)
645_IRQL_requires_same_
646BOOLEAN
647NTAPI
648NpFastWrite(
649    _In_ PFILE_OBJECT FileObject,
650    _In_ PLARGE_INTEGER FileOffset,
651    _In_ ULONG Length,
652    _In_ BOOLEAN Wait,
653    _In_ ULONG LockKey,
654    _In_ PVOID Buffer,
655    _Out_ PIO_STATUS_BLOCK IoStatus,
656    _In_ PDEVICE_OBJECT DeviceObject);
657
658
659NTSTATUS
660NTAPI
661NpFsdWrite(IN PDEVICE_OBJECT DeviceObject,
662           IN PIRP Irp);
663
664NTSTATUS
665NTAPI
666NpFsdFlushBuffers(IN PDEVICE_OBJECT DeviceObject,
667                  IN PIRP Irp);
668
669NTSTATUS
670NTAPI
671NpFsdSetInformation(IN PDEVICE_OBJECT DeviceObject,
672                    IN PIRP Irp);
673
674NTSTATUS
675NTAPI
676NpFsdQueryInformation(IN PDEVICE_OBJECT DeviceObject,
677                     IN PIRP Irp);
678
679
680NTSTATUS
681NTAPI
682NpFsdQuerySecurityInfo(IN PDEVICE_OBJECT DeviceObject,
683                       IN PIRP Irp);
684
685NTSTATUS
686NTAPI
687NpFsdSetSecurityInfo(IN PDEVICE_OBJECT DeviceObject,
688                     IN PIRP Irp);
689
690NTSTATUS
691NTAPI
692NpFsdQueryVolumeInformation(IN PDEVICE_OBJECT DeviceObject,
693                            IN PIRP Irp);
694
695#endif /* _NPFS_PCH_ */
696