xref: /titanic_50/usr/src/uts/common/smb/doserror.h (revision e58a33b62cd4c9a6815fd752ce58b5f389289da1)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
24  */
25 
26 #ifndef _SMB_DOSERROR_H
27 #define	_SMB_DOSERROR_H
28 
29 /*
30  * This file defines the list of DOS error codes. I think the error
31  * codes are divided into different classes, which is why there are
32  * duplicate values.
33  */
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 
40 /*
41  * Error source or class
42  */
43 #define	ERRDOS		0x01	/* Core DOS operating system error. */
44 #define	ERRSRV		0x02	/* Server network file error */
45 #define	ERRHRD		0x03	/* Hardware error */
46 #define	ERRCMD		0xFF	/* Command was not in the "SMB" format. */
47 
48 
49 /*
50  * ERRDOS error codes
51  */
52 #define	ERRbadfunc	1	/* Invalid function. */
53 #define	ERRbadfile	2	/* File not found (last component) */
54 #define	ERRbadpath	3	/* path not found (directory part) */
55 #define	ERRnofids	4	/* Too many open files. */
56 #define	ERRnoaccess	5	/* Access denied. */
57 #define	ERRbadfid	6	/* Invalid file handle. */
58 #define	ERRbadmcb	7	/* Memory control blocks destroyed. */
59 #define	ERRnomem	8	/* Insufficient memory. */
60 #define	ERRbadmem	9	/* Invalid memory block address. */
61 #define	ERRbadenv	10	/* Invalid environment. */
62 #define	ERRbadformat	11	/* Invalid format. */
63 #define	ERRbadaccess	12	/* Invalid open mode. */
64 #define	ERRbaddata	13	/* Invalid data (from IOCTL calls) */
65 #define	ERRbaddrive	15	/* Invalid drive specified. */
66 #define	ERRremcd	16	/* Attempted to delete current directory. */
67 #define	ERRdiffdevice	17	/* Not same device (cross volume rename) */
68 #define	ERRnofiles	18	/* File search found no more files. */
69 #define	ERRbadshare	32	/* Share mode conflict with existing open. */
70 #define	ERRlock		33	/* Lock conflict with existing lock, etc. */
71 #define	ERRdiskfull	39	/* No space left on device. */
72 #define	ERRfilexists	80	/* Requested file name already exists. */
73 
74 /*
75  * These are compatible with the MS header files, but the
76  * smb/nterror.h names for these are preferred.
77  */
78 #define	ERRbadpipe	230	/* See ERROR_BAD_PIPE (named pipe invalid) */
79 #define	ERRpipebusy	231	/* See ERROR_PIPE_BUSY (all instances busy) */
80 #define	ERRpipeclosing	232	/* See ERROR_NO_DATA (pipe closing) */
81 #define	ERRnotconnected	233	/* See ERROR_PIPE_NOT_CONNECTED */
82 #define	ERRmoredata	234	/* See ERROR_MORE_DATA (pipe has more) */
83 
84 
85 /*
86  * ERRSRV error codes
87  */
88 #define	ERRerror	1	/* Non-specific error code. */
89 #define	ERRbadpw	2	/* Bad password (tree connect, etc) */
90 #define	ERRbadtype	3	/* reserved */
91 #define	ERRaccess	4	/* access denied */
92 #define	ERRinvnid	5	/* Invalid tree ID */
93 #define	ERRinvnetname	6	/* Invalid network name (tree connect) */
94 #define	ERRinvdevice	7	/* Invalid device (print jobs, etc.) */
95 #define	ERRqfull	49	/* Print queue full (files) */
96 #define	ERRqtoobig	50	/* Print queue full (no space) */
97 #define	ERRqeof		51	/* EOF on print queue dump. */
98 #define	ERRinvpfid	52	/* Invalid print file FID. */
99 #define	ERRsmbcmd	64	/* Server did not recognize the command. */
100 #define	ERRsrverror	65	/* Server encountered an internal error. */
101 #define	ERRfilespecs	67	/* FID and path param combination is bad. */
102 #define	ERRbadpermits	69	/* Access permissions invalid (SetF*) */
103 #define	ERRsetattrmode	71	/* Attribute mode invalid (SetF*) */
104 #define	ERRpaused	81	/* Server is paused. */
105 #define	ERRmsgoff	82	/* Not receiving messages. */
106 #define	ERRnoroom	83	/* No room to buffer message. */
107 #define	ERRrmuns	87	/* Too many remote user names (messaging) */
108 #define	ERRtimeout	88	/* Operation timed out. */
109 #define	ERRnoresource	89	/* No resources available for request. */
110 #define	ERRtoomanyuids	90	/* Too many UIDs active on connection. */
111 #define	ERRbaduid	91	/* UID is not valid. */
112 
113 #define	ERRusempx	250	/* Temporarily unable to support Raw, */
114 				/* use MPX mode */
115 #define	ERRusestd	251	/* Temporarily unable to support Raw, */
116 				/* use stdandard r/w */
117 #define	ERRcontmpx	252	/* Continue in MPX mode */
118 
119 #define	ERRnosupport	0xffff	/* Function not supported. */
120 
121 
122 /*
123  * ERRHRD error codes
124  */
125 #define	ERRnowrite	19	/* Attempt to write on write-protected media */
126 #define	ERRbadunit	20	/* Unknown unit. */
127 #define	ERRnotready	21	/* Drive not ready. */
128 #define	ERRbadcmd	22	/* Unknown command. */
129 #define	ERRdata		23	/* Data error (CRC). */
130 #define	ERRbadreq	24	/* Bad request structure length. */
131 #define	ERRseek		25	/* Seek error. */
132 #define	ERRbadmedia	26	/* Unknown media type. */
133 #define	ERRbadsector	27	/* Sector not found. */
134 #define	ERRnopaper	28	/* Printer out of paper. */
135 #define	ERRwrite	29	/* Write fault. */
136 #define	ERRread		30	/* Read fault. */
137 #define	ERRgeneral	31	/* General failure. */
138 /*	ERRbadshare	32	Same as for DOSERR (see above) */
139 /*	ERRlock		33	Same as for DOSERR (see above) */
140 #define	ERRwrongdisk	34	/* The wrong disk was found in a drive. */
141 #define	ERRFCBUnavail	35	/* No FCBs are available to process request. */
142 #define	ERRsharebufexc	36	/* A sharing buffer has been exceeded. */
143 
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 #endif /* _SMB_DOSERROR_H */
150