diff options
Diffstat (limited to 'src/nu_server.h')
-rwxr-xr-x | src/nu_server.h | 43 |
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 @@ | |||
1 | typedef unsigned char BYTE; | ||
2 | typedef unsigned short WORD; | ||
3 | typedef unsigned long DWORD; | ||
4 | typedef int64_t QWORD; | ||
5 | |||
6 | #include "nu_defines.h" | ||
7 | |||
8 | typedef 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 | |||
24 | typedef struct { | ||
25 | BYTE WordCount; | ||
26 | WORD Buffer[0]; | ||
27 | } SMB_PARAMS; | ||
28 | |||
29 | typedef struct { | ||
30 | WORD ByteCount; | ||
31 | BYTE Buffer[0]; | ||
32 | } SMB_BYTES; | ||
33 | |||
34 | typedef struct { | ||
35 | SMB_PARAMS *params; | ||
36 | SMB_BYTES *bytes; | ||
37 | } SMB_DATA; | ||
38 | |||
39 | typedef struct { | ||
40 | SMB_COMMAND cmd; | ||
41 | SMB_COMMAND_FLAG flags; | ||
42 | SMB_STATUS (*handler)(SMB_DATA *data); | ||
43 | } SMB_COMMAND_HANDLER; | ||