2 Unix SMB/CIFS implementation.
3 DOS error code constants
4 Copyright (C) Andrew Tridgell 1992-2000
5 Copyright (C) John H Terpstra 1996-2000
6 Copyright (C) Luke Kenneth Casson Leighton 1996-2000
7 Copyright (C) Paul Ashton 1998-2000
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 #define ERRDOS 0x01 /* Error is from the core DOS operating system set. */
30 #define ERRSRV 0x02 /* Error is generated by the server network file manager.*/
31 #define ERRHRD 0x03 /* Error is an hardware error. */
32 #define ERRCMD 0xFF /* Command was not in the "SMB" format. */
34 /* SMB X/Open error codes for the ERRDOS error class */
35 #define ERRsuccess 0 /* No error */
36 #define ERRbadfunc 1 /* Invalid function (or system call) */
37 #define ERRbadfile 2 /* File not found (pathname error) */
38 #define ERRbadpath 3 /* Directory not found */
39 #define ERRnofids 4 /* Too many open files */
40 #define ERRnoaccess 5 /* Access denied */
41 #define ERRbadfid 6 /* Invalid fid */
42 #define ERRbadmcb 7 /* Memory control blocks destroyed. */
43 #define ERRnomem 8 /* Out of memory */
44 #define ERRbadmem 9 /* Invalid memory block address */
45 #define ERRbadenv 10 /* Invalid environment */
46 #define ERRbadaccess 12 /* Invalid open mode */
47 #define ERRbaddata 13 /* Invalid data (only from ioctl call) */
48 #define ERRres 14 /* reserved */
49 #define ERRbaddrive 15 /* Invalid drive */
50 #define ERRremcd 16 /* Attempt to delete current directory */
51 #define ERRdiffdevice 17 /* rename/move across different filesystems */
52 #define ERRnofiles 18 /* no more files found in file search */
53 #define ERRgeneral 31 /* General failure */
54 #define ERRbadshare 32 /* Share mode on file conflict with open mode */
55 #define ERRlock 33 /* Lock request conflicts with existing lock */
56 #define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */
57 #define ERRnetnamedel 64 /* Network name deleted or not available */
58 #define ERRnosuchshare 67 /* You specified an invalid share name */
59 #define ERRfilexists 80 /* File in operation already exists */
60 #define ERRinvalidparam 87
61 #define ERRcannotopen 110 /* Cannot open the file specified */
62 #define ERRinsufficientbuffer 122
63 #define ERRinvalidname 123 /* Invalid name */
64 #define ERRunknownlevel 124
65 #define ERRnotlocked 158 /* This region is not locked by this locking context. */
67 #define ERRbadpipe 230 /* Named pipe invalid */
68 #define ERRpipebusy 231 /* All instances of pipe are busy */
69 #define ERRpipeclosing 232 /* named pipe close in progress */
70 #define ERRnotconnected 233 /* No process on other end of named pipe */
71 #define ERRmoredata 234 /* More data to be returned */
72 #define ERRnomoreitems 259
73 #define ERRbaddirectory 267 /* Invalid directory name in a path. */
74 #define ERReasnotsupported 282 /* Extended attributes */
75 #define ERRlogonfailure 1326 /* Unknown username or bad password */
76 #define ERRbuftoosmall 2123
77 #define ERRunknownipc 2142
78 #define ERRnosuchprintjob 2151
79 #define ERRinvgroup 2455
81 /* here's a special one from observing NT */
82 #define ERRnoipc 66 /* don't support ipc */
84 /* These errors seem to be only returned by the NT printer driver system */
86 #define ERRunknownprinterdriver 1797 /* ERROR_UNKNOWN_PRINTER_DRIVER */
87 #define ERRinvalidprintername 1801 /* ERROR_INVALID_PRINTER_NAME */
88 #define ERRprinteralreadyexists 1802 /* ERROR_PRINTER_ALREADY_EXISTS */
89 #define ERRinvaliddatatype 1804 /* ERROR_INVALID_DATATYPE */
90 #define ERRinvalidenvironment 1805 /* ERROR_INVALID_ENVIRONMENT */
91 #define ERRprinterdriverinuse 3001 /* ERROR_PRINTER_DRIVER_IN_USE */
93 /* Error codes for the ERRSRV class */
95 #define ERRerror 1 /* Non specific error code */
96 #define ERRbadpw 2 /* Bad password */
97 #define ERRbadtype 3 /* reserved */
98 #define ERRaccess 4 /* No permissions to do the requested operation */
99 #define ERRinvnid 5 /* tid invalid */
100 #define ERRinvnetname 6 /* Invalid servername */
101 #define ERRinvdevice 7 /* Invalid device */
102 #define ERRqfull 49 /* Print queue full */
103 #define ERRqtoobig 50 /* Queued item too big */
104 #define ERRinvpfid 52 /* Invalid print file in smb_fid */
105 #define ERRsmbcmd 64 /* Unrecognised command */
106 #define ERRsrverror 65 /* smb server internal error */
107 #define ERRfilespecs 67 /* fid and pathname invalid combination */
108 #define ERRbadlink 68 /* reserved */
109 #define ERRbadpermits 69 /* Access specified for a file is not valid */
110 #define ERRbadpid 70 /* reserved */
111 #define ERRsetattrmode 71 /* attribute mode invalid */
112 #define ERRpaused 81 /* Message server paused */
113 #define ERRmsgoff 82 /* Not receiving messages */
114 #define ERRnoroom 83 /* No room for message */
115 #define ERRrmuns 87 /* too many remote usernames */
116 #define ERRtimeout 88 /* operation timed out */
117 #define ERRnoresource 89 /* No resources currently available for request. */
118 #define ERRtoomanyuids 90 /* too many userids */
119 #define ERRbaduid 91 /* bad userid */
120 #define ERRuseMPX 250 /* temporarily unable to use raw mode, use MPX mode */
121 #define ERRuseSTD 251 /* temporarily unable to use raw mode, use standard mode */
122 #define ERRcontMPX 252 /* resume MPX mode */
123 #define ERRbadPW /* reserved */
124 #define ERRnosupport 0xFFFF
125 #define ERRunknownsmb 22 /* from NT 3.5 response */
127 /* Error codes for the ERRHRD class */
129 #define ERRnowrite 19 /* read only media */
130 #define ERRbadunit 20 /* Unknown device */
131 #define ERRnotready 21 /* Drive not ready */
132 #define ERRbadcmd 22 /* Unknown command */
133 #define ERRdata 23 /* Data (CRC) error */
134 #define ERRbadreq 24 /* Bad request structure length */
136 #define ERRbadmedia 26
137 #define ERRbadsector 27
138 #define ERRnopaper 28
139 #define ERRwrite 29 /* write fault */
140 #define ERRread 30 /* read fault */
141 #define ERRgeneral 31 /* General hardware failure */
142 #define ERRwrongdisk 34
143 #define ERRFCBunavail 35
144 #define ERRsharebufexc 36 /* share buffer exceeded */
145 #define ERRdiskfull 39
148 /* these are win32 error codes. There are only a few places where
149 these matter for Samba, primarily in the NT printing code */
150 #define WERR_OK W_ERROR(0)
151 #define WERR_BADFILE W_ERROR(2)
152 #define WERR_ACCESS_DENIED W_ERROR(5)
153 #define WERR_BADFID W_ERROR(6)
154 #define WERR_BADFUNC W_ERROR(1)
155 #define WERR_INSUFFICIENT_BUFFER W_ERROR(122)
156 #define WERR_NO_SUCH_SHARE W_ERROR(67)
157 #define WERR_ALREADY_EXISTS W_ERROR(80)
158 #define WERR_INVALID_PARAM W_ERROR(87)
159 #define WERR_NOT_SUPPORTED W_ERROR(50)
160 #define WERR_BAD_PASSWORD W_ERROR(86)
161 #define WERR_NOMEM W_ERROR(8)
162 #define WERR_INVALID_NAME W_ERROR(123)
163 #define WERR_UNKNOWN_LEVEL W_ERROR(124)
164 #define WERR_OBJECT_PATH_INVALID W_ERROR(161)
165 #define WERR_NO_MORE_ITEMS W_ERROR(259)
166 #define WERR_MORE_DATA W_ERROR(234)
167 #define WERR_INVALID_OWNER W_ERROR(1307)
168 #define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338)
169 #define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(1797)
170 #define WERR_INVALID_PRINTER_NAME W_ERROR(1801)
171 #define WERR_PRINTER_ALREADY_EXISTS W_ERROR(1802)
172 #define WERR_INVALID_DATATYPE W_ERROR(1804)
173 #define WERR_INVALID_ENVIRONMENT W_ERROR(1805)
174 #define WERR_INVALID_FORM_NAME W_ERROR(1902)
175 #define WERR_INVALID_FORM_SIZE W_ERROR(1903)
176 #define WERR_BUF_TOO_SMALL W_ERROR(2123)
177 #define WERR_JOB_NOT_FOUND W_ERROR(2151)
178 #define WERR_DEST_NOT_FOUND W_ERROR(2152)
179 #define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320)
180 #define WERR_PRINTER_DRIVER_IN_USE W_ERROR(3001)
181 #define WERR_STATUS_MORE_ENTRIES W_ERROR(0x0105)
186 #define NERR_BASE (2100)
189 #define WERR_DFS_NO_SUCH_VOL W_ERROR(NERR_BASE+562)
190 #define WERR_DFS_NO_SUCH_SHARE W_ERROR(NERR_BASE+565)
191 #define WERR_DFS_NO_SUCH_SERVER W_ERROR(NERR_BASE+573)
192 #define WERR_DFS_INTERNAL_ERROR W_ERROR(NERR_BASE+590)
193 #define WERR_DFS_CANT_CREATE_JUNCT W_ERROR(NERR_BASE+569)
195 #endif /* _DOSERR_H */