3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: services/fs/np/mount.c
6 * PURPOSE: Named pipe filesystem
7 * PROGRAMMER: David Welch <welch@cwcom.net>
10 /* INCLUDES ******************************************************************/
12 #include <ddk/ntddk.h>
18 NPAGED_LOOKASIDE_LIST NpfsPipeDataLookasideList;
20 /* FUNCTIONS *****************************************************************/
23 DriverEntry(PDRIVER_OBJECT DriverObject,
24 PUNICODE_STRING RegistryPath)
26 PNPFS_DEVICE_EXTENSION DeviceExtension;
27 PDEVICE_OBJECT DeviceObject;
28 UNICODE_STRING DeviceName;
31 DbgPrint("Named Pipe FSD 0.0.2\n");
33 DriverObject->MajorFunction[IRP_MJ_CREATE] = NpfsCreate;
34 DriverObject->MajorFunction[IRP_MJ_CREATE_NAMED_PIPE] =
36 DriverObject->MajorFunction[IRP_MJ_CLOSE] = NpfsClose;
37 DriverObject->MajorFunction[IRP_MJ_READ] = NpfsRead;
38 DriverObject->MajorFunction[IRP_MJ_WRITE] = NpfsWrite;
39 DriverObject->MajorFunction[IRP_MJ_QUERY_INFORMATION] =
41 DriverObject->MajorFunction[IRP_MJ_SET_INFORMATION] =
43 DriverObject->MajorFunction[IRP_MJ_QUERY_VOLUME_INFORMATION] =
44 NpfsQueryVolumeInformation;
45 // DriverObject->MajorFunction[IRP_MJ_CLEANUP] = NpfsCleanup;
46 // DriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = NpfsFlushBuffers;
47 // DriverObject->MajorFunction[IRP_MJ_DIRECTORY_CONTROL] =
48 // NpfsDirectoryControl;
49 DriverObject->MajorFunction[IRP_MJ_FILE_SYSTEM_CONTROL] =
50 NpfsFileSystemControl;
51 // DriverObject->MajorFunction[IRP_MJ_QUERY_SECURITY] =
53 // DriverObject->MajorFunction[IRP_MJ_SET_SECURITY] =
56 DriverObject->DriverUnload = NULL;
58 RtlInitUnicodeString(&DeviceName, L"\\Device\\NamedPipe");
59 Status = IoCreateDevice(DriverObject,
60 sizeof(NPFS_DEVICE_EXTENSION),
62 FILE_DEVICE_NAMED_PIPE,
66 if (!NT_SUCCESS(Status))
68 DPRINT("Failed to create named pipe device! (Status %x)\n", Status);
72 /* initialize the device object */
73 DeviceObject->Flags = DO_DIRECT_IO;
75 /* initialize the device extension */
76 DeviceExtension = DeviceObject->DeviceExtension;
77 InitializeListHead(&DeviceExtension->PipeListHead);
78 KeInitializeMutex(&DeviceExtension->PipeListLock,
81 ExInitializeNPagedLookasideList(
82 &NpfsPipeDataLookasideList,
86 sizeof(NPFS_PIPE_DATA),
87 TAG('N', 'P', 'D', 'A'),
90 return(STATUS_SUCCESS);