source: branches/samba-3.0/source/include/doserr.h

Last change on this file was 44, checked in by Paul Smedley, 18 years ago

Update source to 3.0.25b

File size: 12.1 KB
Line 
1/*
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
8 Copyright (C) Gerald (Jerry) Carter 2005
9
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2 of the License, or
13 (at your option) any later version.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23*/
24
25#ifndef _DOSERR_H
26#define _DOSERR_H
27
28/* Error classes */
29
30#define ERRDOS 0x01 /* Error is from the core DOS operating system set. */
31#define ERRSRV 0x02 /* Error is generated by the server network file manager.*/
32#define ERRHRD 0x03 /* Error is an hardware error. */
33#define ERRCMD 0xFF /* Command was not in the "SMB" format. */
34
35/* SMB X/Open error codes for the ERRDOS error class */
36#define ERRsuccess 0 /* No error */
37#define ERRbadfunc 1 /* Invalid function (or system call) */
38#define ERRbadfile 2 /* File not found (pathname error) */
39#define ERRbadpath 3 /* Directory not found */
40#define ERRnofids 4 /* Too many open files */
41#define ERRnoaccess 5 /* Access denied */
42#define ERRbadfid 6 /* Invalid fid */
43#define ERRbadmcb 7 /* Memory control blocks destroyed. */
44#define ERRnomem 8 /* Out of memory */
45#define ERRbadmem 9 /* Invalid memory block address */
46#define ERRbadenv 10 /* Invalid environment */
47#define ERRbadformat 11 /* Bad Format */
48#define ERRbadaccess 12 /* Invalid open mode */
49#define ERRbaddata 13 /* Invalid data (only from ioctl call) */
50#define ERRres 14 /* reserved */
51#define ERRbaddrive 15 /* Invalid drive */
52#define ERRremcd 16 /* Attempt to delete current directory */
53#define ERRdiffdevice 17 /* rename/move across different filesystems */
54#define ERRnofiles 18 /* no more files found in file search */
55#define ERRgeneral 31 /* General failure */
56#define ERRbadshare 32 /* Share mode on file conflict with open mode */
57#define ERRlock 33 /* Lock request conflicts with existing lock */
58#define ERRunsup 50 /* Request unsupported, returned by Win 95, RJS 20Jun98 */
59#define ERRnetnamedel 64 /* Network name deleted or not available */
60#define ERRnosuchshare 67 /* You specified an invalid share name */
61#define ERRfilexists 80 /* File in operation already exists */
62#define ERRinvalidparam 87
63#define ERRcannotopen 110 /* Cannot open the file specified */
64#define ERRbufferoverflow 111
65#define ERRinsufficientbuffer 122
66#define ERRinvalidname 123 /* Invalid name */
67#define ERRunknownlevel 124
68#define ERRnotlocked 158 /* This region is not locked by this locking context. */
69#define ERRinvalidpath 161
70#define ERRcancelviolation 173
71#define ERRnoatomiclocks 174
72#define ERRrename 183
73#define ERRbadpipe 230 /* Named pipe invalid */
74#define ERRpipebusy 231 /* All instances of pipe are busy */
75#define ERRpipeclosing 232 /* named pipe close in progress */
76#define ERRnotconnected 233 /* No process on other end of named pipe */
77#define ERRmoredata 234 /* More data to be returned */
78#define ERReainconsistent 255 /* from EMC */
79#define ERRnomoreitems 259
80#define ERRbaddirectory 267 /* Invalid directory name in a path. */
81#define ERReasnotsupported 282 /* Extended attributes */
82#define ERRlogonfailure 1326 /* Unknown username or bad password */
83#define ERRbuftoosmall 2123
84#define ERRunknownipc 2142
85#define ERRnosuchprintjob 2151
86#define ERRinvgroup 2455
87
88/* here's a special one from observing NT */
89#define ERRnoipc 66 /* don't support ipc */
90
91/* These errors seem to be only returned by the NT printer driver system */
92#define ERRdriveralreadyinstalled 1795 /* ERROR_PRINTER_DRIVER_ALREADY_INSTALLED */
93#define ERRunknownprinterport 1796 /* ERROR_UNKNOWN_PORT */
94#define ERRunknownprinterdriver 1797 /* ERROR_UNKNOWN_PRINTER_DRIVER */
95#define ERRunknownprintprocessor 1798 /* ERROR_UNKNOWN_PRINTPROCESSOR */
96#define ERRinvalidseparatorfile 1799 /* ERROR_INVALID_SEPARATOR_FILE */
97#define ERRinvalidjobpriority 1800 /* ERROR_INVALID_PRIORITY */
98#define ERRinvalidprintername 1801 /* ERROR_INVALID_PRINTER_NAME */
99#define ERRprinteralreadyexists 1802 /* ERROR_PRINTER_ALREADY_EXISTS */
100#define ERRinvalidprintercommand 1803 /* ERROR_INVALID_PRINTER_COMMAND */
101#define ERRinvaliddatatype 1804 /* ERROR_INVALID_DATATYPE */
102#define ERRinvalidenvironment 1805 /* ERROR_INVALID_ENVIRONMENT */
103
104#define ERRunknownprintmonitor 3000 /* ERROR_UNKNOWN_PRINT_MONITOR */
105#define ERRprinterdriverinuse 3001 /* ERROR_PRINTER_DRIVER_IN_USE */
106#define ERRspoolfilenotfound 3002 /* ERROR_SPOOL_FILE_NOT_FOUND */
107#define ERRnostartdoc 3003 /* ERROR_SPL_NO_STARTDOC */
108#define ERRnoaddjob 3004 /* ERROR_SPL_NO_ADDJOB */
109#define ERRprintprocessoralreadyinstalled 3005 /* ERROR_PRINT_PROCESSOR_ALREADY_INSTALLED */
110#define ERRprintmonitoralreadyinstalled 3006 /* ERROR_PRINT_MONITOR_ALREADY_INSTALLED */
111#define ERRinvalidprintmonitor 3007 /* ERROR_INVALID_PRINT_MONITOR */
112#define ERRprintmonitorinuse 3008 /* ERROR_PRINT_MONITOR_IN_USE */
113#define ERRprinterhasjobsqueued 3009 /* ERROR_PRINTER_HAS_JOBS_QUEUED */
114
115/* Error codes for the ERRSRV class */
116
117#define ERRerror 1 /* Non specific error code */
118#define ERRbadpw 2 /* Bad password */
119#define ERRbadtype 3 /* reserved */
120#define ERRaccess 4 /* No permissions to do the requested operation */
121#define ERRinvnid 5 /* tid invalid */
122#define ERRinvnetname 6 /* Invalid servername */
123#define ERRinvdevice 7 /* Invalid device */
124#define ERRqfull 49 /* Print queue full */
125#define ERRqtoobig 50 /* Queued item too big */
126#define ERRinvpfid 52 /* Invalid print file in smb_fid */
127#define ERRsmbcmd 64 /* Unrecognised command */
128#define ERRsrverror 65 /* smb server internal error */
129#define ERRfilespecs 67 /* fid and pathname invalid combination */
130#define ERRbadlink 68 /* reserved */
131#define ERRbadpermits 69 /* Access specified for a file is not valid */
132#define ERRbadpid 70 /* reserved */
133#define ERRsetattrmode 71 /* attribute mode invalid */
134#define ERRpaused 81 /* Message server paused */
135#define ERRmsgoff 82 /* Not receiving messages */
136#define ERRnoroom 83 /* No room for message */
137#define ERRrmuns 87 /* too many remote usernames */
138#define ERRtimeout 88 /* operation timed out */
139#define ERRnoresource 89 /* No resources currently available for request. */
140#define ERRtoomanyuids 90 /* too many userids */
141#define ERRbaduid 91 /* bad userid */
142#define ERRuseMPX 250 /* temporarily unable to use raw mode, use MPX mode */
143#define ERRuseSTD 251 /* temporarily unable to use raw mode, use standard mode */
144#define ERRcontMPX 252 /* resume MPX mode */
145#define ERRbadPW /* reserved */
146#define ERRnosupport 0xFFFF
147#define ERRunknownsmb 22 /* from NT 3.5 response */
148
149/* Error codes for the ERRHRD class */
150
151#define ERRnowrite 19 /* read only media */
152#define ERRbadunit 20 /* Unknown device */
153#define ERRnotready 21 /* Drive not ready */
154#define ERRbadcmd 22 /* Unknown command */
155#define ERRdata 23 /* Data (CRC) error */
156#define ERRbadreq 24 /* Bad request structure length */
157#define ERRseek 25
158#define ERRbadmedia 26
159#define ERRbadsector 27
160#define ERRnopaper 28
161#define ERRwrite 29 /* write fault */
162#define ERRread 30 /* read fault */
163#define ERRgeneral 31 /* General hardware failure */
164#define ERRwrongdisk 34
165#define ERRFCBunavail 35
166#define ERRsharebufexc 36 /* share buffer exceeded */
167#define ERRdiskfull 39
168
169
170/* these are win32 error codes. There are only a few places where
171 these matter for Samba, primarily in the NT printing code */
172#define WERR_OK W_ERROR(0)
173#define WERR_BADFUNC W_ERROR(1)
174#define WERR_BADFILE W_ERROR(2)
175#define WERR_ACCESS_DENIED W_ERROR(5)
176#define WERR_BADFID W_ERROR(6)
177#define WERR_NOMEM W_ERROR(8)
178#define WERR_GENERAL_FAILURE W_ERROR(31)
179#define WERR_NOT_SUPPORTED W_ERROR(50)
180#define WERR_DEVICE_NOT_EXIST W_ERROR(55)
181#define WERR_PRINTQ_FULL W_ERROR(61)
182#define WERR_NO_SPOOL_SPACE W_ERROR(62)
183#define WERR_NO_SUCH_SHARE W_ERROR(67)
184#define WERR_ALREADY_EXISTS W_ERROR(80)
185#define WERR_BAD_PASSWORD W_ERROR(86)
186#define WERR_INVALID_PARAM W_ERROR(87)
187#define WERR_SEM_TIMEOUT W_ERROR(121)
188#define WERR_INSUFFICIENT_BUFFER W_ERROR(122)
189#define WERR_INVALID_NAME W_ERROR(123)
190#define WERR_UNKNOWN_LEVEL W_ERROR(124)
191#define WERR_OBJECT_PATH_INVALID W_ERROR(161)
192#define WERR_NO_MORE_ITEMS W_ERROR(259)
193#define WERR_MORE_DATA W_ERROR(234)
194#define WERR_INVALID_OWNER W_ERROR(1307)
195#define WERR_IO_PENDING W_ERROR(997)
196#define WERR_CAN_NOT_COMPLETE W_ERROR(1003)
197#define WERR_INVALID_FLAGS W_ERROR(1004)
198#define WERR_REG_CORRUPT W_ERROR(1015)
199#define WERR_REG_IO_FAILURE W_ERROR(1016)
200#define WERR_REG_FILE_INVALID W_ERROR(1017)
201#define WERR_NO_SUCH_SERVICE W_ERROR(1060)
202#define WERR_INVALID_SERVICE_CONTROL W_ERROR(1052)
203#define WERR_SERVICE_DISABLED W_ERROR(1058)
204#define WERR_SERVICE_NEVER_STARTED W_ERROR(1077)
205#define WERR_MACHINE_LOCKED W_ERROR(1271)
206#define WERR_NO_LOGON_SERVERS W_ERROR(1311)
207#define WERR_LOGON_FAILURE W_ERROR(1326)
208#define WERR_NO_SUCH_DOMAIN W_ERROR(1355)
209#define WERR_INVALID_SECURITY_DESCRIPTOR W_ERROR(1338)
210#define WERR_TIME_SKEW W_ERROR(1398)
211#define WERR_EVENTLOG_FILE_CORRUPT W_ERROR(1500)
212#define WERR_SERVER_UNAVAILABLE W_ERROR(1722)
213#define WERR_INVALID_FORM_NAME W_ERROR(1902)
214#define WERR_INVALID_FORM_SIZE W_ERROR(1903)
215#define WERR_BUF_TOO_SMALL W_ERROR(2123)
216#define WERR_JOB_NOT_FOUND W_ERROR(2151)
217#define WERR_DEST_NOT_FOUND W_ERROR(2152)
218#define WERR_NOT_LOCAL_DOMAIN W_ERROR(2320)
219#define WERR_DOMAIN_CONTROLLER_NOT_FOUND W_ERROR(2453)
220#define WERR_STATUS_MORE_ENTRIES W_ERROR(0x0105)
221
222#define WERR_PRINTER_DRIVER_ALREADY_INSTALLED W_ERROR(ERRdriveralreadyinstalled)
223#define WERR_UNKNOWN_PORT W_ERROR(ERRunknownprinterport)
224#define WERR_UNKNOWN_PRINTER_DRIVER W_ERROR(ERRunknownprinterdriver)
225#define WERR_UNKNOWN_PRINTPROCESSOR W_ERROR(ERRunknownprintprocessor)
226#define WERR_INVALID_SEPARATOR_FILE W_ERROR(ERRinvalidseparatorfile)
227#define WERR_INVALID_PRIORITY W_ERROR(ERRinvalidjobpriority)
228#define WERR_INVALID_PRINTER_NAME W_ERROR(ERRinvalidprintername)
229#define WERR_PRINTER_ALREADY_EXISTS W_ERROR(ERRprinteralreadyexists)
230#define WERR_INVALID_PRINTER_COMMAND W_ERROR(ERRinvalidprintercommand)
231#define WERR_INVALID_DATATYPE W_ERROR(ERRinvaliddatatype)
232#define WERR_INVALID_ENVIRONMENT W_ERROR(ERRinvalidenvironment)
233
234#define WERR_UNKNOWN_PRINT_MONITOR W_ERROR(ERRunknownprintmonitor)
235#define WERR_PRINTER_DRIVER_IN_USE W_ERROR(ERRprinterdriverinuse)
236#define WERR_SPOOL_FILE_NOT_FOUND W_ERROR(ERRspoolfilenotfound)
237#define WERR_SPL_NO_STARTDOC W_ERROR(ERRnostartdoc)
238#define WERR_SPL_NO_ADDJOB W_ERROR(ERRnoaddjob)
239#define WERR_PRINT_PROCESSOR_ALREADY_INSTALLED W_ERROR(ERRprintprocessoralreadyinstalled)
240#define WERR_PRINT_MONITOR_ALREADY_INSTALLED W_ERROR(ERRprintmonitoralreadyinstalled)
241#define WERR_INVALID_PRINT_MONITOR W_ERROR(ERRinvalidprintmonitor)
242#define WERR_PRINT_MONITOR_IN_USE W_ERROR(ERRprintmonitorinuse)
243#define WERR_PRINTER_HAS_JOBS_QUEUED W_ERROR(ERRprinterhasjobsqueued)
244
245/* Configuration Manager Errors */
246/* Basically Win32 errors meanings are specific to the \ntsvcs pipe */
247
248#define WERR_CM_NO_MORE_HW_PROFILES W_ERROR(35)
249#define WERR_CM_NO_SUCH_VALUE W_ERROR(37)
250
251
252/* DFS errors */
253
254#ifndef NERR_BASE
255#define NERR_BASE (2100)
256#endif
257
258#define WERR_DFS_NO_SUCH_VOL W_ERROR(NERR_BASE+562)
259#define WERR_DFS_NO_SUCH_SHARE W_ERROR(NERR_BASE+565)
260#define WERR_DFS_NO_SUCH_SERVER W_ERROR(NERR_BASE+573)
261#define WERR_DFS_INTERNAL_ERROR W_ERROR(NERR_BASE+590)
262#define WERR_DFS_CANT_CREATE_JUNCT W_ERROR(NERR_BASE+569)
263
264#define WERR_NET_NAME_NOT_FOUND W_ERROR(NERR_BASE+210)
265
266
267#endif /* _DOSERR_H */
Note: See TracBrowser for help on using the repository browser.