Browse Source

Moved NotifyChangeFilter to NTFileStore\Enums

Tal Aloni 8 years ago
parent
commit
0ecf8089e1

+ 2 - 2
SMBLibrary/SMB2/Enums/ChangeNotify/NotifyChange.cs

@@ -1,9 +1,9 @@
 using System;
 
-namespace SMBLibrary.SMB2
+namespace SMBLibrary
 {
     [Flags]
-    public enum NotifyChange : uint
+    public enum NotifyChangeFilter : uint
     {
         FileName = 0x0000001,     // FILE_NOTIFY_CHANGE_FILE_NAME
         DirName = 0x0000002,      // FILE_NOTIFY_CHANGE_DIR_NAME

+ 0 - 20
SMBLibrary/SMB1/NTTransactSubcommands/Enums/CompletionFilter.cs

@@ -1,20 +0,0 @@
-
-namespace SMBLibrary.SMB1
-{
-    public enum CompletionFilter : uint
-    {
-        FILE_NOTIFY_CHANGE_FILE_NAME = 0x00000001,
-        FILE_NOTIFY_CHANGE_DIR_NAME = 0x00000002,
-        FILE_NOTIFY_CHANGE_NAME = 0x00000003,
-        FILE_NOTIFY_CHANGE_ATTRIBUTES = 0x00000004,
-        FILE_NOTIFY_CHANGE_SIZE = 0x00000008,
-        FILE_NOTIFY_CHANGE_LAST_WRITE = 0x00000010,
-        FILE_NOTIFY_CHANGE_LAST_ACCESS = 0x00000020,
-        FILE_NOTIFY_CHANGE_CREATION = 0x00000040,
-        FILE_NOTIFY_CHANGE_EA = 0x00000080,
-        FILE_NOTIFY_CHANGE_SECURITY = 0x00000100,
-        FILE_NOTIFY_CHANGE_STREAM_NAME = 0x00000200,
-        FILE_NOTIFY_CHANGE_STREAM_SIZE = 0x00000400,
-        FILE_NOTIFY_CHANGE_STREAM_WRITE = 0x00000800,
-    }
-}

+ 2 - 2
SMBLibrary/SMB1/NTTransactSubcommands/NTTransactNotifyChangeRequest.cs

@@ -18,7 +18,7 @@ namespace SMBLibrary.SMB1
     {
         public const int SetupLength = 8;
         // Setup:
-        public CompletionFilter CompletionFilter;
+        public NotifyChangeFilter CompletionFilter;
         public ushort FID;
         public bool WatchTree;
         public byte Reserved;
@@ -29,7 +29,7 @@ namespace SMBLibrary.SMB1
 
         public NTTransactNotifyChangeRequest(byte[] setup) : base()
         {
-            CompletionFilter = (CompletionFilter)LittleEndianConverter.ToUInt32(setup, 0);
+            CompletionFilter = (NotifyChangeFilter)LittleEndianConverter.ToUInt32(setup, 0);
             FID = LittleEndianConverter.ToUInt16(setup, 4);
             WatchTree = (ByteReader.ReadByte(setup, 6) != 0);
             Reserved = ByteReader.ReadByte(setup, 7);

+ 2 - 2
SMBLibrary/SMB2/Commands/ChangeNotifyRequest.cs

@@ -21,7 +21,7 @@ namespace SMBLibrary.SMB2
         public ChangeNotifyFlags Flags;
         public uint OutputBufferLength;
         public FileID FileId;
-        public NotifyChange CompletionFilter;
+        public NotifyChangeFilter CompletionFilter;
         public uint Reserved;
 
         public ChangeNotifyRequest() : base(SMB2CommandName.ChangeNotify)
@@ -35,7 +35,7 @@ namespace SMBLibrary.SMB2
             Flags = (ChangeNotifyFlags)LittleEndianConverter.ToUInt16(buffer, offset + SMB2Header.Length + 2);
             OutputBufferLength = LittleEndianConverter.ToUInt32(buffer, offset + SMB2Header.Length + 4);
             FileId = new FileID(buffer, offset + SMB2Header.Length + 8);
-            CompletionFilter = (NotifyChange)LittleEndianConverter.ToUInt32(buffer, offset + SMB2Header.Length + 24);
+            CompletionFilter = (NotifyChangeFilter)LittleEndianConverter.ToUInt32(buffer, offset + SMB2Header.Length + 24);
             Reserved = LittleEndianConverter.ToUInt32(buffer, offset + SMB2Header.Length + 28);
         }
 

+ 1 - 2
SMBLibrary/SMBLibrary.csproj

@@ -101,6 +101,7 @@
     <Compile Include="NTFileStore\Enums\FileSystemInformation\FileSystemInformationClass.cs" />
     <Compile Include="NTFileStore\Enums\FileSystemInformation\SectorSizeInformationFlags.cs" />
     <Compile Include="NTFileStore\Enums\IoControlCode.cs" />
+    <Compile Include="NTFileStore\Enums\NotifyChangeFilter.cs" />
     <Compile Include="NTFileStore\Enums\NtCreateFile\CreateDisposition.cs" />
     <Compile Include="NTFileStore\Enums\NtCreateFile\CreateOptions.cs" />
     <Compile Include="NTFileStore\Enums\NtCreateFile\FileStatus.cs" />
@@ -356,7 +357,6 @@
     <Compile Include="SMB1\Enums\Write\WriteMode.cs" />
     <Compile Include="SMB1\EnumStructures\NamedPipeStatus.cs" />
     <Compile Include="SMB1\EnumStructures\OpenResults.cs" />
-    <Compile Include="SMB1\NTTransactSubcommands\Enums\CompletionFilter.cs" />
     <Compile Include="SMB1\NTTransactSubcommands\Enums\NTTransactSubcommandName.cs" />
     <Compile Include="SMB1\NTTransactSubcommands\Enums\SecurityInfoFields.cs" />
     <Compile Include="SMB1\NTTransactSubcommands\NTTransactCreateRequest.cs" />
@@ -500,7 +500,6 @@
     <Compile Include="SMB2\Commands\WriteRequest.cs" />
     <Compile Include="SMB2\Commands\WriteResponse.cs" />
     <Compile Include="SMB2\Enums\ChangeNotify\ChangeNotifyFlags.cs" />
-    <Compile Include="SMB2\Enums\ChangeNotify\NotifyChange.cs" />
     <Compile Include="SMB2\Enums\Close\CloseFlags.cs" />
     <Compile Include="SMB2\Enums\Create\CreateAction.cs" />
     <Compile Include="SMB2\Enums\Create\CreateResponseFlags.cs" />