summaryrefslogtreecommitdiff
path: root/src/nu_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/nu_server.h')
-rwxr-xr-xsrc/nu_server.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/nu_server.h b/src/nu_server.h
new file mode 100755
index 0000000..0a2ecc2
--- /dev/null
+++ b/src/nu_server.h
@@ -0,0 +1,43 @@
1typedef unsigned char BYTE;
2typedef unsigned short WORD;
3typedef unsigned long DWORD;
4typedef int64_t QWORD;
5
6#include "nu_defines.h"
7
8typedef struct {
9 BYTE netbios_command;
10 BYTE netbios_flags;
11 WORD netbios_size;
12 DWORD Protocol; /* Protocol identifier 0xFF,"SMB" */
13 BYTE Command; /* Command Code, look below */
14 BYTE Status[4];
15 BYTE Flags;
16 WORD Flags2;
17 WORD Pad[6]; /* Ensure 12 bytes len */
18 WORD TreeID;
19 WORD ProcessID;
20 WORD UserID;
21 WORD MultiplexID;
22} SMB_HEADER;
23
24typedef struct {
25 BYTE WordCount;
26 WORD Buffer[0];
27} SMB_PARAMS;
28
29typedef struct {
30 WORD ByteCount;
31 BYTE Buffer[0];
32} SMB_BYTES;
33
34typedef struct {
35 SMB_PARAMS *params;
36 SMB_BYTES *bytes;
37} SMB_DATA;
38
39typedef struct {
40 SMB_COMMAND cmd;
41 SMB_COMMAND_FLAG flags;
42 SMB_STATUS (*handler)(SMB_DATA *data);
43} SMB_COMMAND_HANDLER;