mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-08-17 20:43:46 +02:00
Added a new ConnectionState class, SMB1 specific functionality will reside in SMB1ConnectionState
This commit is contained in:
parent
8ba4f012f1
commit
08717b5358
4 changed files with 39 additions and 8 deletions
|
@ -7,17 +7,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net.Sockets;
|
||||
using SMBLibrary.NetBios;
|
||||
using Utilities;
|
||||
|
||||
namespace SMBLibrary.Server
|
||||
{
|
||||
public class SMB1ConnectionState
|
||||
public class SMB1ConnectionState : ConnectionState
|
||||
{
|
||||
public Socket ClientSocket = null;
|
||||
public NBTConnectionReceiveBuffer ReceiveBuffer = new NBTConnectionReceiveBuffer();
|
||||
|
||||
public int MaxBufferSize;
|
||||
public bool LargeRead;
|
||||
public bool LargeWrite;
|
||||
|
@ -35,13 +30,17 @@ namespace SMBLibrary.Server
|
|||
private ushort m_nextFID = 1;
|
||||
// Key is FID
|
||||
private Dictionary<ushort, byte[]> m_namedPipeResponse = new Dictionary<ushort, byte[]>();
|
||||
|
||||
|
||||
// Key is PID
|
||||
public Dictionary<uint, ProcessStateObject> ProcessStateList = new Dictionary<uint, ProcessStateObject>();
|
||||
public const int MaxSearches = 2048; // Windows servers initialize Server.MaxSearches to 2048.
|
||||
public Dictionary<ushort, List<FileSystemEntry>> OpenSearches = new Dictionary<ushort, List<FileSystemEntry>>();
|
||||
private ushort m_nextSearchHandle = 1;
|
||||
|
||||
public SMB1ConnectionState(ConnectionState state) : base(state)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// An open UID MUST be unique within an SMB connection.
|
||||
/// The value of 0xFFFE SHOULD NOT be used as a valid UID. All other possible values for a UID, excluding zero (0x0000), are valid.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue