1 #ifndef _SMBNO_H_
2 #define _SMBNO_H_
3
4
5 #define aRONLY (1L<<0)
6 #define aHIDDEN (1L<<1)
7 #define aSYSTEM (1L<<2)
8 #define aVOLID (1L<<3)
9 #define aDIR (1L<<4)
10 #define aARCH (1L<<5)
11
12
13 #define SUCCESS 0
14 #define ERRDOS 0x01
15 #define ERRSRV 0x02
16 #define ERRHRD 0x03
17 #define ERRCMD 0xFF
18
19
20
21 #define ERRbadfunc 1
22 #define ERRbadfile 2
23 #define ERRbadpath 3
24 #define ERRnofids 4
25 #define ERRnoaccess 5
26 #define ERRbadfid 6
27 #define ERRbadmcb 7
28 #define ERRnomem 8
29 #define ERRbadmem 9
30 #define ERRbadenv 10
31 #define ERRbadformat 11
32 #define ERRbadaccess 12
33 #define ERRbaddata 13
34 #define ERRres 14
35 #define ERRbaddrive 15
36 #define ERRremcd 16
37 #define ERRdiffdevice 17
38 #define ERRnofiles 18
39 #define ERRbadshare 32
40 #define ERRlock 33
41 #define ERRfilexists 80
42 #define ERRbadpipe 230
43 #define ERRpipebusy 231
44 #define ERRpipeclosing 232
45 #define ERRnotconnected 233
46 #define ERRmoredata 234
47 #define ERROR_EAS_DIDNT_FIT 275
48 #define ERROR_EAS_NOT_SUPPORTED 282
49
50
51
52 #define ERRerror 1
53 #define ERRbadpw 2
54 #define ERRbadtype 3
55 #define ERRaccess 4
56 #define ERRinvnid 5
57 #define ERRinvnetname 6
58 #define ERRinvdevice 7
59 #define ERRqfull 49
60 #define ERRqtoobig 50
61 #define ERRinvpfid 52
62 #define ERRsmbcmd 64
63 #define ERRsrverror 65
64 #define ERRfilespecs 67
65 #define ERRbadlink 68
66 #define ERRbadpermits 69
67 #define ERRbadpid 70
68 #define ERRsetattrmode 71
69 #define ERRpaused 81
70 #define ERRmsgoff 82
71 #define ERRnoroom 83
72 #define ERRrmuns 87
73 #define ERRtimeout 88
74 #define ERRnoresource 89
75 #define ERRtoomanyuids 90
76 #define ERRbaduid 91
77 #define ERRuseMPX 250
78 #define ERRuseSTD 251
79 #define ERRcontMPX 252
80 #define ERRbadPW
81 #define ERRnosupport 0xFFFF
82
83
84
85 #define ERRnowrite 19
86 #define ERRbadunit 20
87 #define ERRnotready 21
88 #define ERRbadcmd 22
89 #define ERRdata 23
90 #define ERRbadreq 24
91 #define ERRseek 25
92 #define ERRbadmedia 26
93 #define ERRbadsector 27
94 #define ERRnopaper 28
95 #define ERRwrite 29
96 #define ERRread 30
97 #define ERRgeneral 31
98 #define ERRwrongdisk 34
99 #define ERRFCBunavail 35
100 #define ERRsharebufexc 36
101 #define ERRdiskfull 39
102
103
104 #define smb_com 8
105 #define smb_rcls 9
106 #define smb_reh 10
107 #define smb_err 11
108 #define smb_flg 13
109 #define smb_flg2 14
110 #define smb_reb 13
111 #define smb_tid 28
112 #define smb_pid 30
113 #define smb_uid 32
114 #define smb_mid 34
115 #define smb_wct 36
116 #define smb_vwv 37
117 #define smb_vwv0 37
118 #define smb_vwv1 39
119 #define smb_vwv2 41
120 #define smb_vwv3 43
121 #define smb_vwv4 45
122 #define smb_vwv5 47
123 #define smb_vwv6 49
124 #define smb_vwv7 51
125 #define smb_vwv8 53
126 #define smb_vwv9 55
127 #define smb_vwv10 57
128 #define smb_vwv11 59
129 #define smb_vwv12 61
130 #define smb_vwv13 63
131 #define smb_vwv14 65
132
133
134 #define smb_tpscnt smb_vwv0
135 #define smb_tdscnt smb_vwv1
136 #define smb_mprcnt smb_vwv2
137 #define smb_mdrcnt smb_vwv3
138 #define smb_msrcnt smb_vwv4
139 #define smb_flags smb_vwv5
140 #define smb_timeout smb_vwv6
141 #define smb_pscnt smb_vwv9
142 #define smb_psoff smb_vwv10
143 #define smb_dscnt smb_vwv11
144 #define smb_dsoff smb_vwv12
145 #define smb_suwcnt smb_vwv13
146 #define smb_setup smb_vwv14
147 #define smb_setup0 smb_setup
148 #define smb_setup1 (smb_setup+2)
149 #define smb_setup2 (smb_setup+4)
150
151
152 #define smb_spscnt smb_vwv2
153 #define smb_spsoff smb_vwv3
154 #define smb_spsdisp smb_vwv4
155 #define smb_sdscnt smb_vwv5
156 #define smb_sdsoff smb_vwv6
157 #define smb_sdsdisp smb_vwv7
158 #define smb_sfid smb_vwv8
159
160
161 #define smb_tprcnt smb_vwv0
162 #define smb_tdrcnt smb_vwv1
163 #define smb_prcnt smb_vwv3
164 #define smb_proff smb_vwv4
165 #define smb_prdisp smb_vwv5
166 #define smb_drcnt smb_vwv6
167 #define smb_droff smb_vwv7
168 #define smb_drdisp smb_vwv8
169
170
171 #define SMBmkdir 0x00
172 #define SMBrmdir 0x01
173 #define SMBopen 0x02
174 #define SMBcreate 0x03
175 #define SMBclose 0x04
176 #define SMBflush 0x05
177 #define SMBunlink 0x06
178 #define SMBmv 0x07
179 #define SMBgetatr 0x08
180 #define SMBsetatr 0x09
181 #define SMBread 0x0A
182 #define SMBwrite 0x0B
183 #define SMBlock 0x0C
184 #define SMBunlock 0x0D
185 #define SMBctemp 0x0E
186 #define SMBmknew 0x0F
187 #define SMBchkpth 0x10
188 #define SMBexit 0x11
189 #define SMBlseek 0x12
190 #define SMBtcon 0x70
191 #define SMBtconX 0x75
192 #define SMBtdis 0x71
193 #define SMBnegprot 0x72
194 #define SMBdskattr 0x80
195 #define SMBsearch 0x81
196 #define SMBsplopen 0xC0
197 #define SMBsplwr 0xC1
198 #define SMBsplclose 0xC2
199 #define SMBsplretq 0xC3
200 #define SMBsends 0xD0
201 #define SMBsendb 0xD1
202 #define SMBfwdname 0xD2
203 #define SMBcancelf 0xD3
204 #define SMBgetmac 0xD4
205 #define SMBsendstrt 0xD5
206 #define SMBsendend 0xD6
207 #define SMBsendtxt 0xD7
208
209
210 #define SMBlockread 0x13
211 #define SMBwriteunlock 0x14
212 #define SMBreadbraw 0x1a
213 #define SMBwritebraw 0x1d
214 #define SMBwritec 0x20
215 #define SMBwriteclose 0x2c
216
217
218 #define SMBreadBraw 0x1A
219 #define SMBreadBmpx 0x1B
220 #define SMBreadBs 0x1C
221 #define SMBwriteBraw 0x1D
222 #define SMBwriteBmpx 0x1E
223 #define SMBwriteBs 0x1F
224 #define SMBwriteC 0x20
225 #define SMBsetattrE 0x22
226 #define SMBgetattrE 0x23
227 #define SMBlockingX 0x24
228 #define SMBtrans 0x25
229 #define SMBtranss 0x26
230 #define SMBioctl 0x27
231 #define SMBioctls 0x28
232 #define SMBcopy 0x29
233 #define SMBmove 0x2A
234 #define SMBecho 0x2B
235 #define SMBopenX 0x2D
236 #define SMBreadX 0x2E
237 #define SMBwriteX 0x2F
238 #define SMBsesssetupX 0x73
239 #define SMBtconX 0x75
240 #define SMBffirst 0x82
241 #define SMBfunique 0x83
242 #define SMBfclose 0x84
243 #define SMBinvalid 0xFE
244
245
246
247 #define SMBtrans2 0x32
248 #define SMBtranss2 0x33
249 #define SMBfindclose 0x34
250 #define SMBfindnclose 0x35
251 #define SMBulogoffX 0x74
252
253
254 #define TRANSACT2_OPEN 0
255 #define TRANSACT2_FINDFIRST 1
256 #define TRANSACT2_FINDNEXT 2
257 #define TRANSACT2_QFSINFO 3
258 #define TRANSACT2_SETFSINFO 4
259 #define TRANSACT2_QPATHINFO 5
260 #define TRANSACT2_SETPATHINFO 6
261 #define TRANSACT2_QFILEINFO 7
262 #define TRANSACT2_SETFILEINFO 8
263 #define TRANSACT2_FSCTL 9
264 #define TRANSACT2_IOCTL 10
265 #define TRANSACT2_FINDNOTIFYFIRST 11
266 #define TRANSACT2_FINDNOTIFYNEXT 12
267 #define TRANSACT2_MKDIR 13
268
269 #endif