SMB2 Commands: Marked StructureSize as private

This commit is contained in:
Tal Aloni 2017-07-21 17:43:36 +03:00
parent fd9a845fa2
commit 917f7f40f1
37 changed files with 37 additions and 37 deletions

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public CancelRequest() : base(SMB2CommandName.Cancel)

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 32;
public ushort StructureSize;
private ushort StructureSize;
public ChangeNotifyFlags Flags;
public uint OutputBufferLength;
public FileID FileId;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 8;
public const int DeclaredSize = 9;
public ushort StructureSize;
private ushort StructureSize;
private ushort OutputBufferOffset;
private uint OutputBufferLength;
public byte[] OutputBuffer = new byte[0];

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 24;
public ushort StructureSize;
private ushort StructureSize;
public CloseFlags Flags;
public uint Reserved;
public FileID FileId;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 60;
public ushort StructureSize;
private ushort StructureSize;
public CloseFlags Flags;
public uint Reserved;
public DateTime? CreationTime;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedLength = 56;
public const int DeclaredSize = 57;
public ushort StructureSize;
private ushort StructureSize;
public byte SecurityFlags; // Reserved
public OplockLevel RequestedOplockLevel;
public ImpersonationLevel ImpersonationLevel;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 89;
public ushort StructureSize;
private ushort StructureSize;
public OplockLevel OplockLevel;
public CreateResponseFlags Flags;
public CreateAction CreateAction;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public EchoRequest() : base(SMB2CommandName.Echo)

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public EchoResponse() : base(SMB2CommandName.Echo)

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 8;
public const int DeclaredSize = 9;
public ushort StructureSize;
private ushort StructureSize;
public byte ErrorContextCount;
public byte Reserved;
private uint ByteCount;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 24;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved1;
public uint Reserved2;
public FileID FileId;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public FlushResponse() : base(SMB2CommandName.Flush)

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedLength = 56;
public const int DeclaredSize = 57;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public uint CtlCode;
public FileID FileId;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedLength = 48;
public const int DeclaredSize = 49;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public uint CtlCode;
public FileID FileId;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 48;
public ushort StructureSize;
private ushort StructureSize;
public ushort LockCount;
public byte LSN; // 4 bits
public uint LockSequenceIndex; // 28 bits

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public LockResponse() : base(SMB2CommandName.Lock)

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public LogoffRequest() : base(SMB2CommandName.Logoff)

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public LogoffResponse() : base(SMB2CommandName.Logoff)

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 36;
public ushort StructureSize;
private ushort StructureSize;
private ushort DialectCount;
public SecurityMode SecurityMode;
public ushort Reserved;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 64;
public const int DeclaredSize = 65;
public ushort StructureSize;
private ushort StructureSize;
public SecurityMode SecurityMode;
public SMB2Dialect DialectRevision;
private ushort NegotiateContextCount;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedLength = 32;
public const int DeclaredSize = 33;
public ushort StructureSize;
private ushort StructureSize;
public FileInformationClass FileInformationClass;
public QueryDirectoryFlags Flags;
public uint FileIndex;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedLength = 8;
public const int DeclaredSize = 9;
public ushort StructureSize;
private ushort StructureSize;
private ushort OutputBufferOffset;
private uint OutputBufferLength;
public byte[] OutputBuffer = new byte[0];

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 40;
public const int DeclaredSize = 41;
public ushort StructureSize;
private ushort StructureSize;
public InfoType InfoType;
private byte FileInfoClass;
public uint OutputBufferLength;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 8;
public const int DeclaredSize = 9;
public ushort StructureSize;
private ushort StructureSize;
private ushort OutputBufferOffset;
private uint OutputBufferLength;
public byte[] OutputBuffer = new byte[0];

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 48;
public const int DeclaredSize = 49;
public ushort StructureSize;
private ushort StructureSize;
public byte Padding;
public ReadFlags Flags;
public uint ReadLength;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 16;
public const int DeclaredSize = 17;
public ushort StructureSize;
private ushort StructureSize;
private byte DataOffset;
public byte Reserved;
private uint DataLength;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 24;
public const int DeclaredSize = 25;
public ushort StructureSize;
private ushort StructureSize;
public SessionSetupFlags Flags;
public SecurityMode SecurityMode;
public ServerCapabilities Capabilities;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 8;
public const int DeclaredSize = 9;
public ushort StructureSize;
private ushort StructureSize;
public SessionFlags SessionFlags;
private ushort SecurityBufferOffset;
private ushort SecurityBufferLength;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 32;
public const int DeclaredSize = 33;
public ushort StructureSize;
private ushort StructureSize;
public InfoType InfoType;
private byte FileInfoClass;
public uint BufferLength;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 2;
public ushort StructureSize;
private ushort StructureSize;
public SetInfoResponse() : base(SMB2CommandName.SetInfo)
{

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 8;
public const int DeclaredSize = 9;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
private ushort PathOffset;
private ushort PathLength;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 16;
public ushort StructureSize;
private ushort StructureSize;
public ShareType ShareType;
public byte Reserved;
public ShareFlags ShareFlags;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public TreeDisconnectRequest() : base(SMB2CommandName.TreeDisconnect)

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
{
public const int DeclaredSize = 4;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public TreeDisconnectResponse() : base(SMB2CommandName.TreeDisconnect)

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 48;
public const int DeclaredSize = 49;
public ushort StructureSize;
private ushort StructureSize;
private ushort DataOffset;
private uint DataLength;
public ulong Offset;

View file

@ -18,7 +18,7 @@ namespace SMBLibrary.SMB2
public const int FixedSize = 16;
public const int DeclaredSize = 17;
public ushort StructureSize;
private ushort StructureSize;
public ushort Reserved;
public uint Count;
public uint Remaining;

View file

@ -17,7 +17,7 @@ namespace SMBLibrary.SMB2
public static readonly byte[] ProtocolSignature = new byte[] { 0xFE, 0x53, 0x4D, 0x42 };
public byte[] ProtocolId; // 4 bytes, 0xFE followed by "SMB"
public ushort StructureSize;
private ushort StructureSize;
public ushort CreditCharge;
public NTStatus Status;
public SMB2CommandName Command;