1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * fs/cifs/smberr.h 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Copyright (c) International Business Machines Corp., 2002,2004 5*4882a593Smuzhiyun * Author(s): Steve French (sfrench@us.ibm.com) 6*4882a593Smuzhiyun * 7*4882a593Smuzhiyun * See Error Codes section of the SNIA CIFS Specification 8*4882a593Smuzhiyun * for more information 9*4882a593Smuzhiyun * 10*4882a593Smuzhiyun * This library is free software; you can redistribute it and/or modify 11*4882a593Smuzhiyun * it under the terms of the GNU Lesser General Public License as published 12*4882a593Smuzhiyun * by the Free Software Foundation; either version 2.1 of the License, or 13*4882a593Smuzhiyun * (at your option) any later version. 14*4882a593Smuzhiyun * 15*4882a593Smuzhiyun * This library is distributed in the hope that it will be useful, 16*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 18*4882a593Smuzhiyun * the GNU Lesser General Public License for more details. 19*4882a593Smuzhiyun * 20*4882a593Smuzhiyun * You should have received a copy of the GNU Lesser General Public License 21*4882a593Smuzhiyun * along with this library; if not, write to the Free Software 22*4882a593Smuzhiyun * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23*4882a593Smuzhiyun */ 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun #define SUCCESS 0x00 /* The request was successful. */ 26*4882a593Smuzhiyun #define ERRDOS 0x01 /* Error is from the core DOS operating system set */ 27*4882a593Smuzhiyun #define ERRSRV 0x02 /* Error is generated by the file server daemon */ 28*4882a593Smuzhiyun #define ERRHRD 0x03 /* Error is a hardware error. */ 29*4882a593Smuzhiyun #define ERRCMD 0xFF /* Command was not in the "SMB" format. */ 30*4882a593Smuzhiyun 31*4882a593Smuzhiyun /* The following error codes may be generated with the SUCCESS error class.*/ 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun /*#define SUCCESS 0 The request was successful. */ 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun /* The following error codes may be generated with the ERRDOS error class.*/ 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun #define ERRbadfunc 1 /* Invalid function. The server did not 38*4882a593Smuzhiyun recognize or could not perform a 39*4882a593Smuzhiyun system call generated by the server, 40*4882a593Smuzhiyun e.g., set the DIRECTORY attribute on 41*4882a593Smuzhiyun a data file, invalid seek mode. */ 42*4882a593Smuzhiyun #define ERRbadfile 2 /* File not found. The last component 43*4882a593Smuzhiyun of a file's pathname could not be 44*4882a593Smuzhiyun found. */ 45*4882a593Smuzhiyun #define ERRbadpath 3 /* Directory invalid. A directory 46*4882a593Smuzhiyun component in a pathname could not be 47*4882a593Smuzhiyun found. */ 48*4882a593Smuzhiyun #define ERRnofids 4 /* Too many open files. The server has 49*4882a593Smuzhiyun no file handles available. */ 50*4882a593Smuzhiyun #define ERRnoaccess 5 /* Access denied, the client's context 51*4882a593Smuzhiyun does not permit the requested 52*4882a593Smuzhiyun function. This includes the 53*4882a593Smuzhiyun following conditions: invalid rename 54*4882a593Smuzhiyun command, write to Fid open for read 55*4882a593Smuzhiyun only, read on Fid open for write 56*4882a593Smuzhiyun only, attempt to delete a non-empty 57*4882a593Smuzhiyun directory */ 58*4882a593Smuzhiyun #define ERRbadfid 6 /* Invalid file handle. The file handle 59*4882a593Smuzhiyun specified was not recognized by the 60*4882a593Smuzhiyun server. */ 61*4882a593Smuzhiyun #define ERRbadmcb 7 /* Memory control blocks destroyed. */ 62*4882a593Smuzhiyun #define ERRnomem 8 /* Insufficient server memory to 63*4882a593Smuzhiyun perform the requested function. */ 64*4882a593Smuzhiyun #define ERRbadmem 9 /* Invalid memory block address. */ 65*4882a593Smuzhiyun #define ERRbadenv 10 /* Invalid environment. */ 66*4882a593Smuzhiyun #define ERRbadformat 11 /* Invalid format. */ 67*4882a593Smuzhiyun #define ERRbadaccess 12 /* Invalid open mode. */ 68*4882a593Smuzhiyun #define ERRbaddata 13 /* Invalid data (generated only by 69*4882a593Smuzhiyun IOCTL calls within the server). */ 70*4882a593Smuzhiyun #define ERRbaddrive 15 /* Invalid drive specified. */ 71*4882a593Smuzhiyun #define ERRremcd 16 /* A Delete Directory request attempted 72*4882a593Smuzhiyun to remove the server's current 73*4882a593Smuzhiyun directory. */ 74*4882a593Smuzhiyun #define ERRdiffdevice 17 /* Not same device (e.g., a cross 75*4882a593Smuzhiyun volume rename was attempted */ 76*4882a593Smuzhiyun #define ERRnofiles 18 /* A File Search command can find no 77*4882a593Smuzhiyun more files matching the specified 78*4882a593Smuzhiyun criteria. */ 79*4882a593Smuzhiyun #define ERRwriteprot 19 /* media is write protected */ 80*4882a593Smuzhiyun #define ERRgeneral 31 81*4882a593Smuzhiyun #define ERRbadshare 32 /* The sharing mode specified for an 82*4882a593Smuzhiyun Open conflicts with existing FIDs on 83*4882a593Smuzhiyun the file. */ 84*4882a593Smuzhiyun #define ERRlock 33 /* A Lock request conflicted with an 85*4882a593Smuzhiyun existing lock or specified an 86*4882a593Smuzhiyun invalid mode, or an Unlock requested 87*4882a593Smuzhiyun attempted to remove a lock held by 88*4882a593Smuzhiyun another process. */ 89*4882a593Smuzhiyun #define ERRunsup 50 90*4882a593Smuzhiyun #define ERRnosuchshare 67 91*4882a593Smuzhiyun #define ERRfilexists 80 /* The file named in the request 92*4882a593Smuzhiyun already exists. */ 93*4882a593Smuzhiyun #define ERRinvparm 87 94*4882a593Smuzhiyun #define ERRdiskfull 112 95*4882a593Smuzhiyun #define ERRinvname 123 96*4882a593Smuzhiyun #define ERRinvlevel 124 97*4882a593Smuzhiyun #define ERRdirnotempty 145 98*4882a593Smuzhiyun #define ERRnotlocked 158 99*4882a593Smuzhiyun #define ERRcancelviolation 173 100*4882a593Smuzhiyun #define ERRalreadyexists 183 101*4882a593Smuzhiyun #define ERRbadpipe 230 102*4882a593Smuzhiyun #define ERRpipebusy 231 103*4882a593Smuzhiyun #define ERRpipeclosing 232 104*4882a593Smuzhiyun #define ERRnotconnected 233 105*4882a593Smuzhiyun #define ERRmoredata 234 106*4882a593Smuzhiyun #define ERReasnotsupported 282 107*4882a593Smuzhiyun #define ErrQuota 0x200 /* The operation would cause a quota 108*4882a593Smuzhiyun limit to be exceeded. */ 109*4882a593Smuzhiyun #define ErrNotALink 0x201 /* A link operation was performed on a 110*4882a593Smuzhiyun pathname that was not a link. */ 111*4882a593Smuzhiyun 112*4882a593Smuzhiyun /* Below errors are used internally (do not come over the wire) for passthrough 113*4882a593Smuzhiyun from STATUS codes to POSIX only */ 114*4882a593Smuzhiyun #define ERRsymlink 0xFFFD 115*4882a593Smuzhiyun #define ErrTooManyLinks 0xFFFE 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun /* Following error codes may be generated with the ERRSRV error class.*/ 118*4882a593Smuzhiyun 119*4882a593Smuzhiyun #define ERRerror 1 /* Non-specific error code. It is 120*4882a593Smuzhiyun returned under the following 121*4882a593Smuzhiyun conditions: resource other than disk 122*4882a593Smuzhiyun space exhausted (e.g. TIDs), first 123*4882a593Smuzhiyun SMB command was not negotiate, 124*4882a593Smuzhiyun multiple negotiates attempted, and 125*4882a593Smuzhiyun internal server error. */ 126*4882a593Smuzhiyun #define ERRbadpw 2 /* Bad password - name/password pair in 127*4882a593Smuzhiyun a TreeConnect or Session Setup are 128*4882a593Smuzhiyun invalid. */ 129*4882a593Smuzhiyun #define ERRbadtype 3 /* used for indicating DFS referral 130*4882a593Smuzhiyun needed */ 131*4882a593Smuzhiyun #define ERRaccess 4 /* The client does not have the 132*4882a593Smuzhiyun necessary access rights within the 133*4882a593Smuzhiyun specified context for requested 134*4882a593Smuzhiyun function. */ 135*4882a593Smuzhiyun #define ERRinvtid 5 /* The Tid specified in a command was 136*4882a593Smuzhiyun invalid. */ 137*4882a593Smuzhiyun #define ERRinvnetname 6 /* Invalid network name in tree 138*4882a593Smuzhiyun connect. */ 139*4882a593Smuzhiyun #define ERRinvdevice 7 /* Invalid device - printer request 140*4882a593Smuzhiyun made to non-printer connection or 141*4882a593Smuzhiyun non-printer request made to printer 142*4882a593Smuzhiyun connection. */ 143*4882a593Smuzhiyun #define ERRqfull 49 /* Print queue full (files) -- returned 144*4882a593Smuzhiyun by open print file. */ 145*4882a593Smuzhiyun #define ERRqtoobig 50 /* Print queue full -- no space. */ 146*4882a593Smuzhiyun #define ERRqeof 51 /* EOF on print queue dump */ 147*4882a593Smuzhiyun #define ERRinvpfid 52 /* Invalid print file FID. */ 148*4882a593Smuzhiyun #define ERRsmbcmd 64 /* The server did not recognize the 149*4882a593Smuzhiyun command received. */ 150*4882a593Smuzhiyun #define ERRsrverror 65 /* The server encountered an internal 151*4882a593Smuzhiyun error, e.g., system file 152*4882a593Smuzhiyun unavailable. */ 153*4882a593Smuzhiyun #define ERRbadBID 66 /* (obsolete) */ 154*4882a593Smuzhiyun #define ERRfilespecs 67 /* The Fid and pathname parameters 155*4882a593Smuzhiyun contained an invalid combination of 156*4882a593Smuzhiyun values. */ 157*4882a593Smuzhiyun #define ERRbadLink 68 /* (obsolete) */ 158*4882a593Smuzhiyun #define ERRbadpermits 69 /* The access permissions specified for 159*4882a593Smuzhiyun a file or directory are not a valid 160*4882a593Smuzhiyun combination. */ 161*4882a593Smuzhiyun #define ERRbadPID 70 162*4882a593Smuzhiyun #define ERRsetattrmode 71 /* attribute (mode) is invalid */ 163*4882a593Smuzhiyun #define ERRpaused 81 /* Server is paused */ 164*4882a593Smuzhiyun #define ERRmsgoff 82 /* reserved - messaging off */ 165*4882a593Smuzhiyun #define ERRnoroom 83 /* reserved - no room for message */ 166*4882a593Smuzhiyun #define ERRrmuns 87 /* reserved - too many remote names */ 167*4882a593Smuzhiyun #define ERRtimeout 88 /* operation timed out */ 168*4882a593Smuzhiyun #define ERRnoresource 89 /* No resources available for request 169*4882a593Smuzhiyun */ 170*4882a593Smuzhiyun #define ERRtoomanyuids 90 /* Too many UIDs active on this session 171*4882a593Smuzhiyun */ 172*4882a593Smuzhiyun #define ERRbaduid 91 /* The UID is not known as a valid user 173*4882a593Smuzhiyun */ 174*4882a593Smuzhiyun #define ERRusempx 250 /* temporarily unable to use raw */ 175*4882a593Smuzhiyun #define ERRusestd 251 /* temporarily unable to use either raw 176*4882a593Smuzhiyun or mpx */ 177*4882a593Smuzhiyun #define ERR_NOTIFY_ENUM_DIR 1024 178*4882a593Smuzhiyun #define ERRnoSuchUser 2238 /* user account does not exist */ 179*4882a593Smuzhiyun #define ERRaccountexpired 2239 180*4882a593Smuzhiyun #define ERRbadclient 2240 /* can not logon from this client */ 181*4882a593Smuzhiyun #define ERRbadLogonTime 2241 /* logon hours do not allow this */ 182*4882a593Smuzhiyun #define ERRpasswordExpired 2242 183*4882a593Smuzhiyun #define ERRnetlogonNotStarted 2455 184*4882a593Smuzhiyun #define ERRnosupport 0xFFFF 185