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