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 const int DeclaredSize = 4;
public ushort StructureSize; private ushort StructureSize;
public ushort Reserved; public ushort Reserved;
public CancelRequest() : base(SMB2CommandName.Cancel) public CancelRequest() : base(SMB2CommandName.Cancel)

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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