-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsmbsessionsetupandx.h
90 lines (79 loc) · 1.61 KB
/
smbsessionsetupandx.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#pragma once
#include "smbtransaction.h"
#pragma pack(push, 1)
typedef struct ANDX {
BYTE AndxCommand;
BYTE Reserved;
WORD AndxOffset;
}*PANDX;
typedef struct _REQ_SESSIONSETUP_ANDX {
BYTE WordCount;
ANDX andx;
WORD MaxBufferSize;
WORD MaxMpxCount;
WORD VcNumber;
DWORD SessionKey;
WORD PasswordLength;
DWORD Reserved;
WORD ByteCount;
union {
struct {
BYTE Password;
BYTE Buffer[1];
};
BYTE Bytes[2];
};
}REQ_SESSIONSETUP_ANDX, * PREQ_SESSIONSETUP_ANDX;
typedef struct _REQ_NT_SESSIONSETUP_ANDX {
BYTE WordCount;
ANDX Andx;
WORD MaxBufferSize;
WORD MaxMpxCount;
WORD VcNumber;
DWORD SessionKey;
WORD CaseInsensitivePasswordLength;
WORD CaseSensitivePasswordLength;
DWORD Reserved;
DWORD Capabilities;
WORD ByteCount;
BYTE Buffer[1];
}REQ_NT_SESSIONSETUP_ANDX, * PREQ_NT_SESSIONSETUP_ANDX;
typedef struct _RESP_SESSIONSETUP_ANDX {
BYTE WordCount;
ANDX Andx;
WORD Action;
WORD ByteCount;
BYTE Buffer[1];
}RESP_SESSIONSETUP_ANDX, * PRESP_SESSIONSETUP_ANDX;
typedef struct _REQ_WRITE_ANDX {
BYTE WordCount;
union {
ANDX andx;
struct {
BYTE AndxCommand;
BYTE AndxReserved;
WORD AndxOffset;
};
};
WORD Fid;
DWORD Offset;
DWORD Timeout;
WORD WriteMode;
WORD Remaining;
WORD Reserved;
WORD DataLength;
WORD DataOffset;
WORD ByteCount;
BYTE Buffer[1];
}REQ_WRITE_ANDX, * PREQ_WRITE_ANDX;
typedef struct _RESP_WRITE_ANDX {
BYTE WordCount;
//Words
ANDX Andx;
WORD Count;
WORD Available;
DWORD Reserved;
//SMB_DATA
WORD ByteCount;
}RESP_WRITE_ANDX, * PRESP_WRITE_ANDX;
#pragma pack(pop)