VirtualBox

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

Last change on this file since 3251 was 3022, checked in by vboxsync, 17 years ago

Check that there is a symbol table in the ELF relocatable image we're loading. (or we'll crash later during relocalation)

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