mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-04-30 02:37:49 +02:00
Moved DeviceCharacteristics, DeviceType and FileSystemAttributes to Enums\FileSystemInformation and updated names
This commit is contained in:
parent
6772c0c33e
commit
6170622714
8 changed files with 102 additions and 102 deletions
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
|
||||
namespace SMBLibrary
|
||||
{
|
||||
[Flags]
|
||||
public enum DeviceCharacteristics : uint
|
||||
{
|
||||
RemovableMedia = 0x0001, // FILE_REMOVABLE_MEDIA
|
||||
ReadOnlyDevice = 0x0002, // FILE_READ_ONLY_DEVICE
|
||||
FloppyDiskette = 0x0004, // FILE_FLOPPY_DISKETTE
|
||||
WriteOnceMedia = 0x0008, // FILE_WRITE_ONCE_MEDIA
|
||||
RemoteDevice = 0x0010, // FILE_REMOTE_DEVICE
|
||||
IsMounted = 0x0020, // FILE_DEVICE_IS_MOUNTED
|
||||
VirtualVolume = 0x0040, // FILE_VIRTUAL_VOLUME
|
||||
}
|
||||
}
|
51
SMBLibrary/Enums/FileSystemInformation/DeviceType.cs
Normal file
51
SMBLibrary/Enums/FileSystemInformation/DeviceType.cs
Normal file
|
@ -0,0 +1,51 @@
|
|||
|
||||
namespace SMBLibrary
|
||||
{
|
||||
public enum DeviceType : uint
|
||||
{
|
||||
Beep = 0x0001, // FILE_DEVICE_BEEP
|
||||
CDRom = 0x0002, // FILE_DEVICE_CD_ROM
|
||||
CDRomFileSystem = 0x0003, // FILE_DEVICE_CD_ROM_FILE_SYSTEM
|
||||
Controller = 0x0004, // FILE_DEVICE_CONTROLLER
|
||||
DataLink = 0x0005, // FILE_DEVICE_DATALINK
|
||||
DFS = 0x0006, // FILE_DEVICE_DFS
|
||||
Disk = 0x0007, // FILE_DEVICE_DISK
|
||||
DiskFileSystem = 0x0008, // FILE_DEVICE_DISK_FILE_SYSTEM
|
||||
FileSystem = 0x0009, // FILE_DEVICE_FILE_SYSTEM
|
||||
ImportPort = 0x000A, // FILE_DEVICE_INPORT_PORT
|
||||
Keyboard = 0x000B, // FILE_DEVICE_KEYBOARD
|
||||
MailSlot = 0x000C, // FILE_DEVICE_MAILSLOT
|
||||
MidiIn = 0x000D, // FILE_DEVICE_MIDI_IN
|
||||
MidiOut = 0x000E, // FILE_DEVICE_MIDI_OUT
|
||||
Mouse = 0x000F, // FILE_DEVICE_MOUSE
|
||||
MultiUNCProvider = 0x0010, // FILE_DEVICE_MULTI_UNC_PROVIDER
|
||||
NamedPipe = 0x0011, // FILE_DEVICE_NAMED_PIPE
|
||||
Network = 0x0012, // FILE_DEVICE_NETWORK
|
||||
NetworkBrowser = 0x0013, // FILE_DEVICE_NETWORK_BROWSER
|
||||
NetworkFileSystem = 0x0014, // FILE_DEVICE_NETWORK_FILE_SYSTEM
|
||||
Null = 0x0015, // FILE_DEVICE_NULL
|
||||
ParallelPort = 0x0016, // FILE_DEVICE_PARALLEL_PORT
|
||||
PhysicalNetcard = 0x0017, // FILE_DEVICE_PHYSICAL_NETCARD
|
||||
Printer = 0x0018, // FILE_DEVICE_PRINTER
|
||||
Scanner = 0x0019, // FILE_DEVICE_SCANNER
|
||||
SerialMousePort = 0x001A, // FILE_DEVICE_SERIAL_MOUSE_PORT
|
||||
SerialPort = 0x001B, // FILE_DEVICE_SERIAL_PORT
|
||||
Screen = 0x001C, // FILE_DEVICE_SCREEN
|
||||
Sound = 0x001D, // FILE_DEVICE_SOUND
|
||||
Streams = 0x001E, // FILE_DEVICE_STREAMS
|
||||
Tape = 0x001F, // FILE_DEVICE_TAPE
|
||||
TapeFileSystem = 0x0020, // FILE_DEVICE_TAPE_FILE_SYSTEM
|
||||
Transport = 0x0021, // FILE_DEVICE_TRANSPORT
|
||||
Unknown = 0x0022, // FILE_DEVICE_UNKNOWN
|
||||
Video = 0x0023, // FILE_DEVICE_VIDEO
|
||||
VirtualDisk = 0x0024, // FILE_DEVICE_VIRTUAL_DISK
|
||||
WaveIn = 0x0025, // FILE_DEVICE_WAVE_IN
|
||||
WaveOut = 0x0026, // FILE_DEVICE_WAVE_OUT
|
||||
PS2Port = 0x0027, // FILE_DEVICE_8042_PORT
|
||||
NetworkRedirector = 0x0028, // FILE_DEVICE_NETWORK_REDIRECTOR
|
||||
Battery = 0x0029, // FILE_DEVICE_BATTERY
|
||||
BusExtender = 0x002A, // FILE_DEVICE_BUS_EXTENDER
|
||||
Modem = 0x002B, // FILE_DEVICE_MODEM
|
||||
VirtualDosMachine = 0x002C, // FILE_DEVICE_VDM
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
|
||||
namespace SMBLibrary
|
||||
{
|
||||
[Flags]
|
||||
public enum FileSystemAttributes : uint
|
||||
{
|
||||
CaseSensitiveSearch = 0x0001, // FILE_CASE_SENSITIVE_SEARCH
|
||||
CasePreservedNamed = 0x0002, // FILE_CASE_PRESERVED_NAMES
|
||||
UnicodeOnDisk = 0x0004, // FILE_UNICODE_ON_DISK
|
||||
PersistentACLs = 0x0008, // FILE_PERSISTENT_ACLS
|
||||
FileCompression = 0x0010, // FILE_FILE_COMPRESSION
|
||||
VolumeQuotas = 0x0020, // FILE_VOLUME_QUOTAS
|
||||
SupportsSparseFiles = 0x0040, // FILE_SUPPORTS_SPARSE_FILES
|
||||
SupportsReparsePoints = 0x0080, // FILE_SUPPORTS_REPARSE_POINTS
|
||||
SupportsRemoteStorage = 0x0100, // FILE_SUPPORTS_REMOTE_STORAGE
|
||||
VolumeIsCompressed = 0x8000, // FILE_VOLUME_IS_COMPRESSED
|
||||
SupportsObjectIDs = 0x00010000, // FILE_SUPPORTS_OBJECT_IDS
|
||||
SupportsEncryption = 0x00020000, // FILE_SUPPORTS_ENCRYPTION
|
||||
NamedStreams = 0x00040000, // FILE_NAMED_STREAMS
|
||||
ReadOnlyVolume = 0x00080000, // FILE_READ_ONLY_VOLUME
|
||||
SequentialWriteOnce = 0x00100000, // FILE_SEQUENTIAL_WRITE_ONCE
|
||||
SupportsTransactions = 0x00200000, // FILE_SUPPORTS_TRANSACTIONS
|
||||
SupportsHardLinks = 0x00400000, // FILE_SUPPORTS_HARD_LINKS
|
||||
SupportsExtendedAttributes = 0x00800000, // FILE_SUPPORTS_EXTENDED_ATTRIBUTES
|
||||
SupportsOpenByFileID = 0x01000000, // FILE_SUPPORTS_OPEN_BY_FILE_ID
|
||||
SupportsUSNJournal = 0x02000000, // FILE_SUPPORTS_USN_JOURNAL
|
||||
}
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace SMBLibrary.SMB1
|
||||
{
|
||||
[Flags]
|
||||
public enum DeviceCharacteristics : uint
|
||||
{
|
||||
FILE_REMOVABLE_MEDIA = 0x0001,
|
||||
FILE_READ_ONLY_DEVICE = 0x0002,
|
||||
FILE_FLOPPY_DISKETTE = 0x0004,
|
||||
FILE_WRITE_ONCE_MEDIA = 0x0008,
|
||||
FILE_REMOTE_DEVICE = 0x0010,
|
||||
FILE_DEVICE_IS_MOUNTED = 0x0020,
|
||||
FILE_VIRTUAL_VOLUME = 0x0040,
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
|
||||
namespace SMBLibrary.SMB1
|
||||
{
|
||||
public enum DeviceType : uint
|
||||
{
|
||||
FILE_DEVICE_BEEP = 0x0001,
|
||||
FILE_DEVICE_CD_ROM = 0x0002,
|
||||
FILE_DEVICE_CD_ROM_FILE_SYSTEM = 0x0003,
|
||||
FILE_DEVICE_CONTROLLER = 0x0004,
|
||||
FILE_DEVICE_DATALINK = 0x0005,
|
||||
FILE_DEVICE_DFS = 0x0006,
|
||||
FILE_DEVICE_DISK = 0x0007,
|
||||
FILE_DEVICE_DISK_FILE_SYSTEM = 0x0008,
|
||||
FILE_DEVICE_FILE_SYSTEM = 0x0009,
|
||||
FILE_DEVICE_INPORT_PORT = 0x000A,
|
||||
FILE_DEVICE_KEYBOARD = 0x000B,
|
||||
FILE_DEVICE_MAILSLOT = 0x000C,
|
||||
FILE_DEVICE_MIDI_IN = 0x000D,
|
||||
FILE_DEVICE_MIDI_OUT = 0x000E,
|
||||
FILE_DEVICE_MOUSE = 0x000F,
|
||||
FILE_DEVICE_MULTI_UNC_PROVIDER = 0x0010,
|
||||
FILE_DEVICE_NAMED_PIPE = 0x0011,
|
||||
FILE_DEVICE_NETWORK = 0x0012,
|
||||
FILE_DEVICE_NETWORK_BROWSER = 0x0013,
|
||||
FILE_DEVICE_NETWORK_FILE_SYSTEM = 0x0014,
|
||||
FILE_DEVICE_NULL = 0x0015,
|
||||
FILE_DEVICE_PARALLEL_PORT = 0x0016,
|
||||
FILE_DEVICE_PHYSICAL_NETCARD = 0x0017,
|
||||
FILE_DEVICE_PRINTER = 0x0018,
|
||||
FILE_DEVICE_SCANNER = 0x0019,
|
||||
FILE_DEVICE_SERIAL_MOUSE_PORT = 0x001A,
|
||||
FILE_DEVICE_SERIAL_PORT = 0x001B,
|
||||
FILE_DEVICE_SCREEN = 0x001C,
|
||||
FILE_DEVICE_SOUND = 0x001D,
|
||||
FILE_DEVICE_STREAMS = 0x001E,
|
||||
FILE_DEVICE_TAPE = 0x001F,
|
||||
FILE_DEVICE_TAPE_FILE_SYSTEM = 0x0020,
|
||||
FILE_DEVICE_TRANSPORT = 0x0021,
|
||||
FILE_DEVICE_UNKNOWN = 0x0022,
|
||||
FILE_DEVICE_VIDEO = 0x0023,
|
||||
FILE_DEVICE_VIRTUAL_DISK = 0x0024,
|
||||
FILE_DEVICE_WAVE_IN = 0x0025,
|
||||
FILE_DEVICE_WAVE_OUT = 0x0026,
|
||||
FILE_DEVICE_8042_PORT = 0x0027,
|
||||
FILE_DEVICE_NETWORK_REDIRECTOR = 0x0028,
|
||||
FILE_DEVICE_BATTERY = 0x0029,
|
||||
FILE_DEVICE_BUS_EXTENDER = 0x002A,
|
||||
FILE_DEVICE_MODEM = 0x002B,
|
||||
FILE_DEVICE_VDM = 0x002C,
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
using System;
|
||||
|
||||
namespace SMBLibrary.SMB1
|
||||
{
|
||||
[Flags]
|
||||
public enum FileSystemAttributes : uint
|
||||
{
|
||||
FILE_CASE_SENSITIVE_SEARCH = 0x0001,
|
||||
FILE_CASE_PRESERVED_NAMES = 0x0002,
|
||||
FILE_UNICODE_ON_DISK = 0x0004,
|
||||
FILE_PERSISTENT_ACLS = 0x0008,
|
||||
FILE_FILE_COMPRESSION = 0x0010,
|
||||
FILE_VOLUME_QUOTAS = 0x0020, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_SPARSE_FILES = 0x0040, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_REPARSE_POINTS = 0x0080, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_REMOTE_STORAGE = 0x0100, // SMB 1.0 addition
|
||||
FILE_VOLUME_IS_COMPRESSED = 0x8000,
|
||||
FILE_SUPPORTS_OBJECT_IDS = 0x00010000, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_ENCRYPTION = 0x00020000, // SMB 1.0 addition
|
||||
FILE_NAMED_STREAMS = 0x00040000, // SMB 1.0 addition
|
||||
FILE_READ_ONLY_VOLUME = 0x00080000, // SMB 1.0 addition
|
||||
FILE_SEQUENTIAL_WRITE_ONCE = 0x00100000, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_TRANSACTIONS = 0x00200000, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_HARD_LINKS = 0x00400000, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_EXTENDED_ATTRIBUTES = 0x00800000, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000, // SMB 1.0 addition
|
||||
FILE_SUPPORTS_USN_JOURNAL = 0x02000000, // SMB 1.0 addition
|
||||
}
|
||||
}
|
|
@ -49,6 +49,9 @@
|
|||
<Compile Include="Authentication\MD4.cs" />
|
||||
<Compile Include="Authentication\NTAuthentication.cs" />
|
||||
<Compile Include="Client\SMBClient.cs" />
|
||||
<Compile Include="Enums\FileSystemInformation\DeviceCharacteristics.cs" />
|
||||
<Compile Include="Enums\FileSystemInformation\DeviceType.cs" />
|
||||
<Compile Include="Enums\FileSystemInformation\FileSystemAttributes.cs" />
|
||||
<Compile Include="Enums\NtCreateFile\CreateDisposition.cs" />
|
||||
<Compile Include="Enums\NtCreateFile\CreateOptions.cs" />
|
||||
<Compile Include="Enums\NtCreateFile\ShareAccess.cs" />
|
||||
|
@ -312,9 +315,6 @@
|
|||
<Compile Include="SMB1\Transaction2Subcommands\Structures\FindInformation\FindInfoStandard.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\FullExtendedAttribute.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\FullExtendedAttributeList.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\QueryFSInformation\Enums\DeviceCharacteristics.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\QueryFSInformation\Enums\DeviceType.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\QueryFSInformation\Enums\FileSystemAttributes.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\QueryFSInformation\QueryFSAttibuteInfo.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\QueryFSInformation\QueryFSDeviceInfo.cs" />
|
||||
<Compile Include="SMB1\Transaction2Subcommands\Structures\QueryFSInformation\QueryFSInfoAllocation.cs" />
|
||||
|
|
|
@ -259,14 +259,14 @@ namespace SMBLibrary.Server.SMB1
|
|||
case QueryFSInformationLevel.SMB_QUERY_FS_DEVICE_INFO:
|
||||
{
|
||||
QueryFSDeviceInfo result = new QueryFSDeviceInfo();
|
||||
result.DeviceCharacteristics = DeviceCharacteristics.FILE_DEVICE_IS_MOUNTED;
|
||||
result.DeviceType = DeviceType.FILE_DEVICE_DISK;
|
||||
result.DeviceCharacteristics = DeviceCharacteristics.IsMounted;
|
||||
result.DeviceType = DeviceType.Disk;
|
||||
return result;
|
||||
}
|
||||
case QueryFSInformationLevel.SMB_QUERY_FS_ATTRIBUTE_INFO:
|
||||
{
|
||||
QueryFSAttibuteInfo result = new QueryFSAttibuteInfo();
|
||||
result.FileSystemAttributes = FileSystemAttributes.FILE_UNICODE_ON_DISK;
|
||||
result.FileSystemAttributes = FileSystemAttributes.UnicodeOnDisk;
|
||||
result.MaxFileNameLengthInBytes = 255;
|
||||
result.FileSystemName = fileSystem.Name;
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue