ReactOS  0.4.15-dev-1201-gb2cf5a4
tape.h File Reference
#include "scsi.h"
#include "class.h"
Include dependency graph for tape.h:

Go to the source code of this file.

Classes

struct  _TAPE_DATA
 
struct  _MODE_DEVICE_CONFIGURATION_PAGE
 
struct  _MODE_MEDIUM_PARTITION_PAGE
 
struct  _MODE_DATA_COMPRESSION_PAGE
 
struct  _MODE_MEDIUM_PART_PAGE
 
struct  _MODE_TAPE_MEDIA_INFORMATION
 
struct  _MODE_DEVICE_CONFIG_PAGE
 
struct  _MODE_DATA_COMPRESS_PAGE
 

Macros

#define MAXIMUM_TAPE_INQUIRY_DATA   252
 
#define DEVICE_EXTENSION_SIZE   sizeof(DEVICE_EXTENSION) + sizeof(TAPE_DATA)
 

Typedefs

typedef struct _TAPE_DATA TAPE_DATA
 
typedef struct _TAPE_DATAPTAPE_DATA
 
typedef struct _MODE_DEVICE_CONFIGURATION_PAGE MODE_DEVICE_CONFIGURATION_PAGE
 
typedef struct _MODE_DEVICE_CONFIGURATION_PAGEPMODE_DEVICE_CONFIGURATION_PAGE
 
typedef struct _MODE_MEDIUM_PARTITION_PAGE MODE_MEDIUM_PARTITION_PAGE
 
typedef struct _MODE_MEDIUM_PARTITION_PAGEPMODE_MEDIUM_PARTITION_PAGE
 
typedef struct _MODE_DATA_COMPRESSION_PAGE MODE_DATA_COMPRESSION_PAGE
 
typedef struct _MODE_DATA_COMPRESSION_PAGEPMODE_DATA_COMPRESSION_PAGE
 
typedef struct _MODE_MEDIUM_PART_PAGE MODE_MEDIUM_PART_PAGE
 
typedef struct _MODE_MEDIUM_PART_PAGEPMODE_MEDIUM_PART_PAGE
 
typedef struct _MODE_TAPE_MEDIA_INFORMATION MODE_TAPE_MEDIA_INFORMATION
 
typedef struct _MODE_TAPE_MEDIA_INFORMATIONPMODE_TAPE_MEDIA_INFORMATION
 
typedef struct _MODE_DEVICE_CONFIG_PAGE MODE_DEVICE_CONFIG_PAGE
 
typedef struct _MODE_DEVICE_CONFIG_PAGEPMODE_DEVICE_CONFIG_PAGE
 
typedef struct _MODE_DATA_COMPRESS_PAGE MODE_DATA_COMPRESS_PAGE
 
typedef struct _MODE_DATA_COMPRESS_PAGEPMODE_DATA_COMPRESS_PAGE
 

Functions

NTSTATUS DriverEntry (IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
 
NTSTATUS ScsiTapeInitialize (IN PDRIVER_OBJECT DriverObject)
 
NTSTATUS ScsiTapeCreate (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS ScsiTapeReadWrite (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS ScsiTapeDeviceControl (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeCreatePartition (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeErase (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
VOID TapeError (PDEVICE_OBJECT DeviceObject, PSCSI_REQUEST_BLOCK Srb, NTSTATUS *Status, BOOLEAN *Retry)
 
NTSTATUS TapeGetDriveParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeGetMediaParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeGetPosition (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeGetStatus (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapePrepare (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeReadWrite (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeSetDriveParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeSetMediaParameters (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
NTSTATUS TapeSetPosition (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 
BOOLEAN TapeVerifyInquiry (IN PSCSI_INQUIRY_DATA LunInfo)
 
NTSTATUS TapeWriteMarks (IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
 

Macro Definition Documentation

◆ DEVICE_EXTENSION_SIZE

#define DEVICE_EXTENSION_SIZE   sizeof(DEVICE_EXTENSION) + sizeof(TAPE_DATA)

Definition at line 48 of file tape.h.

◆ MAXIMUM_TAPE_INQUIRY_DATA

#define MAXIMUM_TAPE_INQUIRY_DATA   252

Definition at line 35 of file tape.h.

Typedef Documentation

◆ MODE_DATA_COMPRESS_PAGE

◆ MODE_DATA_COMPRESSION_PAGE

◆ MODE_DEVICE_CONFIG_PAGE

◆ MODE_DEVICE_CONFIGURATION_PAGE

◆ MODE_MEDIUM_PART_PAGE

◆ MODE_MEDIUM_PARTITION_PAGE

◆ MODE_TAPE_MEDIA_INFORMATION

◆ PMODE_DATA_COMPRESS_PAGE

◆ PMODE_DATA_COMPRESSION_PAGE

◆ PMODE_DEVICE_CONFIG_PAGE

◆ PMODE_DEVICE_CONFIGURATION_PAGE

◆ PMODE_MEDIUM_PART_PAGE

◆ PMODE_MEDIUM_PARTITION_PAGE

◆ PMODE_TAPE_MEDIA_INFORMATION

◆ PTAPE_DATA

◆ TAPE_DATA

Function Documentation

◆ DriverEntry()

NTSTATUS DriverEntry ( IN PDRIVER_OBJECT  DriverObject,
IN PUNICODE_STRING  RegistryPath 
)

Definition at line 367 of file beep.c.

369 {
370  PDEVICE_EXTENSION DeviceExtension;
372  UNICODE_STRING DeviceName = RTL_CONSTANT_STRING(L"\\Device\\Beep");
374 
376 
377  /* Create the device */
379  sizeof(DEVICE_EXTENSION),
380  &DeviceName,
382  0,
383  FALSE,
384  &DeviceObject);
385  if (!NT_SUCCESS(Status)) return Status;
386 
387  /* Make it use buffered I/O */
388  DeviceObject->Flags |= DO_BUFFERED_IO;
389 
390  /* Setup the Driver Object */
397 
398  /* Set up device extension */
399  DeviceExtension = DeviceObject->DeviceExtension;
400  DeviceExtension->ReferenceCount = 0;
401  DeviceExtension->TimerActive = FALSE;
403  KeInitializeTimer(&DeviceExtension->Timer);
404  ExInitializeFastMutex(&DeviceExtension->Mutex);
405 
406  /* Page the entire driver */
408  return STATUS_SUCCESS;
409 }
DRIVER_DISPATCH BeepClose
Definition: beep.c:78
FORCEINLINE VOID IoInitializeDpcRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIO_DPC_ROUTINE DpcRoutine)
Definition: iofuncs.h:2836
DRIVER_STARTIO BeepStartIo
Definition: beep.c:295
#define IRP_MJ_CREATE
Definition: rdpdr.c:44
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
LONG NTSTATUS
Definition: precomp.h:26
WCHAR DeviceName[]
Definition: adapter.cpp:21
#define FILE_DEVICE_BEEP
Definition: winioctl.h:106
DRIVER_DISPATCH BeepDeviceControl
Definition: beep.c:206
NTSTATUS NTAPI DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING RegistryPath)
Definition: beep.c:367
#define FALSE
Definition: types.h:117
static PDRIVER_OBJECT DriverObject
Definition: template.c:42
VOID NTAPI KeInitializeTimer(OUT PKTIMER Timer)
Definition: timerobj.c:233
DRIVER_DISPATCH BeepCreate
Definition: beep.c:52
_In_z_ PWSTR RegistryPath
Definition: classp.h:1930
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define DO_BUFFERED_IO
Definition: env_spec_w32.h:394
FORCEINLINE VOID ExInitializeFastMutex(_Out_ PFAST_MUTEX FastMutex)
Definition: exfuncs.h:274
PVOID NTAPI MmPageEntireDriver(IN PVOID AddressWithinSection)
Definition: sysldr.c:3385
IO_DPC_ROUTINE * PIO_DPC_ROUTINE
Definition: iotypes.h:2826
VOID NTAPI BeepDPC(IN PKDPC Dpc, IN PDEVICE_OBJECT DeviceObject, IN PVOID SystemArgument1, IN PVOID SystemArgument2)
Definition: beep.c:34
#define IRP_MJ_CLOSE
Definition: rdpdr.c:45
Status
Definition: gdiplustypes.h:24
static const WCHAR L[]
Definition: oid.c:1250
PDRIVER_UNLOAD DriverUnload
Definition: iotypes.h:2268
DRIVER_DISPATCH BeepCleanup
Definition: beep.c:145
FAST_MUTEX Mutex
Definition: beep.c:24
_In_ PDEVICE_OBJECT DeviceObject
Definition: iotypes.h:2464
DRIVER_UNLOAD BeepUnload
Definition: beep.c:268
#define IRP_MJ_CLEANUP
PDRIVER_DISPATCH MajorFunction[IRP_MJ_MAXIMUM_FUNCTION+1]
Definition: iotypes.h:2269
NTSTATUS NTAPI IoCreateDevice(IN PDRIVER_OBJECT DriverObject, IN ULONG DeviceExtensionSize, IN PUNICODE_STRING DeviceName, IN DEVICE_TYPE DeviceType, IN ULONG DeviceCharacteristics, IN BOOLEAN Exclusive, OUT PDEVICE_OBJECT *DeviceObject)
Definition: device.c:1031
PDRIVER_STARTIO DriverStartIo
Definition: iotypes.h:2267
return STATUS_SUCCESS
Definition: btrfs.c:3014
#define IRP_MJ_DEVICE_CONTROL
Definition: rdpdr.c:52
#define RTL_CONSTANT_STRING(s)
Definition: tunneltest.c:14

◆ ScsiTapeCreate()

NTSTATUS ScsiTapeCreate ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ ScsiTapeDeviceControl()

NTSTATUS ScsiTapeDeviceControl ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ ScsiTapeInitialize()

NTSTATUS ScsiTapeInitialize ( IN PDRIVER_OBJECT  DriverObject)

◆ ScsiTapeReadWrite()

NTSTATUS ScsiTapeReadWrite ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapeCreatePartition()

NTSTATUS TapeCreatePartition ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Referenced by CreateTapePartition().

◆ TapeErase()

NTSTATUS TapeErase ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Referenced by EraseTape().

◆ TapeError()

VOID TapeError ( PDEVICE_OBJECT  DeviceObject,
PSCSI_REQUEST_BLOCK  Srb,
NTSTATUS Status,
BOOLEAN Retry 
)

◆ TapeGetDriveParameters()

NTSTATUS TapeGetDriveParameters ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapeGetMediaParameters()

NTSTATUS TapeGetMediaParameters ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapeGetPosition()

NTSTATUS TapeGetPosition ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Referenced by GetTapePosition().

◆ TapeGetStatus()

NTSTATUS TapeGetStatus ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapePrepare()

NTSTATUS TapePrepare ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Referenced by PrepareTape().

◆ TapeReadWrite()

NTSTATUS TapeReadWrite ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapeSetDriveParameters()

NTSTATUS TapeSetDriveParameters ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapeSetMediaParameters()

NTSTATUS TapeSetMediaParameters ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

◆ TapeSetPosition()

NTSTATUS TapeSetPosition ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Referenced by SetTapePosition().

◆ TapeVerifyInquiry()

BOOLEAN TapeVerifyInquiry ( IN PSCSI_INQUIRY_DATA  LunInfo)

◆ TapeWriteMarks()

NTSTATUS TapeWriteMarks ( IN PDEVICE_OBJECT  DeviceObject,
IN PIRP  Irp 
)

Referenced by WriteTapemark().