KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > alfresco > filesys > smb > SMBStatus


1 /*
2  * Copyright (C) 2005 Alfresco, Inc.
3  *
4  * Licensed under the Mozilla Public License version 1.1
5  * with a permitted attribution clause. You may obtain a
6  * copy of the License at
7  *
8  * http://www.alfresco.org/legal/license.txt
9  *
10  * Unless required by applicable law or agreed to in writing,
11  * software distributed under the License is distributed on an
12  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
13  * either express or implied. See the License for the specific
14  * language governing permissions and limitations under the
15  * License.
16  */

17 package org.alfresco.filesys.smb;
18
19 /**
20  * SMB status code class.
21  * <p>
22  * The SMBStatus class contains the error class and error code values that a remote server may
23  * return.
24  * <p>
25  * The available error classes are defined below :-
26  * <p>
27  * <table border="1" cellpadding="0" cellspacing="0" width="80%">
28  * <tr>
29  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.Succes</td>
30  * <td width="75%">Indicates that an SMB request was successful</td>
31  * </tr>
32  * <tr>
33  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.ErrDOS</td>
34  * <td width="75%">Error is from the DOS operating system set</td>
35  * </tr>
36  * <tr>
37  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.ErrSrv</td>
38  * <td width="75%">Error is from the server network file manager</td>
39  * </tr>
40  * <tr>
41  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.ErrHrd</td>
42  * <td width="75%">Error is a hardware type error</td>
43  * </tr>
44  * <tr>
45  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.ErrCmd</td>
46  * <td width="75%">Command was not in the SMB format</td>
47  * </tr>
48  * <tr>
49  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.NetErr</td>
50  * <td width="75%">Errors returned by SMB transactions</td>
51  * </tr>
52  * <tr>
53  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.NTErr</td>
54  * <td width="75%">32 bit errors returned when NT dialect is in use</td>
55  * </tr>
56  * <tr>
57  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.DCERPCErr</td>
58  * <td width="75%">Errors returned by DCE/RPC requests</td>
59  * </tr>
60  * <tr>
61  * <td width="25%" bgcolor="#F4F5C7">SMBStatus.JLANErr</td>
62  * <td width="75%">JLAN error codes</td>
63  * </tr>
64  * </table>
65  */

66 public final class SMBStatus
67 {
68
69     // Error classes
70

71     public static final int Success = 0x00;
72     public static final int ErrDos = 0x01;
73     public static final int ErrSrv = 0x02;
74     public static final int ErrHrd = 0x03;
75     public static final int NetErr = 0x04;
76     public static final int JLANErr = 0x05;
77     public static final int NTErr = 0x06;
78     public static final int DCERPCErr = 0x07;
79     public static final int Win32Err = 0x08;
80
81     public static final int ErrCmd = 0xFF;
82
83     // Mask for NT severity
84

85     public static final int NT_SEVERITY_MASK = 0xF0000000;
86     public static final int NT_ERROR_MASK = 0x0FFFFFFF;
87
88     // DOS error codes.
89

90     public static final int DOSInvalidFunc = 1;
91     public static final int DOSFileNotFound = 2;
92     public static final int DOSDirectoryInvalid = 3;
93     public static final int DOSTooManyOpenFiles = 4;
94     public static final int DOSAccessDenied = 5;
95     public static final int DOSInvalidHandle = 6;
96     public static final int DOSMemCtrlBlkDestoyed = 7;
97     public static final int DOSInsufficientMem = 8;
98     public static final int DOSInvalidAddress = 9;
99     public static final int DOSInvalidEnv = 10;
100     public static final int DOSInvalidFormat = 11;
101     public static final int DOSInvalidOpenMode = 12;
102     public static final int DOSInvalidData = 13;
103     public static final int DOSInvalidDrive = 15;
104     public static final int DOSDeleteSrvDir = 16;
105     public static final int DOSNotSameDevice = 17;
106     public static final int DOSNoMoreFiles = 18;
107     public static final int DOSFileSharingConflict = 32;
108     public static final int DOSLockConflict = 33;
109     public static final int DOSFileAlreadyExists = 80;
110     public static final int DOSUnknownInfoLevel = 124;
111     public static final int DOSDirectoryNotEmpty = 145;
112     public static final int DOSNotLocked = 158;
113
114     // Server error codes
115

116     public static final int SRVNonSpecificError = 1;
117     public static final int SRVBadPassword = 2;
118     public static final int SRVNoAccessRights = 4;
119     public static final int SRVInvalidTID = 5;
120     public static final int SRVInvalidNetworkName = 6;
121     public static final int SRVInvalidDevice = 7;
122     public static final int SRVPrintQueueFullFiles = 49;
123     public static final int SRVPrintQueueFullSpace = 50;
124     public static final int SRVEOFOnPrintQueueDump = 51;
125     public static final int SRVInvalidPrintFID = 52;
126     public static final int SRVUnrecognizedCommand = 64;
127     public static final int SRVInternalServerError = 65;
128     public static final int SRVFIDAndPathInvalid = 67;
129     public static final int SRVInvalidAccessPerm = 69;
130     public static final int SRVInvalidAttributeMode = 70;
131     public static final int SRVServerPaused = 81;
132     public static final int SRVNotReceivingMessages = 82;
133     public static final int SRVNoBuffers = 83;
134     public static final int SRVTooManyRemoteNames = 87;
135     public static final int SRVTimedOut = 88;
136     public static final int SRVNoResourcesAvailable = 89;
137     public static final int SRVTooManyUIDs = 90;
138     public static final int SRVInvalidUID = 91;
139     public static final int SRVNoRAWUseMPX = 250;
140     public static final int SRVNoRAWUseStdReadWrite = 251;
141     public static final int SRVContinueInMPXMode = 252;
142     public static final int SRVNotSupported = 65535;
143
144     // Hardware error codes.
145

146     public static final int HRDWriteProtected = 19;
147     public static final int HRDUnknownUnit = 20;
148     public static final int HRDDriveNotReady = 21;
149     public static final int HRDUnknownCommand = 22;
150     public static final int HRDDataError = 23;
151     public static final int HRDBadRequestLength = 24;
152     public static final int HRDSeekError = 25;
153     public static final int HRDUnknownMediaType = 26;
154     public static final int HRDSectorNotFound = 27;
155     public static final int HRDPrinterOutOfPaper = 28;
156     public static final int HRDWriteFault = 29;
157     public static final int HRDReadFault = 30;
158     public static final int HRDGeneralFailure = 31;
159     public static final int HRDOpenConflict = 32;
160     public static final int HRDLockConflict = 33;
161     public static final int HRDWrongDiskInDrive = 34;
162     public static final int HRDNoFCBsAvailable = 35;
163     public static final int HRDSharingBufferOverrun = 36;
164
165     // Network error codes
166

167     public static final int NETAccessDenied = 5;
168     public static final int NETInvalidHandle = 6;
169     public static final int NETUnsupported = 50;
170     public static final int NETNetAccessDenied = 65;
171     public static final int NETBadDeviceType = 66;
172     public static final int NETBadNetworkName = 67;
173     public static final int NETAlreadyAssigned = 85;
174     public static final int NETInvalidPassword = 86;
175     public static final int NETInvParameter = 87;
176     public static final int NETContinued = 234;
177     public static final int NETNoMoreItems = 259;
178     public static final int NETInvalidAddress = 487;
179     public static final int NETServiceDoesNotExist = 1060;
180     public static final int NETBadDevice = 1200;
181     public static final int NETNoNetOrBadPath = 1203;
182     public static final int NETExtendedError = 1208;
183     public static final int NETNoNetwork = 1222;
184     public static final int NETCancelled = 1223;
185     public static final int NETSrvNotRunning = 2114;
186     public static final int NETBufferTooSmall = 2123;
187     public static final int NETNoTransactions = 2141;
188     public static final int NETInvQueueName = 2150;
189     public static final int NETNoSuchPrintJob = 2151;
190     public static final int NETNotResponding = 2160;
191     public static final int NETSpoolerNotStarted = 2161;
192     public static final int NETCannotPerformOp = 2164;
193     public static final int NETErrLoadLogonScript = 2212;
194     public static final int NETLogonNotValidated = 2214;
195     public static final int NETLogonSrvOldSoftware = 2217;
196     public static final int NETUserNameNotFound = 2221;
197     public static final int NETUserLgnWkNotAllowed = 2240;
198     public static final int NETUserLgnTimeNotAllowed = 2241;
199     public static final int NETUserPasswordExpired = 2242;
200     public static final int NETPasswordCannotChange = 2243;
201     public static final int NETPasswordTooShort = 2246;
202
203     // JLAN error codes
204

205     public static final int JLANUnsupportedDevice = 1;
206     public static final int JLANNoMoreSessions = 2;
207     public static final int JLANSessionNotActive = 3;
208     public static final int JLANInvalidSMBReceived = 4;
209     public static final int JLANLargeFilesNotSupported = 5;
210     public static final int JLANInvalidFileInfo = 6;
211     public static final int JLANDceRpcNotSupported = 7;
212
213     // NT 32-bit status code
214

215     public static final int NTSuccess = 0;
216
217     public static final int NTNotImplemented = 0xC0000002;
218     public static final int NTInvalidInfoClass = 0xC0000003;
219     public static final int NTInvalidParameter = 0xC000000D;
220     public static final int NTNoSuchFile = 0xC000000F;
221     public static final int NTInvalidDeviceRequest = 0xC0000010;
222     public static final int NTMoreProcessingRequired = 0xC0000016;
223     public static final int NTAccessDenied = 0xC0000022;
224     public static final int NTBufferTooSmall = 0xC0000023;
225     public static final int NTObjectNameInvalid = 0xC0000033;
226     public static final int NTObjectNotFound = 0xC0000034;
227     public static final int NTObjectNameCollision = 0xC0000035;
228     public static final int NTObjectPathNotFound = 0xC000003A;
229     public static final int NTSharingViolation = 0xC0000043;
230     public static final int NTLockConflict = 0xC0000054;
231     public static final int NTLockNotGranted = 0xC0000055;
232     public static final int NTLogonFailure = 0xC000006D;
233     public static final int NTAccountDisabled = 0xC0000072;
234     public static final int NTNoneMapped = 0xC0000073;
235     public static final int NTInvalidSecDescriptor = 0xC0000079;
236     public static final int NTRangeNotLocked = 0xC000007E;
237     public static final int NTDiskFull = 0xC000007F;
238     public static final int NTPipeBusy = 0xC00000AE;
239     public static final int NTNotSupported = 0xC00000BB;
240     public static final int NTBadDeviceType = 0xC00000CB;
241     public static final int NTBadNetName = 0xC00000CC;
242     public static final int NTRequestNotAccepted = 0xC00000D0;
243     public static final int NTNoSuchDomain = 0xC00000DF;
244     public static final int NTTooManyOpenFiles = 0xC000011F;
245     public static final int NTCancelled = 0xC0000120;
246     public static final int NTFileOffline = 0xC0000267;
247
248     public static final int Win32FileNotFound = 2;
249     public static final int Win32PathNotFound = 3;
250     public static final int Win32AccessDenied = 5;
251     public static final int Win32InvalidHandle = 6;
252     public static final int Win32BadDeviceType = 66;
253     public static final int Win32BadNetworkName = 67;
254     public static final int Win32AlreadyAssigned = 85;
255     public static final int Win32InvalidPassword = 86;
256     public static final int Win32MoreData = 234;
257     public static final int Win32NoMoreItems = 259;
258     public static final int Win32MoreEntries = 261;
259     public static final int Win32InvalidAddress = 487;
260     public static final int Win32ServiceDoesNotExist = 1060;
261     public static final int Win32ServiceMarkedForDelete = 1072;
262     public static final int Win32ServiceExists = 1073;
263     public static final int Win32ServiceDuplicateName = 1077;
264     public static final int Win32BadDevice = 1200;
265     public static final int Win32NoNetOrBadPath = 1203;
266     public static final int Win32ExtendedError = 1208;
267     public static final int Win32NoNetwork = 1222;
268
269     public static final int NTBufferOverflow = 0x80000005;
270     public static final int NTNoMoreFiles = 0x80000006;
271     public static final int NTNotifyEnumDir = 0x0000010C;
272
273     // DEC/RPC status codes
274

275     public static final int DCERPC_Fault = 0;
276 }
Popular Tags