VirtualBox

source: vbox/trunk/include/iprt/err.h@ 4878

Last change on this file since 4878 was 4822, checked in by vboxsync, 17 years ago

Fixed bad name.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 31.5 KB
Line 
1/** @file
2 * innotek Portable Runtime - Status Codes.
3 */
4
5/*
6 * Copyright (C) 2006-2007 innotek GmbH
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License as published by the Free Software Foundation,
12 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
13 * distribution. VirtualBox OSE is distributed in the hope that it will
14 * be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef ___iprt_err_h
18#define ___iprt_err_h
19
20#include <iprt/cdefs.h>
21#include <iprt/types.h>
22
23__BEGIN_DECLS
24
25/** @defgroup grp_rt_err RTErr - Status Codes
26 * @ingroup grp_rt
27 * @{
28 */
29
30/** @defgroup grp_rt_err_hlp Status Code Helpers
31 * @ingroup grp_rt_err
32 * @{
33 */
34
35/** @def RT_SUCCESS
36 * Check for success. We expect success in normal cases, that is the code path depending on
37 * this check is normally taken. To prevent any prediction use RT_SUCCESS_NP instead.
38 *
39 * @returns true if rc indicates success.
40 * @returns false if rc indicates failure.
41 *
42 * @param rc The iprt status code to test.
43 */
44#define RT_SUCCESS(rc) ( RT_LIKELY((int)(rc) >= VINF_SUCCESS) )
45
46/** @def RT_SUCCESS_NP
47 * Check for success. Don't predict the result.
48 *
49 * @returns true if rc indicates success.
50 * @returns false if rc indicates failure.
51 *
52 * @param rc The iprt status code to test.
53 */
54#define RT_SUCCESS_NP(rc) ( (int)(rc) >= VINF_SUCCESS )
55
56/** @def RT_FAILURE
57 * Check for failure. We don't expect in normal cases, that is the code path depending on
58 * this check is normally NOT taken. To prevent any prediction use RT_FAILURE_NP instead.
59 *
60 * @returns true if rc indicates failure.
61 * @returns false if rc indicates success.
62 *
63 * @param rc The iprt status code to test.
64 */
65#define RT_FAILURE(rc) ( RT_UNLIKELY(!RT_SUCCESS_NP(rc)) )
66
67/** @def RT_FAILURE_NP
68 * Check for failure. Don't predict the result.
69 *
70 * @returns true if rc indicates failure.
71 * @returns false if rc indicates success.
72 *
73 * @param rc The iprt status code to test.
74 */
75#define RT_FAILURE_NP(rc) ( !RT_SUCCESS_NP(rc) )
76
77/**
78 * Converts a Darwin HRESULT error to an iprt status code.
79 *
80 * @returns iprt status code.
81 * @param iNativeCode errno code.
82 * @remark Darwin only.
83 */
84RTDECL(int) RTErrConvertFromDarwinCOM(int32_t iNativeCode);
85
86/**
87 * Converts a Darwin IOReturn error to an iprt status code.
88 *
89 * @returns iprt status code.
90 * @param iNativeCode errno code.
91 * @remark Darwin only.
92 */
93RTDECL(int) RTErrConvertFromDarwinIO(int iNativeCode);
94
95/**
96 * Converts a Darwin kern_return_t error to an iprt status code.
97 *
98 * @returns iprt status code.
99 * @param iNativeCode errno code.
100 * @remark Darwin only.
101 */
102RTDECL(int) RTErrConvertFromDarwinKern(int iNativeCode);
103
104/**
105 * Converts errno to iprt status code.
106 *
107 * @returns iprt status code.
108 * @param uNativeCode errno code.
109 */
110RTDECL(int) RTErrConvertFromErrno(unsigned uNativeCode);
111
112/**
113 * Converts a L4 errno to a iprt status code.
114 *
115 * @returns iprt status code.
116 * @param uNativeCode l4 errno.
117 * @remark L4 only.
118 */
119RTDECL(int) RTErrConvertFromL4Errno(unsigned uNativeCode);
120
121/**
122 * Converts NT status code to iprt status code.
123 *
124 * Needless to say, this is only available on NT and winXX targets.
125 *
126 * @returns iprt status code.
127 * @param lNativeCode NT status code.
128 * @remark Windows only.
129 */
130RTDECL(int) RTErrConvertFromNtStatus(long lNativeCode);
131
132/**
133 * Converts OS/2 error code to iprt status code.
134 *
135 * @returns iprt status code.
136 * @param uNativeCode OS/2 error code.
137 * @remark OS/2 only.
138 */
139RTDECL(int) RTErrConvertFromOS2(unsigned uNativeCode);
140
141/**
142 * Converts Win32 error code to iprt status code.
143 *
144 * @returns iprt status code.
145 * @param uNativeCode Win32 error code.
146 * @remark Windows only.
147 */
148RTDECL(int) RTErrConvertFromWin32(unsigned uNativeCode);
149
150/**
151 * Converts an iprt status code to a errno status code.
152 *
153 * @returns errno status code.
154 * @param iErr iprt status code.
155 */
156RTDECL(int) RTErrConvertToErrno(int iErr);
157
158
159#ifdef IN_RING3
160
161/**
162 * iprt status code message.
163 */
164typedef struct RTSTATUSMSG
165{
166 /** Pointer to the short message string. */
167 const char *pszMsgShort;
168 /** Pointer to the full message string. */
169 const char *pszMsgFull;
170 /** Pointer to the define string. */
171 const char *pszDefine;
172 /** Status code number. */
173 int iCode;
174} RTSTATUSMSG;
175/** Pointer to iprt status code message. */
176typedef RTSTATUSMSG *PRTSTATUSMSG;
177/** Pointer to const iprt status code message. */
178typedef const RTSTATUSMSG *PCRTSTATUSMSG;
179
180/**
181 * Get the message structure corresponding to a given iprt status code.
182 *
183 * @returns Pointer to read-only message description.
184 * @param rc The status code.
185 */
186RTDECL(PCRTSTATUSMSG) RTErrGet(int rc);
187
188/**
189 * Get the define corresponding to a given iprt status code.
190 *
191 * @returns Pointer to read-only string with the \#define identifier.
192 * @param rc The status code.
193 */
194#define RTErrGetDefine(rc) (RTErrGet(rc)->pszDefine)
195
196/**
197 * Get the short description corresponding to a given iprt status code.
198 *
199 * @returns Pointer to read-only string with the description.
200 * @param rc The status code.
201 */
202#define RTErrGetShort(rc) (RTErrGet(rc)->pszMsgShort)
203
204/**
205 * Get the full description corresponding to a given iprt status code.
206 *
207 * @returns Pointer to read-only string with the description.
208 * @param rc The status code.
209 */
210#define RTErrGetFull(rc) (RTErrGet(rc)->pszMsgFull)
211
212#ifdef RT_OS_WINDOWS
213/**
214 * Windows error code message.
215 */
216typedef struct RTWINERRMSG
217{
218 /** Pointer to the full message string. */
219 const char *pszMsgFull;
220 /** Pointer to the define string. */
221 const char *pszDefine;
222 /** Error code number. */
223 long iCode;
224} RTWINERRMSG;
225/** Pointer to Windows error code message. */
226typedef RTWINERRMSG *PRTWINERRMSG;
227/** Pointer to const Windows error code message. */
228typedef const RTWINERRMSG *PCRTWINERRMSG;
229
230/**
231 * Get the message structure corresponding to a given Windows error code.
232 *
233 * @returns Pointer to read-only message description.
234 * @param rc The status code.
235 */
236RTDECL(PCRTWINERRMSG) RTErrWinGet(long rc);
237#endif /* RT_OS_WINDOWS */
238
239#endif /* IN_RING3 */
240
241/** @} */
242
243
244/* SED-START */
245
246/** @name Misc. Status Codes
247 * @{
248 */
249/** Success. */
250#define VINF_SUCCESS 0
251
252/** General failure - DON'T USE THIS!!!
253 * (aka SUPDRV_ERR_GENERAL_FAILURE) */
254#define VERR_GENERAL_FAILURE (-1)
255/** Invalid parameter.
256 * (aka SUPDRV_ERR_INVALID_PARAM) */
257#define VERR_INVALID_PARAMETER (-2)
258/** Invalid magic or cookie.
259 * (aka SUPDRV_ERR_INVALID_MAGIC) */
260#define VERR_INVALID_MAGIC (-3)
261/** Invalid loader handle.
262 * (aka SUPDRV_ERR_INVALID_HANDLE) */
263#define VERR_INVALID_HANDLE (-4)
264/** Failed to lock the address range.
265 * (aka SUPDRV_ERR_INVALID_HANDLE) */
266#define VERR_LOCK_FAILED (-5)
267/** Invalid memory pointer.
268 * (aka SUPDRV_ERR_INVALID_POINTER) */
269#define VERR_INVALID_POINTER (-6)
270/** Failed to patch the IDT.
271 * (aka SUPDRV_ERR_IDT_FAILED) */
272#define VERR_IDT_FAILED (-7)
273/** Memory allocation failed.
274 * (aka SUPDRV_ERR_NO_MEMORY) */
275#define VERR_NO_MEMORY (-8)
276/** Already loaded.
277 * (aka SUPDRV_ERR_ALREADY_LOADED) */
278#define VERR_ALREADY_LOADED (-9)
279/** Permission denied.
280 * (aka SUPDRV_ERR_PERMISSION_DENIED) */
281#define VERR_PERMISSION_DENIED (-10)
282/** Version mismatch.
283 * (aka SUPDRV_ERR_VERSION_MISMATCH) */
284#define VERR_VERSION_MISMATCH (-11)
285/** The request function is not implemented. */
286#define VERR_NOT_IMPLEMENTED (-12)
287
288/** Failed to allocate temporary memory. */
289#define VERR_NO_TMP_MEMORY (-20)
290/** Invalid file mode mask (RTFMODE). */
291#define VERR_INVALID_FMODE (-21)
292/** Incorrect call order. */
293#define VERR_WRONG_ORDER (-22)
294/** There is no TLS (thread local storage) available for storing the current thread. */
295#define VERR_NO_TLS_FOR_SELF (-23)
296/** Failed to set the TLS (thread local storage) entry which points to our thread structure. */
297#define VERR_FAILED_TO_SET_SELF_TLS (-24)
298/** Not able to allocate contiguous memory. */
299#define VERR_NO_CONT_MEMORY (-26)
300/** No memory available for page table or page directory. */
301#define VERR_NO_PAGE_MEMORY (-27)
302/** Already initialized. */
303#define VINF_ALREADY_INITIALIZED 28
304/** The specified thread is dead. */
305#define VERR_THREAD_IS_DEAD (-29)
306/** The specified thread is not waitable. */
307#define VERR_THREAD_NOT_WAITABLE (-30)
308/** Pagetable not present. */
309#define VERR_PAGE_TABLE_NOT_PRESENT (-31)
310/** Internal error - we're screwed if this happens. */
311#define VERR_INTERNAL_ERROR (-32)
312/** The per process timer is busy. */
313#define VERR_TIMER_BUSY (-33)
314/** Address conflict. */
315#define VERR_ADDRESS_CONFLICT (-34)
316/** Unresolved (unknown) host platform error. */
317#define VERR_UNRESOLVED_ERROR (-35)
318/** Invalid function. */
319#define VERR_INVALID_FUNCTION (-36)
320/** Not supported. */
321#define VERR_NOT_SUPPORTED (-37)
322/** Access denied. */
323#define VERR_ACCESS_DENIED (-38)
324/** Call interrupted. */
325#define VERR_INTERRUPTED (-39)
326/** Timeout. */
327#define VERR_TIMEOUT (-40)
328/** Buffer too small to save result. */
329#define VERR_BUFFER_OVERFLOW (-41)
330/** Buffer too small to save result. */
331#define VINF_BUFFER_OVERFLOW 41
332/** Data size overflow. */
333#define VERR_TOO_MUCH_DATA (-42)
334/** Max threads number reached. */
335#define VERR_MAX_THRDS_REACHED (-43)
336/** Max process number reached. */
337#define VERR_MAX_PROCS_REACHED (-44)
338/** The recipient process has refused the signal. */
339#define VERR_SIGNAL_REFUSED (-45)
340/** A signal is already pending. */
341#define VERR_SIGNAL_PENDING (-46)
342/** The signal being posted is not correct. */
343#define VERR_SIGNAL_INVALID (-47)
344/** The state changed.
345 * This is a generic error message and needs a context to make sense. */
346#define VERR_STATE_CHANGED (-48)
347/** Warning, the state changed.
348 * This is a generic error message and needs a context to make sense. */
349#define VWRN_STATE_CHANGED 48
350/** Error while parsing UUID string */
351#define VERR_INVALID_UUID_FORMAT (-49)
352/** The specified process was not found. */
353#define VERR_PROCESS_NOT_FOUND (-50)
354/** The process specified to a non-block wait had not exitted. */
355#define VERR_PROCESS_RUNNING (-51)
356/** Retry the operation. */
357#define VERR_TRY_AGAIN (-52)
358/** Generic parse error. */
359#define VERR_PARSE_ERROR (-53)
360/** Value out of range. */
361#define VERR_OUT_OF_RANGE (-54)
362/** A numeric convertion encountered a value which was too big for the target. */
363#define VERR_NUMBER_TOO_BIG (-55)
364/** A numeric convertion encountered a value which was too big for the target. */
365#define VWRN_NUMBER_TOO_BIG 55
366/** The number begin converted (string) contained no digits. */
367#define VERR_NO_DIGITS (-56)
368/** The number begin converted (string) contained no digits. */
369#define VWRN_NO_DIGITS 56
370/** Encountered a '-' during convertion to an unsigned value. */
371#define VERR_NEGATIVE_UNSIGNED (-57)
372/** Encountered a '-' during convertion to an unsigned value. */
373#define VWRN_NEGATIVE_UNSIGNED 57
374/** Error while characters translation (unicode and so). */
375#define VERR_NO_TRANSLATION (-58)
376/** Encountered unicode code point which is reserved for use as endian indicator (0xffff or 0xfffe). */
377#define VERR_CODE_POINT_ENDIAN_INDICATOR (-59)
378/** Encountered unicode code point in the surrogate range (0xd800 to 0xdfff). */
379#define VERR_CODE_POINT_SURROGATE (-60)
380/** A string claiming to be UTF-8 is incorrectly encoded. */
381#define VERR_INVALID_UTF8_ENCODING (-61)
382/** Ad string claiming to be in UTF-16 is incorrectly encoded. */
383#define VERR_INVALID_UTF16_ENCODING (-62)
384/** Encountered a unicode code point which cannot be represented as UTF-16. */
385#define VERR_CANT_RECODE_AS_UTF16 (-63)
386/** Got an out of memory condition trying to allocate a string. */
387#define VERR_NO_STR_MEMORY (-64)
388/** Got an out of memory condition trying to allocate a UTF-16 (/UCS-2) string. */
389#define VERR_NO_UTF16_MEMORY (-65)
390/** Get an out of memory condition trying to allocate a code point array. */
391#define VERR_NO_CODE_POINT_MEMORY (-66)
392/** Can't free the memory because it's used in mapping. */
393#define VERR_MEMORY_BUSY (-67)
394/** The timer can't be started because it's already active. */
395#define VERR_TIMER_ACTIVE (-68)
396/** The timer can't be stopped because i's already suspended. */
397#define VERR_TIMER_SUSPENDED (-69)
398/** The operation was cancelled by the user. */
399#define VERR_CANCELLED (-70)
400/** Failed to initialize a memory object.
401 * Exactly what this means is OS specific. */
402#define VERR_MEMOBJ_INIT_FAILED (-71)
403/** Out of memory condition when allocating memory with low physical backing. */
404#define VERR_NO_LOW_MEMORY (-72)
405/** Out of memory condition when allocating physical memory (without mapping). */
406#define VERR_NO_PHYS_MEMORY (-73)
407/** The address (virtual or physical) is too big. */
408#define VERR_ADDRESS_TOO_BIG (-74)
409/** Failed to map a memory object. */
410#define VERR_MAP_FAILED (-75)
411/** @} */
412
413
414/** @name Common File/Disk/Pipe/etc Status Codes
415 * @{
416 */
417/** Unresolved (unknown) file i/o error. */
418#define VERR_FILE_IO_ERROR (-100)
419/** File/Device open failed. */
420#define VERR_OPEN_FAILED (-101)
421/** File not found. */
422#define VERR_FILE_NOT_FOUND (-102)
423/** Path not found. */
424#define VERR_PATH_NOT_FOUND (-103)
425/** Invalid (malformed) file/path name. */
426#define VERR_INVALID_NAME (-104)
427/** File/Device already exists. */
428#define VERR_ALREADY_EXISTS (-105)
429/** Too many open files. */
430#define VERR_TOO_MANY_OPEN_FILES (-106)
431/** Seek error. */
432#define VERR_SEEK (-107)
433/** Seek below file start. */
434#define VERR_NEGATIVE_SEEK (-108)
435/** Trying to seek on device. */
436#define VERR_SEEK_ON_DEVICE (-109)
437/** Reached the end of the file. */
438#define VERR_EOF (-110)
439/** Reached the end of the file. */
440#define VINF_EOF 110
441/** Generic file read error. */
442#define VERR_READ_ERROR (-111)
443/** Generic file write error. */
444#define VERR_WRITE_ERROR (-112)
445/** Write protect error. */
446#define VERR_WRITE_PROTECT (-113)
447/** Sharing violetion, file is being used by another process. */
448#define VERR_SHARING_VIOLATION (-114)
449/** Unable to lock a region of a file. */
450#define VERR_FILE_LOCK_FAILED (-115)
451/** File access error, another process has locked a portion of the file. */
452#define VERR_FILE_LOCK_VIOLATION (-116)
453/** File or directory can't be created. */
454#define VERR_CANT_CREATE (-117)
455/** Directory can't be deleted. */
456#define VERR_CANT_DELETE_DIRECTORY (-118)
457/** Can't move file to another disk. */
458#define VERR_NOT_SAME_DEVICE (-119)
459/** The filename or extension is too long. */
460#define VERR_FILENAME_TOO_LONG (-120)
461/** Media not present in drive. */
462#define VERR_MEDIA_NOT_PRESENT (-121)
463/** The type of media was not recognized. Not formatted? */
464#define VERR_MEDIA_NOT_RECOGNIZED (-122)
465/** Can't unlock - region was not locked. */
466#define VERR_FILE_NOT_LOCKED (-123)
467/** Unrecoverable error: lock was lost. */
468#define VERR_FILE_LOCK_LOST (-124)
469/** Can't delete directory with files. */
470#define VERR_DIR_NOT_EMPTY (-125)
471/** A directory operation was attempted on a non-directory object. */
472#define VERR_NOT_A_DIRECTORY (-126)
473/** A non-directory operation was attempted on a directory object. */
474#define VERR_IS_A_DIRECTORY (-127)
475/** Tried to grow a file beyond the limit imposed by the process or the filesystem. */
476#define VERR_FILE_TOO_BIG (-128)
477/** @} */
478
479
480/** @name Generic Filesystem I/O Status Codes
481 * @{
482 */
483/** Unresolved (unknown) disk i/o error. */
484#define VERR_DISK_IO_ERROR (-150)
485/** Invalid drive number. */
486#define VERR_INVALID_DRIVE (-151)
487/** Disk is full. */
488#define VERR_DISK_FULL (-152)
489/** Disk was changed. */
490#define VERR_DISK_CHANGE (-153)
491/** Drive is locked. */
492#define VERR_DRIVE_LOCKED (-154)
493/** The specified disk or diskette cannot be accessed. */
494#define VERR_DISK_INVALID_FORMAT (-155)
495/** Too many symbolic links. */
496#define VERR_TOO_MANY_SYMLINKS (-156)
497/** @} */
498
499
500/** @name Generic Directory Enumeration Status Codes
501 * @{
502 */
503/** Unresolved (unknown) search error. */
504#define VERR_SEARCH_ERROR (-200)
505/** No more files found. */
506#define VERR_NO_MORE_FILES (-201)
507/** No more search handles available. */
508#define VERR_NO_MORE_SEARCH_HANDLES (-202)
509/** RTDirReadEx() failed to retrieve the extra data which was requested. */
510#define VWRN_NO_DIRENT_INFO 203
511/** @} */
512
513
514/** @name Generic Device I/O Status Codes
515 * @{
516 */
517/** Unresolved (unknown) device i/o error. */
518#define VERR_DEV_IO_ERROR (-250)
519/** Device i/o: Bad unit. */
520#define VERR_IO_BAD_UNIT (-251)
521/** Device i/o: Not ready. */
522#define VERR_IO_NOT_READY (-252)
523/** Device i/o: Bad command. */
524#define VERR_IO_BAD_COMMAND (-253)
525/** Device i/o: CRC error. */
526#define VERR_IO_CRC (-254)
527/** Device i/o: Bad length. */
528#define VERR_IO_BAD_LENGTH (-255)
529/** Device i/o: Sector not found. */
530#define VERR_IO_SECTOR_NOT_FOUND (-256)
531/** Device i/o: General failure. */
532#define VERR_IO_GEN_FAILURE (-257)
533/** @} */
534
535
536/** @name Generic Pipe I/O Status Codes
537 * @{
538 */
539/** Unresolved (unknown) pipe i/o error. */
540#define VERR_PIPE_IO_ERROR (-300)
541/** Broken pipe. */
542#define VERR_BROKEN_PIPE (-301)
543/** Bad pipe. */
544#define VERR_BAD_PIPE (-302)
545/** Pipe is busy. */
546#define VERR_PIPE_BUSY (-303)
547/** No data in pipe. */
548#define VERR_NO_DATA (-304)
549/** Pipe is not connected. */
550#define VERR_PIPE_NOT_CONNECTED (-305)
551/** More data available in pipe. */
552#define VERR_MORE_DATA (-306)
553/** @} */
554
555
556/** @name Generic Semaphores Status Codes
557 * @{
558 */
559/** Unresolved (unknown) semaphore error. */
560#define VERR_SEM_ERROR (-350)
561/** Too many semaphores. */
562#define VERR_TOO_MANY_SEMAPHORES (-351)
563/** Exclusive semaphore is owned by another process. */
564#define VERR_EXCL_SEM_ALREADY_OWNED (-352)
565/** The semaphore is set and cannot be closed. */
566#define VERR_SEM_IS_SET (-353)
567/** The semaphore cannot be set again. */
568#define VERR_TOO_MANY_SEM_REQUESTS (-354)
569/** Attempt to release mutex not owned by caller. */
570#define VERR_NOT_OWNER (-355)
571/** The semaphore has been opened too many times. */
572#define VERR_TOO_MANY_OPENS (-356)
573/** The maximum posts for the event semaphore has been reached. */
574#define VERR_TOO_MANY_POSTS (-357)
575/** The event semaphore has already been posted. */
576#define VERR_ALREADY_POSTED (-358)
577/** The event semaphore has already been reset. */
578#define VERR_ALREADY_RESET (-359)
579/** The semaphore is in use. */
580#define VERR_SEM_BUSY (-360)
581/** The previous ownership of this semaphore has ended. */
582#define VERR_SEM_OWNER_DIED (-361)
583/** Failed to open semaphore by name - not found. */
584#define VERR_SEM_NOT_FOUND (-362)
585/** Semaphore destroyed while waiting. */
586#define VERR_SEM_DESTROYED (-363)
587/** Nested ownership requests are not permitted for this semaphore type. */
588#define VERR_SEM_NESTED (-364)
589/** Deadlock detected. */
590#define VERR_DEADLOCK (-365)
591/** Ping-Pong listen or speak out of turn error. */
592#define VERR_SEM_OUT_OF_TURN (-366)
593/** @} */
594
595
596/** @name Generic Network I/O Status Codes
597 * @{
598 */
599/** Unresolved (unknown) network error. */
600#define VERR_NET_IO_ERROR (-400)
601/** The network is busy or is out of resources. */
602#define VERR_NET_OUT_OF_RESOURCES (-401)
603/** Net host name not found. */
604#define VERR_NET_HOST_NOT_FOUND (-402)
605/** Network path not found. */
606#define VERR_NET_PATH_NOT_FOUND (-403)
607/** General network printing error. */
608#define VERR_NET_PRINT_ERROR (-404)
609/** The machine is not on the network. */
610#define VERR_NET_NO_NETWORK (-405)
611/** Name is not unique on the network. */
612#define VERR_NET_NOT_UNIQUE_NAME (-406)
613
614/* These are BSD networking error codes - numbers correspond, don't mess! */
615/** Operation in progress. */
616#define VERR_NET_IN_PROGRESS (-436)
617/** Operation already in progress. */
618#define VERR_NET_ALREADY_IN_PROGRESS (-437)
619/** Attempted socket operation with a non-socket handle.
620 * (This includes closed handles.) */
621#define VERR_NET_NOT_SOCKET (-438)
622/** Destination address required. */
623#define VERR_NET_DEST_ADDRESS_REQUIRED (-439)
624/** Message too long. */
625#define VERR_NET_MSG_SIZE (-440)
626/** Protocol wrong type for socket. */
627#define VERR_NET_PROTOCOL_TYPE (-441)
628/** Protocol not available. */
629#define VERR_NET_PROTOCOL_NOT_AVAILABLE (-442)
630/** Protocol not supported. */
631#define VERR_NET_PROTOCOL_NOT_SUPPORTED (-443)
632/** Socket type not supported. */
633#define VERR_NET_SOCKET_TYPE_NOT_SUPPORTED (-444)
634/** Operation not supported. */
635#define VERR_NET_OPERATION_NOT_SUPPORTED (-445)
636/** Protocol family not supported. */
637#define VERR_NET_PROTOCOL_FAMILY_NOT_SUPPORTED (-446)
638/** Address family not supported by protocol family. */
639#define VERR_NET_ADDRESS_FAMILY_NOT_SUPPORTED (-447)
640/** Address already in use. */
641#define VERR_NET_ADDRESS_IN_USE (-448)
642/** Can't assign requested address. */
643#define VERR_NET_ADDRESS_NOT_AVAILABLE (-449)
644/** Network is down. */
645#define VERR_NET_DOWN (-450)
646/** Network is unreachable. */
647#define VERR_NET_UNREACHABLE (-451)
648/** Network dropped connection on reset. */
649#define VERR_NET_CONNECTION_RESET (-452)
650/** Software caused connection abort. */
651#define VERR_NET_CONNECTION_ABORTED (-453)
652/** Connection reset by peer. */
653#define VERR_NET_CONNECTION_RESET_BY_PEER (-454)
654/** No buffer space available. */
655#define VERR_NET_NO_BUFFER_SPACE (-455)
656/** Socket is already connected. */
657#define VERR_NET_ALREADY_CONNECTED (-456)
658/** Socket is not connected. */
659#define VERR_NET_NOT_CONNECTED (-457)
660/** Can't send after socket shutdown. */
661#define VERR_NET_SHUTDOWN (-458)
662/** Too many references: can't splice. */
663#define VERR_NET_TOO_MANY_REFERENCES (-459)
664/** Too many references: can't splice. */
665#define VERR_NET_CONNECTION_TIMED_OUT (-460)
666/** Connection refused. */
667#define VERR_NET_CONNECTION_REFUSED (-461)
668/* ELOOP is not net. */
669/* ENAMETOOLONG is not net. */
670/** Host is down. */
671#define VERR_NET_HOST_DOWN (-464)
672/** No route to host. */
673#define VERR_NET_HOST_UNREACHABLE (-465)
674/** @} */
675
676
677/** @name TCP Status Codes
678 * @{
679 */
680/** Stop the TCP server. */
681#define VERR_TCP_SERVER_STOP (-500)
682/** The server was stopped. */
683#define VINF_TCP_SERVER_STOP 500
684/** @} */
685
686
687/** @name L4 Specific Status Codes
688 * @{
689 */
690/** Invalid offset in an L4 dataspace */
691#define VERR_L4_INVALID_DS_OFFSET (-550)
692/** IPC error */
693#define VERR_IPC (-551)
694/** Item already used */
695#define VERR_RESOURCE_IN_USE (-552)
696/** Source/destination not found */
697#define VERR_IPC_PROCESS_NOT_FOUND (-553)
698/** Receive timeout */
699#define VERR_IPC_RECEIVE_TIMEOUT (-554)
700/** Send timeout */
701#define VERR_IPC_SEND_TIMEOUT (-555)
702/** Receive cancelled */
703#define VERR_IPC_RECEIVE_CANCELLED (-556)
704/** Send cancelled */
705#define VERR_IPC_SEND_CANCELLED (-557)
706/** Receive aborted */
707#define VERR_IPC_RECEIVE_ABORTED (-558)
708/** Send aborted */
709#define VERR_IPC_SEND_ABORTED (-559)
710/** Couldn't map pages during receive */
711#define VERR_IPC_RECEIVE_MAP_FAILED (-560)
712/** Couldn't map pages during send */
713#define VERR_IPC_SEND_MAP_FAILED (-561)
714/** Send pagefault timeout in receive */
715#define VERR_IPC_RECEIVE_SEND_PF_TIMEOUT (-562)
716/** Send pagefault timeout in send */
717#define VERR_IPC_SEND_SEND_PF_TIMEOUT (-563)
718/** (One) receive buffer was too small, or too few buffers */
719#define VINF_IPC_RECEIVE_MSG_CUT 564
720/** (One) send buffer was too small, or too few buffers */
721#define VINF_IPC_SEND_MSG_CUT 565
722/** Dataspace manager server not found */
723#define VERR_L4_DS_MANAGER_NOT_FOUND (-566)
724/** @} */
725
726
727/** @name Loader Status Codes.
728 * @{
729 */
730/** Invalid executable signature. */
731#define VERR_INVALID_EXE_SIGNATURE (-600)
732/** The iprt loader recognized a ELF image, but doesn't support loading it. */
733#define VERR_ELF_EXE_NOT_SUPPORTED (-601)
734/** The iprt loader recognized a PE image, but doesn't support loading it. */
735#define VERR_PE_EXE_NOT_SUPPORTED (-602)
736/** The iprt loader recognized a LX image, but doesn't support loading it. */
737#define VERR_LX_EXE_NOT_SUPPORTED (-603)
738/** The iprt loader recognized a LE image, but doesn't support loading it. */
739#define VERR_LE_EXE_NOT_SUPPORTED (-604)
740/** The iprt loader recognized a NE image, but doesn't support loading it. */
741#define VERR_NE_EXE_NOT_SUPPORTED (-605)
742/** The iprt loader recognized a MZ image, but doesn't support loading it. */
743#define VERR_MZ_EXE_NOT_SUPPORTED (-606)
744/** The iprt loader recognized an a.out image, but doesn't support loading it. */
745#define VERR_AOUT_EXE_NOT_SUPPORTED (-607)
746/** Bad executable. */
747#define VERR_BAD_EXE_FORMAT (-608)
748/** Symbol (export) not found. */
749#define VERR_SYMBOL_NOT_FOUND (-609)
750/** Module not found. */
751#define VERR_MODULE_NOT_FOUND (-610)
752/** The loader resolved an external symbol to an address to big for the image format. */
753#define VERR_SYMBOL_VALUE_TOO_BIG (-611)
754/** The image is too big. */
755#define VERR_IMAGE_TOO_BIG (-612)
756/** The image base address is to high for this image type. */
757#define VERR_IMAGE_BASE_TOO_HIGH (-614)
758/** The PE loader encountered delayed imports, a feature which hasn't been implemented yet. */
759#define VERR_LDRPE_DELAY_IMPORT (-620)
760/** The PE loader doesn't have a clue what the security data directory entry is all about. */
761#define VERR_LDRPE_SECURITY (-621)
762/** The PE loader doesn't know how to deal with the global pointer data directory entry yet. */
763#define VERR_LDRPE_GLOBALPTR (-622)
764/** The PE loader doesn't support the TLS data directory yet. */
765#define VERR_LDRPE_TLS (-623)
766/** The PE loader doesn't grok the COM descriptor data directory entry. */
767#define VERR_LDRPE_COM_DESCRIPTOR (-624)
768/** The PE loader encountered an unknown load config directory/header size. */
769#define VERR_LDRPE_LOAD_CONFIG_SIZE (-625)
770/** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
771#define VERR_LDRPE_LOCK_PREFIX_TABLE (-626)
772/** The ELF loader doesn't handle foreign endianness. */
773#define VERR_LDRELF_ODD_ENDIAN (-630)
774/** The ELF image is 'dynamic', the ELF loader can only deal with 'relocatable' images at present. */
775#define VERR_LDRELF_DYN (-631)
776/** The ELF image is 'executable', the ELF loader can only deal with 'relocatable' images at present. */
777#define VERR_LDRELF_EXEC (-632)
778/** The ELF image was created for an unsupported target machine type. */
779#define VERR_LDRELF_MACHINE (-633)
780/** The ELF version is not supported. */
781#define VERR_LDRELF_VERSION (-634)
782/** The ELF loader cannot handle multiple SYMTAB sections. */
783#define VERR_LDRELF_MULTIPLE_SYMTABS (-635)
784/** The ELF loader encountered a relocation type which is not implemented. */
785#define VERR_LDRELF_RELOCATION_NOT_SUPPORTED (-636)
786/** The ELF loader encountered a bad symbol index. */
787#define VERR_LDRELF_INVALID_SYMBOL_INDEX (-637)
788/** The ELF loader encountered an invalid symbol name offset. */
789#define VERR_LDRELF_INVALID_SYMBOL_NAME_OFFSET (-638)
790/** The ELF loader encountered an invalid relocation offset. */
791#define VERR_LDRELF_INVALID_RELOCATION_OFFSET (-639)
792/** The ELF loader didn't find the symbol/string table for the image. */
793#define VERR_LDRELF_NO_SYMBOL_OR_NO_STRING_TABS (-640)
794/** @}*/
795
796/** @name Debug Info Reader Status Codes.
797 * @{
798 */
799/** The specified segment:offset address was invalid. Typically an attempt at
800 * addressing outside the segment boundrary. */
801#define VERR_DBGMOD_INVALID_ADDRESS (-650)
802/** @} */
803
804/** @name Request Packet Status Codes.
805 * @{
806 */
807/** Invalid RT request type.
808 * For the RTReqAlloc() case, the caller just specified an illegal enmType. For
809 * all the other occurences it means indicates corruption, broken logic, or stupid
810 * interface user. */
811#define VERR_RT_REQUEST_INVALID_TYPE (-700)
812/** Invalid RT request state.
813 * The state of the request packet was not the expected and accepted one(s). Either
814 * the interface user screwed up, or we've got corruption/broken logic. */
815#define VERR_RT_REQUEST_STATE (-701)
816/** Invalid RT request packet.
817 * One or more of the RT controlled packet members didn't contain the correct
818 * values. Some thing's broken. */
819#define VERR_RT_REQUEST_INVALID_PACKAGE (-702)
820/** The status field has not been updated yet as the request is still
821 * pending completion. Someone queried the iStatus field before the request
822 * has been fully processed. */
823#define VERR_RT_REQUEST_STATUS_STILL_PENDING (-703)
824/** The request has been freed, don't read the status now.
825 * Someone is reading the iStatus field of a freed request packet. */
826#define VERR_RT_REQUEST_STATUS_FREED (-704)
827/** @} */
828
829/** @name Environment Status Code
830 * @{
831 */
832/** The specified environment variable was not found. (RTEnvGetEx) */
833#define VERR_ENV_VAR_NOT_FOUND (-750)
834/** The specified environment variable was not found. (RTEnvUnsetEx) */
835#define VINF_ENV_VAR_NOT_FOUND (750)
836/** @} */
837
838/* SED-END */
839
840/** @} */
841
842__END_DECLS
843
844#endif
845
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette