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 * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 27 #ifndef _SMBSRV_DOSERROR_H 28 #define _SMBSRV_DOSERROR_H 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 /* 33 * This file defines the list of DOS error codes. I think the error 34 * codes are divided into different classes, which is why there are 35 * duplicate values. 36 */ 37 38 #ifdef __cplusplus 39 extern "C" { 40 #endif 41 42 43 /* 44 * Error source or class 45 */ 46 #define SUCCESS 0x00 /* The request was successful. */ 47 #define ERRDOS 0x01 /* Core DOS operating system error. */ 48 #define ERRSRV 0x02 /* Server network file error */ 49 #define ERRHRD 0x03 /* Hardware error */ 50 #define ERRCMD 0xFF /* Command was not in the "SMB" format. */ 51 52 53 /* 54 * ERRDOS error codes 55 */ 56 #define ERRbadfunc 1 /* Invalid function. The server did not */ 57 #define ERRbadfile 2 /* File not found. The last component of a */ 58 #define ERRbadpath 3 /* Directory invalid. A directory component in */ 59 #define ERRnofids 4 /* Too many open files. The server has no file */ 60 #define ERRnoaccess 5 /* Access denied, the client's context does not */ 61 #define ERRbadfid 6 /* Invalid file handle. The file handle */ 62 #define ERRbadmcb 7 /* Memory control blocks destroyed. */ 63 #define ERRnomem 8 /* Insufficient server memory to perform the */ 64 #define ERRbadmem 9 /* Invalid memory block address. */ 65 #define ERRbadenv 10 /* Invalid environment. */ 66 #define ERRbadformat 11 /* Invalid format. */ 67 #define ERRbadaccess 12 /* Invalid open mode. */ 68 #define ERRbaddata 13 /* Invalid data (generated only by IOCTL calls */ 69 #define ERRbaddrive 15 /* Invalid drive specified. */ 70 #define ERRremcd 16 /* A Delete Directory request attempted to */ 71 #define ERRdiffdevice 17 /* Not same device (e.g., a cross volume rename */ 72 #define ERRnofiles 18 /* A File Search command can find no more files */ 73 #define ERRbadshare 32 /* The sharing mode specified for an Open */ 74 #define ERRlock 33 /* A Lock request conflicted with an existing */ 75 #define ERRfilexists 80 /* The file named in a Create Directory, Make */ 76 #define ERRnotlocked 158 /* No lock matched the unlock range */ 77 #define ERRnoatomiclocks 174 /* Change lock type not supported */ 78 #define ERRbadpipe 230 /* Pipe invalid. */ 79 #define ERRpipebusy 231 /* All instances of the requested pipe are busy. */ 80 #define ERRpipeclosing 232 /* Pipe close in progress. */ 81 #define ERRnotconnected 233 /* No process on other end of pipe. */ 82 #define ERRmoredata 234 /* There is more data to be returned. */ 83 #define ERRunknownlevel 124 84 85 86 /* 87 * ERRSRV error codes 88 */ 89 #define ERRerror 1 /* Non-specific error code. It is returned */ 90 #define ERRbadpw 2 /* Bad password - name/password pair in a Tree */ 91 #define ERRaccess 4 /* The client does not have the necessary access */ 92 #define ERRinvnid 5 /* The Tid specified in a command was invalid. */ 93 #define ERRinvnetname 6 /* Invalid network name in tree connect. */ 94 #define ERRinvdevice 7 /* Invalid device - printer request made to non- */ 95 #define ERRqfull 49 /* Print queue full (files) -- returned by open */ 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 /* The server did not recognize the command */ 100 #define ERRsrverror 65 /* The server encountered an internal error, */ 101 #define ERRfilespecs 67 /* The Fid and pathname parameters contained an */ 102 #define ERRbadpermits 69 /* The access permissions specified for a file */ 103 #define ERRsetattrmode 71 /* The attribute mode in the Set File Attribute */ 104 #define ERRpaused 81 /* Server is paused. (reserved for messaging) */ 105 #define ERRmsgoff 82 /* Not receiving messages. (reserved for */ 106 #define ERRnoroom 83 /* No room to buffer message. (reserved for */ 107 #define ERRrmuns 87 /* Too many remote user names. (reserved for */ 108 #define ERRtimeout 88 /* Operation timed out. */ 109 #define ERRnoresource 89 /* No resources currently available for request. */ 110 #define ERRtoomanyuids 90 /* Too many Uids active on this session. */ 111 #define ERRbaduid 91 /* The Uid is not known as a valid user */ 112 #define ERRusempx 250 /* Temporarily unable to support Raw, use MPX */ 113 #define ERRusestd 251 /* Temporarily unable to support Raw, use */ 114 #define ERRcontmpx 252 /* Continue in MPX mode. */ 115 #define ERRnosupport 65535 /* Function not supported. */ 116 117 118 /* 119 * ERRHRD error codes 120 */ 121 #define ERRnowrite 19 /* Attempt to write on write-protected media */ 122 #define ERRbadunit 20 /* Unknown unit. */ 123 #define ERRnotready 21 /* Drive not ready. */ 124 #define ERRbadcmd 22 /* Unknown command. */ 125 #define ERRdata 23 /* Data error (CRC). */ 126 #define ERRbadreq 24 /* Bad request structure length. */ 127 #define ERRseek 25 /* Seek error. */ 128 #define ERRbadmedia 26 /* Unknown media type. */ 129 #define ERRbadsector 27 /* Sector not found. */ 130 #define ERRnopaper 28 /* Printer out of paper. */ 131 #define ERRwrite 29 /* Write fault. */ 132 #define ERRread 30 /* Read fault. */ 133 #define ERRgeneral 31 /* General failure. */ 134 #define ERRbadshare 32 /* A open conflicts with an existing open. */ 135 #define ERRlock 33 /* A Lock request conflicted with an existing */ 136 #define ERRwrongdisk 34 /* The wrong disk was found in a drive. */ 137 #define ERRFCBUnavail 35 /* No FCBs are available to process request. */ 138 #define ERRsharebufexc 36 /* A sharing buffer has been exceeded. */ 139 140 141 #ifdef __cplusplus 142 } 143 #endif 144 145 #endif /* _SMBSRV_DOSERROR_H */ 146