Commit made by Daniel, including the implementation of the daemon.
[vdi_driver.git] / src / const_defines.h
blob4b6a8cef338c9aed1c00128d76aeba141ae9c1d1
1 #ifndef CONST_DEFINES_H
2 #define CONST_DEFINES_H
4 /**
5 * Host max path (the reasonable value).
6 */
7 #define RTPATH_MAX (4096 + 4) /* (PATH_MAX + 1) on linux w/ some alignment */
9 /** @name VDI image open mode flags
10 * @{
12 /** Try to open image in read/write exclusive access mode if possible, or in read-only elsewhere. */
13 #define VDI_OPEN_FLAGS_NORMAL (0)
14 /** Open image in read-only mode with sharing access with others. */
15 #define VDI_OPEN_FLAGS_READONLY (1)
16 /** Mask of valid flags. */
17 #define VDI_OPEN_FLAGS_MASK (VDI_OPEN_FLAGS_NORMAL | VDI_OPEN_FLAGS_READONLY)
18 /** @}*/
20 /** @name VBox HDD Container (VDI) Status Codes
21 * @{
23 /** Invalid image file header. */
24 #define VERR_VDI_INVALID_HEADER (-3200)
25 /** Invalid image file header: invalid signature. */
26 #define VERR_VDI_INVALID_SIGNATURE (-3201)
27 /** Invalid image file header: invalid version. */
28 #define VERR_VDI_UNSUPPORTED_VERSION (-3202)
29 /** Invalid image type. */
30 #define VERR_VDI_INVALID_TYPE (-3203)
31 /** Invalid image flags. */
32 #define VERR_VDI_INVALID_FLAGS (-3204)
33 /** Operation can't be done in current HDD container state. */
34 #define VERR_VDI_INVALID_STATE (-3205)
35 /** Differencing image can't be used with current base image. */
36 #define VERR_VDI_WRONG_DIFF_IMAGE (-3206)
37 /** Two or more images of one HDD has different versions. */
38 #define VERR_VDI_IMAGES_VERSION_MISMATCH (-3207)
39 /** Differencing and parent images can't be used together due to UUID. */
40 #define VERR_VDI_IMAGES_UUID_MISMATCH (-3208)
41 /** No differencing images to commit. */
42 #define VERR_VDI_NO_DIFF_IMAGES (-3209)
43 /** Virtual HDD is not opened. */
44 #define VERR_VDI_NOT_OPENED (-3210)
45 /** Requested image is not opened. */
46 #define VERR_VDI_IMAGE_NOT_FOUND (-3211)
47 /** Image is read-only. */
48 #define VERR_VDI_IMAGE_READ_ONLY (-3212)
49 /** Comment string is too long. */
50 #define VERR_VDI_COMMENT_TOO_LONG (-3213)
51 /** Geometry hasn't been set. */
52 #define VERR_VDI_GEOMETRY_NOT_SET (-3214)
53 /** No data for this block in image. */
54 #define VINF_VDI_BLOCK_FREE 3215
55 /** Configuration value not found. */
56 #define VERR_VDI_VALUE_NOT_FOUND (-3216)
57 /** @} */
59 /** @name VDI image flags
60 * @{ */
61 /** No flags. */
62 #define VDI_IMAGE_FLAGS_NONE (0x00)
63 /** Fill new blocks with zeroes while expanding image file. */
64 #define VDI_IMAGE_FLAGS_ZERO_EXPAND (0x01)
66 /** Mask of valid image flags. */
67 #define VDI_IMAGE_FLAGS_MASK (VDI_IMAGE_FLAGS_NONE | VDI_IMAGE_FLAGS_ZERO_EXPAND)
69 /** Default image flags. */
70 #define VDI_IMAGE_FLAGS_DEFAULT (VDI_IMAGE_FLAGS_NONE)
71 /** @} */
73 /** @name Misc. Status Codes
74 * @{
76 /** Success. */
77 #define VINF_SUCCESS 0
79 /** General failure - DON'T USE THIS!!!
80 * (aka SUPDRV_ERR_GENERAL_FAILURE) */
81 #define VERR_GENERAL_FAILURE (-1)
82 /** Invalid parameter.
83 * (aka SUPDRV_ERR_INVALID_PARAM) */
84 #define VERR_INVALID_PARAMETER (-2)
85 /** Invalid magic or cookie.
86 * (aka SUPDRV_ERR_INVALID_MAGIC) */
87 #define VERR_INVALID_MAGIC (-3)
88 /** Invalid loader handle.
89 * (aka SUPDRV_ERR_INVALID_HANDLE) */
90 #define VERR_INVALID_HANDLE (-4)
91 /** Failed to lock the address range.
92 * (aka SUPDRV_ERR_INVALID_HANDLE) */
93 #define VERR_LOCK_FAILED (-5)
94 /** Invalid memory pointer.
95 * (aka SUPDRV_ERR_INVALID_POINTER) */
96 #define VERR_INVALID_POINTER (-6)
97 /** Failed to patch the IDT.
98 * (aka SUPDRV_ERR_IDT_FAILED) */
99 #define VERR_IDT_FAILED (-7)
100 /** Memory allocation failed.
101 * (aka SUPDRV_ERR_NO_MEMORY) */
102 #define VERR_NO_MEMORY (-8)
103 /** Already loaded.
104 * (aka SUPDRV_ERR_ALREADY_LOADED) */
105 #define VERR_ALREADY_LOADED (-9)
106 /** Permission denied.
107 * (aka SUPDRV_ERR_PERMISSION_DENIED) */
108 #define VERR_PERMISSION_DENIED (-10)
109 /** Version mismatch.
110 * (aka SUPDRV_ERR_VERSION_MISMATCH) */
111 #define VERR_VERSION_MISMATCH (-11)
112 /** The request function is not implemented. */
113 #define VERR_NOT_IMPLEMENTED (-12)
115 /** Failed to allocate temporary memory. */
116 #define VERR_NO_TMP_MEMORY (-20)
117 /** Invalid file mode mask (RTFMODE). */
118 #define VERR_INVALID_FMODE (-21)
119 /** Incorrect call order. */
120 #define VERR_WRONG_ORDER (-22)
121 /** There is no TLS (thread local storage) available for storing the current thread. */
122 #define VERR_NO_TLS_FOR_SELF (-23)
123 /** Failed to set the TLS (thread local storage) entry which points to our thread structure. */
124 #define VERR_FAILED_TO_SET_SELF_TLS (-24)
125 /** Not able to allocate contiguous memory. */
126 #define VERR_NO_CONT_MEMORY (-26)
127 /** No memory available for page table or page directory. */
128 #define VERR_NO_PAGE_MEMORY (-27)
129 /** Already initialized. */
130 #define VINF_ALREADY_INITIALIZED 28
131 /** The specified thread is dead. */
132 #define VERR_THREAD_IS_DEAD (-29)
133 /** The specified thread is not waitable. */
134 #define VERR_THREAD_NOT_WAITABLE (-30)
135 /** Pagetable not present. */
136 #define VERR_PAGE_TABLE_NOT_PRESENT (-31)
137 /** Internal error - we're screwed if this happens. */
138 #define VERR_INTERNAL_ERROR (-32)
139 /** The per process timer is busy. */
140 #define VERR_TIMER_BUSY (-33)
141 /** Address conflict. */
142 #define VERR_ADDRESS_CONFLICT (-34)
143 /** Unresolved (unknown) host platform error. */
144 #define VERR_UNRESOLVED_ERROR (-35)
145 /** Invalid function. */
146 #define VERR_INVALID_FUNCTION (-36)
147 /** Not supported. */
148 #define VERR_NOT_SUPPORTED (-37)
149 /** Access denied. */
150 #define VERR_ACCESS_DENIED (-38)
151 /** Call interrupted. */
152 #define VERR_INTERRUPTED (-39)
153 /** Timeout. */
154 #define VERR_TIMEOUT (-40)
155 /** Buffer too small to save result. */
156 #define VERR_BUFFER_OVERFLOW (-41)
157 /** Buffer too small to save result. */
158 #define VINF_BUFFER_OVERFLOW 41
159 /** Data size overflow. */
160 #define VERR_TOO_MUCH_DATA (-42)
161 /** Max threads number reached. */
162 #define VERR_MAX_THRDS_REACHED (-43)
163 /** Max process number reached. */
164 #define VERR_MAX_PROCS_REACHED (-44)
165 /** The recipient process has refused the signal. */
166 #define VERR_SIGNAL_REFUSED (-45)
167 /** A signal is already pending. */
168 #define VERR_SIGNAL_PENDING (-46)
169 /** The signal being posted is not correct. */
170 #define VERR_SIGNAL_INVALID (-47)
171 /** The state changed.
172 * This is a generic error message and needs a context to make sense. */
173 #define VERR_STATE_CHANGED (-48)
174 /** Warning, the state changed.
175 * This is a generic error message and needs a context to make sense. */
176 #define VWRN_STATE_CHANGED 48
177 /** Error while parsing UUID string */
178 #define VERR_INVALID_UUID_FORMAT (-49)
179 /** The specified process was not found. */
180 #define VERR_PROCESS_NOT_FOUND (-50)
181 /** The process specified to a non-block wait had not exitted. */
182 #define VERR_PROCESS_RUNNING (-51)
183 /** Retry the operation. */
184 #define VERR_TRY_AGAIN (-52)
185 /** Generic parse error. */
186 #define VERR_PARSE_ERROR (-53)
187 /** Value out of range. */
188 #define VERR_OUT_OF_RANGE (-54)
189 /** A numeric convertion encountered a value which was too big for the target. */
190 #define VERR_NUMBER_TOO_BIG (-55)
191 /** A numeric convertion encountered a value which was too big for the target. */
192 #define VWRN_NUMBER_TOO_BIG 55
193 /** The number begin converted (string) contained no digits. */
194 #define VERR_NO_DIGITS (-56)
195 /** The number begin converted (string) contained no digits. */
196 #define VWRN_NO_DIGITS 56
197 /** Encountered a '-' during convertion to an unsigned value. */
198 #define VERR_NEGATIVE_UNSIGNED (-57)
199 /** Encountered a '-' during convertion to an unsigned value. */
200 #define VWRN_NEGATIVE_UNSIGNED 57
201 /** Error while characters translation (unicode and so). */
202 #define VERR_NO_TRANSLATION (-58)
203 /** Encountered unicode code point which is reserved for use as endian indicator (0xffff or 0xfffe). */
204 #define VERR_CODE_POINT_ENDIAN_INDICATOR (-59)
205 /** Encountered unicode code point in the surrogate range (0xd800 to 0xdfff). */
206 #define VERR_CODE_POINT_SURROGATE (-60)
207 /** A string claiming to be UTF-8 is incorrectly encoded. */
208 #define VERR_INVALID_UTF8_ENCODING (-61)
209 /** Ad string claiming to be in UTF-16 is incorrectly encoded. */
210 #define VERR_INVALID_UTF16_ENCODING (-62)
211 /** Encountered a unicode code point which cannot be represented as UTF-16. */
212 #define VERR_CANT_RECODE_AS_UTF16 (-63)
213 /** Got an out of memory condition trying to allocate a string. */
214 #define VERR_NO_STR_MEMORY (-64)
215 /** Got an out of memory condition trying to allocate a UTF-16 (/UCS-2) string. */
216 #define VERR_NO_UTF16_MEMORY (-65)
217 /** Get an out of memory condition trying to allocate a code point array. */
218 #define VERR_NO_CODE_POINT_MEMORY (-66)
219 /** Can't free the memory because it's used in mapping. */
220 #define VERR_MEMORY_BUSY (-67)
221 /** The timer can't be started because it's already active. */
222 #define VERR_TIMER_ACTIVE (-68)
223 /** The timer can't be stopped because i's already suspended. */
224 #define VERR_TIMER_SUSPENDED (-69)
225 /** The operation was cancelled by the user. */
226 #define VERR_CANCELLED (-70)
227 /** Failed to initialize a memory object.
228 * Exactly what this means is OS specific. */
229 #define VERR_MEMOBJ_INIT_FAILED (-71)
230 /** Out of memory condition when allocating memory with low physical backing. */
231 #define VERR_NO_LOW_MEMORY (-72)
232 /** Out of memory condition when allocating physical memory (without mapping). */
233 #define VERR_NO_PHYS_MEMORY (-73)
234 /** The address (virtual or physical) is too big. */
235 #define VERR_ADDRESS_TOO_BIG (-74)
236 /** Failed to map a memory object. */
237 #define VERR_MAP_FAILED (-75)
238 /** Trailing characters. */
239 #define VERR_TRAILING_CHARS (-76)
240 /** Trailing characters. */
241 #define VWRN_TRAILING_CHARS 76
242 /** Trailing spaces. */
243 #define VERR_TRAILING_SPACES (-77)
244 /** Trailing spaces. */
245 #define VWRN_TRAILING_SPACES 77
247 /** @} */
250 /** @def RT_SUCCESS
251 * Check for success. We expect success in normal cases, that is the code path depending on
252 * this check is normally taken. To prevent any prediction use RT_SUCCESS_NP instead.
254 * @returns true if rc indicates success.
255 * @returns false if rc indicates failure.
257 * @param rc The iprt status code to test.
259 #define RT_SUCCESS(rc) ( RT_LIKELY((int)(rc) >= VINF_SUCCESS) )
261 /** @def RT_SUCCESS_NP
262 * Check for success. Don't predict the result.
264 * @returns true if rc indicates success.
265 * @returns false if rc indicates failure.
267 * @param rc The iprt status code to test.
269 #define RT_SUCCESS_NP(rc) ( (int)(rc) >= VINF_SUCCESS )
271 /** @def RT_FAILURE
272 * Check for failure. We don't expect in normal cases, that is the code path depending on
273 * this check is normally NOT taken. To prevent any prediction use RT_FAILURE_NP instead.
275 * @returns true if rc indicates failure.
276 * @returns false if rc indicates success.
278 * @param rc The iprt status code to test.
280 #define RT_FAILURE(rc) ( RT_UNLIKELY(!RT_SUCCESS_NP(rc)) )
282 /** @def VBOX_SUCCESS
283 * Check for success.
285 * @returns true if rc indicates success.
286 * @returns false if rc indicates failure.
288 * @param rc The iprt status code to test.
290 #define VBOX_SUCCESS(rc) RT_SUCCESS(rc)
292 /** @def VBOX_FAILURE
293 * Check for failure.
295 * @returns true if rc indicates failure.
296 * @returns false if rc indicates success.
298 * @param rc The iprt status code to test.
300 #define VBOX_FAILURE(rc) RT_FAILURE(rc)
302 /** @name Generic Filesystem I/O Status Codes
303 * @{
305 /** Unresolved (unknown) disk i/o error. */
306 #define VERR_DISK_IO_ERROR (-150)
307 /** Invalid drive number. */
308 #define VERR_INVALID_DRIVE (-151)
309 /** Disk is full. */
310 #define VERR_DISK_FULL (-152)
311 /** Disk was changed. */
312 #define VERR_DISK_CHANGE (-153)
313 /** Drive is locked. */
314 #define VERR_DRIVE_LOCKED (-154)
315 /** The specified disk or diskette cannot be accessed. */
316 #define VERR_DISK_INVALID_FORMAT (-155)
317 /** Too many symbolic links. */
318 #define VERR_TOO_MANY_SYMLINKS (-156)
320 /** @name Common File/Disk/Pipe/etc Status Codes
321 * @{
323 /** Unresolved (unknown) file i/o error. */
324 #define VERR_FILE_IO_ERROR (-100)
325 /** File/Device open failed. */
326 #define VERR_OPEN_FAILED (-101)
327 /** File not found. */
328 #define VERR_FILE_NOT_FOUND (-102)
329 /** Path not found. */
330 #define VERR_PATH_NOT_FOUND (-103)
331 /** Invalid (malformed) file/path name. */
332 #define VERR_INVALID_NAME (-104)
333 /** File/Device already exists. */
334 #define VERR_ALREADY_EXISTS (-105)
335 /** Too many open files. */
336 #define VERR_TOO_MANY_OPEN_FILES (-106)
337 /** Seek error. */
338 #define VERR_SEEK (-107)
339 /** Seek below file start. */
340 #define VERR_NEGATIVE_SEEK (-108)
341 /** Trying to seek on device. */
342 #define VERR_SEEK_ON_DEVICE (-109)
343 /** Reached the end of the file. */
344 #define VERR_EOF (-110)
345 /** Reached the end of the file. */
346 #define VINF_EOF 110
347 /** Generic file read error. */
348 #define VERR_READ_ERROR (-111)
349 /** Generic file write error. */
350 #define VERR_WRITE_ERROR (-112)
351 /** Write protect error. */
352 #define VERR_WRITE_PROTECT (-113)
353 /** Sharing violetion, file is being used by another process. */
354 #define VERR_SHARING_VIOLATION (-114)
355 /** Unable to lock a region of a file. */
356 #define VERR_FILE_LOCK_FAILED (-115)
357 /** File access error, another process has locked a portion of the file. */
358 #define VERR_FILE_LOCK_VIOLATION (-116)
359 /** File or directory can't be created. */
360 #define VERR_CANT_CREATE (-117)
361 /** Directory can't be deleted. */
362 #define VERR_CANT_DELETE_DIRECTORY (-118)
363 /** Can't move file to another disk. */
364 #define VERR_NOT_SAME_DEVICE (-119)
365 /** The filename or extension is too long. */
366 #define VERR_FILENAME_TOO_LONG (-120)
367 /** Media not present in drive. */
368 #define VERR_MEDIA_NOT_PRESENT (-121)
369 /** The type of media was not recognized. Not formatted? */
370 #define VERR_MEDIA_NOT_RECOGNIZED (-122)
371 /** Can't unlock - region was not locked. */
372 #define VERR_FILE_NOT_LOCKED (-123)
373 /** Unrecoverable error: lock was lost. */
374 #define VERR_FILE_LOCK_LOST (-124)
375 /** Can't delete directory with files. */
376 #define VERR_DIR_NOT_EMPTY (-125)
377 /** A directory operation was attempted on a non-directory object. */
378 #define VERR_NOT_A_DIRECTORY (-126)
379 /** A non-directory operation was attempted on a directory object. */
380 #define VERR_IS_A_DIRECTORY (-127)
381 /** Tried to grow a file beyond the limit imposed by the process or the filesystem. */
382 #define VERR_FILE_TOO_BIG (-128)
383 /** @} */
386 * UUID string maximum length.
388 #define RTUUID_STR_LENGTH 37
391 * int limits.
393 #define INT8_MIN (-0x7f-1)
394 #define INT16_MIN (-0x7fff-1)
395 #define INT32_MIN (-0x7fffffff-1)
396 #define INT64_MIN (-0x7fffffffffffffffLL-1)
398 #define INT8_MAX 0x7f
399 #define INT16_MAX 0x7fff
400 #define INT32_MAX 0x7fffffff
401 #define INT64_MAX 0x7fffffffffffffffLL
403 #define UINT8_MAX 0xff
404 #define UINT16_MAX 0xffff
405 #define UINT32_MAX 0xffffffffU
406 #define UINT64_MAX 0xffffffffffffffffULL
409 * Max path (the reasonable value).
411 #ifndef PATH_MAX
412 #define PATH_MAX 1024
413 #endif
415 /** @name Generic Device I/O Status Codes
416 * @{
418 /** Unresolved (unknown) device i/o error. */
419 #define VERR_DEV_IO_ERROR (-250)
420 /** Device i/o: Bad unit. */
421 #define VERR_IO_BAD_UNIT (-251)
422 /** Device i/o: Not ready. */
423 #define VERR_IO_NOT_READY (-252)
424 /** Device i/o: Bad command. */
425 #define VERR_IO_BAD_COMMAND (-253)
426 /** Device i/o: CRC error. */
427 #define VERR_IO_CRC (-254)
428 /** Device i/o: Bad length. */
429 #define VERR_IO_BAD_LENGTH (-255)
430 /** Device i/o: Sector not found. */
431 #define VERR_IO_SECTOR_NOT_FOUND (-256)
432 /** Device i/o: General failure. */
433 #define VERR_IO_GEN_FAILURE (-257)
434 /** @} */
436 /** @name Loader Status Codes.
437 * @{
439 /** Invalid executable signature. */
440 #define VERR_INVALID_EXE_SIGNATURE (-600)
441 /** The iprt loader recognized a ELF image, but doesn't support loading it. */
442 #define VERR_ELF_EXE_NOT_SUPPORTED (-601)
443 /** The iprt loader recognized a PE image, but doesn't support loading it. */
444 #define VERR_PE_EXE_NOT_SUPPORTED (-602)
445 /** The iprt loader recognized a LX image, but doesn't support loading it. */
446 #define VERR_LX_EXE_NOT_SUPPORTED (-603)
447 /** The iprt loader recognized a LE image, but doesn't support loading it. */
448 #define VERR_LE_EXE_NOT_SUPPORTED (-604)
449 /** The iprt loader recognized a NE image, but doesn't support loading it. */
450 #define VERR_NE_EXE_NOT_SUPPORTED (-605)
451 /** The iprt loader recognized a MZ image, but doesn't support loading it. */
452 #define VERR_MZ_EXE_NOT_SUPPORTED (-606)
453 /** The iprt loader recognized an a.out image, but doesn't support loading it. */
454 #define VERR_AOUT_EXE_NOT_SUPPORTED (-607)
455 /** Bad executable. */
456 #define VERR_BAD_EXE_FORMAT (-608)
457 /** Symbol (export) not found. */
458 #define VERR_SYMBOL_NOT_FOUND (-609)
459 /** Module not found. */
460 #define VERR_MODULE_NOT_FOUND (-610)
461 /** The loader resolved an external symbol to an address to big for the image format. */
462 #define VERR_SYMBOL_VALUE_TOO_BIG (-611)
463 /** The image is too big. */
464 #define VERR_IMAGE_TOO_BIG (-612)
465 /** The image base address is to high for this image type. */
466 #define VERR_IMAGE_BASE_TOO_HIGH (-614)
467 /** The PE loader encountered delayed imports, a feature which hasn't been implemented yet. */
468 #define VERR_LDRPE_DELAY_IMPORT (-620)
469 /** The PE loader doesn't have a clue what the security data directory entry is all about. */
470 #define VERR_LDRPE_SECURITY (-621)
471 /** The PE loader doesn't know how to deal with the global pointer data directory entry yet. */
472 #define VERR_LDRPE_GLOBALPTR (-622)
473 /** The PE loader doesn't support the TLS data directory yet. */
474 #define VERR_LDRPE_TLS (-623)
475 /** The PE loader doesn't grok the COM descriptor data directory entry. */
476 #define VERR_LDRPE_COM_DESCRIPTOR (-624)
477 /** The PE loader encountered an unknown load config directory/header size. */
478 #define VERR_LDRPE_LOAD_CONFIG_SIZE (-625)
479 /** The PE loader encountered a lock prefix table, a feature which hasn't been implemented yet. */
480 #define VERR_LDRPE_LOCK_PREFIX_TABLE (-626)
481 /** The ELF loader doesn't handle foreign endianness. */
482 #define VERR_LDRELF_ODD_ENDIAN (-630)
483 /** The ELF image is 'dynamic', the ELF loader can only deal with 'relocatable' images at present. */
484 #define VERR_LDRELF_DYN (-631)
485 /** The ELF image is 'executable', the ELF loader can only deal with 'relocatable' images at present. */
486 #define VERR_LDRELF_EXEC (-632)
487 /** The ELF image was created for an unsupported target machine type. */
488 #define VERR_LDRELF_MACHINE (-633)
489 /** The ELF version is not supported. */
490 #define VERR_LDRELF_VERSION (-634)
491 /** The ELF loader cannot handle multiple SYMTAB sections. */
492 #define VERR_LDRELF_MULTIPLE_SYMTABS (-635)
493 /** The ELF loader encountered a relocation type which is not implemented. */
494 #define VERR_LDRELF_RELOCATION_NOT_SUPPORTED (-636)
495 /** The ELF loader encountered a bad symbol index. */
496 #define VERR_LDRELF_INVALID_SYMBOL_INDEX (-637)
497 /** The ELF loader encountered an invalid symbol name offset. */
498 #define VERR_LDRELF_INVALID_SYMBOL_NAME_OFFSET (-638)
499 /** The ELF loader encountered an invalid relocation offset. */
500 #define VERR_LDRELF_INVALID_RELOCATION_OFFSET (-639)
501 /** The ELF loader didn't find the symbol/string table for the image. */
502 #define VERR_LDRELF_NO_SYMBOL_OR_NO_STRING_TABS (-640)
503 /** @}*/
505 /** @name Generic Pipe I/O Status Codes
506 * @{
508 /** Unresolved (unknown) pipe i/o error. */
509 #define VERR_PIPE_IO_ERROR (-300)
510 /** Broken pipe. */
511 #define VERR_BROKEN_PIPE (-301)
512 /** Bad pipe. */
513 #define VERR_BAD_PIPE (-302)
514 /** Pipe is busy. */
515 #define VERR_PIPE_BUSY (-303)
516 /** No data in pipe. */
517 #define VERR_NO_DATA (-304)
518 /** Pipe is not connected. */
519 #define VERR_PIPE_NOT_CONNECTED (-305)
520 /** More data available in pipe. */
521 #define VERR_MORE_DATA (-306)
522 /** @} */
524 /** @name Generic Semaphores Status Codes
525 * @{
527 /** Unresolved (unknown) semaphore error. */
528 #define VERR_SEM_ERROR (-350)
529 /** Too many semaphores. */
530 #define VERR_TOO_MANY_SEMAPHORES (-351)
531 /** Exclusive semaphore is owned by another process. */
532 #define VERR_EXCL_SEM_ALREADY_OWNED (-352)
533 /** The semaphore is set and cannot be closed. */
534 #define VERR_SEM_IS_SET (-353)
535 /** The semaphore cannot be set again. */
536 #define VERR_TOO_MANY_SEM_REQUESTS (-354)
537 /** Attempt to release mutex not owned by caller. */
538 #define VERR_NOT_OWNER (-355)
539 /** The semaphore has been opened too many times. */
540 #define VERR_TOO_MANY_OPENS (-356)
541 /** The maximum posts for the event semaphore has been reached. */
542 #define VERR_TOO_MANY_POSTS (-357)
543 /** The event semaphore has already been posted. */
544 #define VERR_ALREADY_POSTED (-358)
545 /** The event semaphore has already been reset. */
546 #define VERR_ALREADY_RESET (-359)
547 /** The semaphore is in use. */
548 #define VERR_SEM_BUSY (-360)
549 /** The previous ownership of this semaphore has ended. */
550 #define VERR_SEM_OWNER_DIED (-361)
551 /** Failed to open semaphore by name - not found. */
552 #define VERR_SEM_NOT_FOUND (-362)
553 /** Semaphore destroyed while waiting. */
554 #define VERR_SEM_DESTROYED (-363)
555 /** Nested ownership requests are not permitted for this semaphore type. */
556 #define VERR_SEM_NESTED (-364)
557 /** Deadlock detected. */
558 #define VERR_DEADLOCK (-365)
559 /** Ping-Pong listen or speak out of turn error. */
560 #define VERR_SEM_OUT_OF_TURN (-366)
561 /** @} */
563 /** @name Generic Network I/O Status Codes
564 * @{
566 /** Unresolved (unknown) network error. */
567 #define VERR_NET_IO_ERROR (-400)
568 /** The network is busy or is out of resources. */
569 #define VERR_NET_OUT_OF_RESOURCES (-401)
570 /** Net host name not found. */
571 #define VERR_NET_HOST_NOT_FOUND (-402)
572 /** Network path not found. */
573 #define VERR_NET_PATH_NOT_FOUND (-403)
574 /** General network printing error. */
575 #define VERR_NET_PRINT_ERROR (-404)
576 /** The machine is not on the network. */
577 #define VERR_NET_NO_NETWORK (-405)
578 /** Name is not unique on the network. */
579 #define VERR_NET_NOT_UNIQUE_NAME (-406)
581 /* These are BSD networking error codes - numbers correspond, don't mess! */
582 /** Operation in progress. */
583 #define VERR_NET_IN_PROGRESS (-436)
584 /** Operation already in progress. */
585 #define VERR_NET_ALREADY_IN_PROGRESS (-437)
586 /** Attempted socket operation with a non-socket handle.
587 * (This includes closed handles.) */
588 #define VERR_NET_NOT_SOCKET (-438)
589 /** Destination address required. */
590 #define VERR_NET_DEST_ADDRESS_REQUIRED (-439)
591 /** Message too long. */
592 #define VERR_NET_MSG_SIZE (-440)
593 /** Protocol wrong type for socket. */
594 #define VERR_NET_PROTOCOL_TYPE (-441)
595 /** Protocol not available. */
596 #define VERR_NET_PROTOCOL_NOT_AVAILABLE (-442)
597 /** Protocol not supported. */
598 #define VERR_NET_PROTOCOL_NOT_SUPPORTED (-443)
599 /** Socket type not supported. */
600 #define VERR_NET_SOCKET_TYPE_NOT_SUPPORTED (-444)
601 /** Operation not supported. */
602 #define VERR_NET_OPERATION_NOT_SUPPORTED (-445)
603 /** Protocol family not supported. */
604 #define VERR_NET_PROTOCOL_FAMILY_NOT_SUPPORTED (-446)
605 /** Address family not supported by protocol family. */
606 #define VERR_NET_ADDRESS_FAMILY_NOT_SUPPORTED (-447)
607 /** Address already in use. */
608 #define VERR_NET_ADDRESS_IN_USE (-448)
609 /** Can't assign requested address. */
610 #define VERR_NET_ADDRESS_NOT_AVAILABLE (-449)
611 /** Network is down. */
612 #define VERR_NET_DOWN (-450)
613 /** Network is unreachable. */
614 #define VERR_NET_UNREACHABLE (-451)
615 /** Network dropped connection on reset. */
616 #define VERR_NET_CONNECTION_RESET (-452)
617 /** Software caused connection abort. */
618 #define VERR_NET_CONNECTION_ABORTED (-453)
619 /** Connection reset by peer. */
620 #define VERR_NET_CONNECTION_RESET_BY_PEER (-454)
621 /** No buffer space available. */
622 #define VERR_NET_NO_BUFFER_SPACE (-455)
623 /** Socket is already connected. */
624 #define VERR_NET_ALREADY_CONNECTED (-456)
625 /** Socket is not connected. */
626 #define VERR_NET_NOT_CONNECTED (-457)
627 /** Can't send after socket shutdown. */
628 #define VERR_NET_SHUTDOWN (-458)
629 /** Too many references: can't splice. */
630 #define VERR_NET_TOO_MANY_REFERENCES (-459)
631 /** Too many references: can't splice. */
632 #define VERR_NET_CONNECTION_TIMED_OUT (-460)
633 /** Connection refused. */
634 #define VERR_NET_CONNECTION_REFUSED (-461)
635 /* ELOOP is not net. */
636 /* ENAMETOOLONG is not net. */
637 /** Host is down. */
638 #define VERR_NET_HOST_DOWN (-464)
639 /** No route to host. */
640 #define VERR_NET_HOST_UNREACHABLE (-465)
641 /** @} */
643 #endif