VirtualBox

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

Last change on this file since 4672 was 4475, checked in by vboxsync, 17 years ago

Some adjustments to RTEnv and RTProcCreate. Should work on darwin now.

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