You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

errno.h 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. #ifndef ERRNO_H
  2. #define ERRNO_H
  3. /** @file
  4. *
  5. * Error codes
  6. *
  7. */
  8. /* PXE error codes are determined by the PXE specification */
  9. /* Generic errors */
  10. #define PXENV_STATUS_SUCCESS 0x00
  11. #define PXENV_STATUS_FAILURE 0x01
  12. #define PXENV_STATUS_BAD_FUNC 0x02
  13. #define PXENV_STATUS_UNSUPPORTED 0x03
  14. #define PXENV_STATUS_KEEP_UNDI 0x04
  15. #define PXENV_STATUS_KEEP_ALL 0x05
  16. #define PXENV_STATUS_OUT_OF_RESOURCES 0x06
  17. /* ARP errors (0x10 to 0x1f) */
  18. #define PXENV_STATUS_ARP_TIMEOUT 0x11
  19. /* Base-Code state errors */
  20. #define PXENV_STATUS_UDP_CLOSED 0x18
  21. #define PXENV_STATUS_UDP_OPEN 0x19
  22. #define PXENV_STATUS_TFTP_CLOSED 0x1a
  23. #define PXENV_STATUS_TFTP_OPEN 0x1b
  24. /* BIOS/system errors (0x20 to 0x2f) */
  25. #define PXENV_STATUS_MCOPY_PROBLEM 0x20
  26. #define PXENV_STATUS_BIS_INTEGRITY_FAILURE 0x21
  27. #define PXENV_STATUS_BIS_VALIDATE_FAILURE 0x22
  28. #define PXENV_STATUS_BIS_INIT_FAILURE 0x23
  29. #define PXENV_STATUS_BIS_SHUTDOWN_FAILURE 0x24
  30. #define PXENV_STATUS_BIS_GBOA_FAILURE 0x25
  31. #define PXENV_STATUS_BIS_FREE_FAILURE 0x26
  32. #define PXENV_STATUS_BIS_GSI_FAILURE 0x27
  33. #define PXENV_STATUS_BIS_BAD_CKSUM 0x28
  34. /* TFTP/MTFTP errors (0x30 to 0x3f) */
  35. #define PXENV_STATUS_TFTP_CANNOT_ARP_ADDRESS 0x30
  36. #define PXENV_STATUS_TFTP_OPEN_TIMEOUT 0x32
  37. #define PXENV_STATUS_TFTP_UNKNOWN_OPCODE 0x33
  38. #define PXENV_STATUS_TFTP_READ_TIMEOUT 0x35
  39. #define PXENV_STATUS_TFTP_ERROR_OPCODE 0x36
  40. #define PXENV_STATUS_TFTP_CANNOT_OPEN_CONNECTION 0x38
  41. #define PXENV_STATUS_TFTP_CANNOT_READ_FROM_CONNECTION 0x39
  42. #define PXENV_STATUS_TFTP_TOO_MANY_PACKAGES 0x3a
  43. #define PXENV_STATUS_TFTP_FILE_NOT_FOUND 0x3b
  44. #define PXENV_STATUS_TFTP_ACCESS_VIOLATION 0x3c
  45. #define PXENV_STATUS_TFTP_NO_MCAST_ADDRESS 0x3d
  46. #define PXENV_STATUS_TFTP_NO_FILESIZE 0x3e
  47. #define PXENV_STATUS_TFTP_INVALID_PACKET_SIZE 0x3f
  48. /* Reserved errors 0x40 to 0x4f) */
  49. /* DHCP/BOOTP errors (0x50 to 0x5f) */
  50. #define PXENV_STATUS_DHCP_TIMEOUT 0x51
  51. #define PXENV_STATUS_DHCP_NO_IP_ADDRESS 0x52
  52. #define PXENV_STATUS_DHCP_NO_BOOTFILE_NAME 0x53
  53. #define PXENV_STATUS_DHCP_BAD_IP_ADDRESS 0x54
  54. /* Driver errors (0x60 to 0x6f) */
  55. #define PXENV_STATUS_UNDI_INVALID_FUNCTION 0x60
  56. #define PXENV_STATUS_UNDI_MEDIATEST_FAILED 0x61
  57. #define PXENV_STATUS_UNDI_CANNOT_INIT_NIC_FOR_MCAST 0x62
  58. #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_NIC 0x63
  59. #define PXENV_STATUS_UNDI_CANNOT_INITIALIZE_PHY 0x64
  60. #define PXENV_STATUS_UNDI_CANNOT_READ_CONFIG_DATA 0x65
  61. #define PXENV_STATUS_UNDI_CANNOT_READ_INIT_DATA 0x66
  62. #define PXENV_STATUS_UNDI_BAD_MAC_ADDRESS 0x67
  63. #define PXENV_STATUS_UNDI_BAD_EEPROM_CHECKSUM 0x68
  64. #define PXENV_STATUS_UNDI_ERROR_SETTING_ISR 0x69
  65. #define PXENV_STATUS_UNDI_INVALID_STATE 0x6a
  66. #define PXENV_STATUS_UNDI_TRANSMIT_ERROR 0x6b
  67. #define PXENV_STATUS_UNDI_INVALID_PARAMETER 0x6c
  68. /* ROM and NBP bootstrap errors (0x70 to 0x7f) */
  69. #define PXENV_STATUS_BSTRAP_PROMPT_MENU 0x74
  70. #define PXENV_STATUS_BSTRAP_MCAST_ADDR 0x76
  71. #define PXENV_STATUS_BSTRAP_MISSING_LIST 0x77
  72. #define PXENV_STATUS_BSTRAP_NO_RESPONSE 0x78
  73. #define PXENV_STATUS_BSTRAP_FILE_TOO_BIG 0x79
  74. /* Environment NBP errors (0x80 to 0x8f) */
  75. /* Reserved errors (0x90 to 0x9f) */
  76. /* Miscellaneous errors (0xa0 to 0xaf) */
  77. #define PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE 0xa0
  78. #define PXENV_STATUS_BINL_NO_PXE_SERVER 0xa1
  79. #define PXENV_STATUS_NOT_AVAILABLE_IN_PMODE 0xa2
  80. #define PXENV_STATUS_NOT_AVAILABLE_IN_RMODE 0xa3
  81. /* BUSD errors (0xb0 to 0xbf) */
  82. #define PXENV_STATUS_BUSD_DEVICE_NOT_SUPPORTED 0xb0
  83. /* Loader errors (0xc0 to 0xcf) */
  84. #define PXENV_STATUS_LOADER_NO_FREE_BASE_MEMORY 0xc0
  85. #define PXENV_STATUS_LOADER_NO_BC_ROMID 0xc1
  86. #define PXENV_STATUS_LOADER_BAD_BC_ROMID 0xc2
  87. #define PXENV_STATUS_LOADER_BAD_BC_RUNTIME_IMAGE 0xc3
  88. #define PXENV_STATUS_LOADER_NO_UNDI_ROMID 0xc4
  89. #define PXENV_STATUS_LOADER_BAD_UNDI_ROMID 0xc5
  90. #define PXENV_STATUS_LOADER_BAD_UNDI_DRIVER_IMAGE 0xc6
  91. #define PXENV_STATUS_LOADER_NO_PXE_STRUCT 0xc8
  92. #define PXENV_STATUS_LOADER_NO_PXENV_STRUCT 0xc9
  93. #define PXENV_STATUS_LOADER_UNDI_START 0xca
  94. #define PXENV_STATUS_LOADER_BC_START 0xcb
  95. /*
  96. * The range 0xd0 to 0xff is defined as "Vendor errors" by the PXE
  97. * spec. We use this space for POSIX-like errors that aren't
  98. * accounted for by the (somewhat implementation-specific) PXE error
  99. * list.
  100. */
  101. #define ENOERR 0x00 /**< Operation completed successfully */
  102. #define EACCES 0xd0 /**< Permission denied */
  103. #define EADDRNOTAVAIL 0xd1 /**< Cannot assign requested address */
  104. #define EADDRINUSE EADDRNOTAVAIL /**< Address already in use */
  105. #define EAFNOSUPPORT 0xd2 /**< Address family not supported by protocol*/
  106. #define EAGAIN 0xd3 /**< Resource temporarily unavailable */
  107. #define EBUSY 0xd4 /**< Device or resource busy */
  108. /** Operation cancelled */
  109. #define ECANCELED PXENV_STATUS_BINL_CANCELED_BY_KEYSTROKE
  110. #define ECHILD ENOENT /**< No child processes */
  111. #define ECONNABORTED 0xd5 /**< Software caused connection abort */
  112. #define ECONNREFUSED 0xd6 /**< Connection refused */
  113. #define ECONNRESET 0xd7 /**< Connection reset by peer */
  114. #define EDESTADDRREQ 0xd8 /**< Destination address required */
  115. #define EFBIG 0xd9 /**< File too large */
  116. #define EHOSTUNREACH 0xda /**< No route to host */
  117. #define EINPROGRESS 0xdb /**< Operation now in progress */
  118. #define EINTR 0xdc /**< Interrupted system call */
  119. #define EINVAL 0xdd /**< Invalid argument */
  120. #define EIO 0xde /**< Input/output error */
  121. #define EISCONN 0xdf /**< Transport endpoint is already connected */
  122. #define ELOOP 0xf8 /**< Too many symbolic links */
  123. #define EMFILE 0xe0 /**< Too many open files */
  124. #define EMSGSIZE 0xe1 /**< Message too long */
  125. #define ENAMETOOLONG 0xe2 /**< File name too long */
  126. #define ENETDOWN 0xe3 /**< Network is down */
  127. #define ENETRESET 0xe4 /**< Network dropped connection on reset */
  128. #define ENETUNREACH 0xe5 /**< Network is unreachable */
  129. #define ENFILE EMFILE /**< Too many open files in system */
  130. /** Cannot allocate memory */
  131. #define ENOMEM PXENV_STATUS_OUT_OF_RESOURCES
  132. #define ENOBUFS 0xe6 /**< No buffer space available */
  133. #define ENODATA 0xe7 /**< No data available */
  134. #define ENODEV 0xe8 /**< No such device */
  135. #define ENOENT 0xe9 /**< No such file or directory */
  136. #define ENOEXEC 0xea /**< Exec format error */
  137. #define ENOMSG ENODATA /**< No message of the desired type */
  138. #define ENOSPC 0xeb /**< No space left on device */
  139. #define ENOSR 0xec /**< No stream resources */
  140. #define ENOSTR 0xed /**< Not a stream */
  141. #define ENOSYS 0xee /**< Function not implemented */
  142. #define ENOTCONN 0xef /**< Transport endpoint is not connected */
  143. #define ENOTSOCK 0xf0 /**< Socket operation on non-socket */
  144. #define ENOTSUP 0xf1 /**< Not supported */
  145. #define ENOTTY 0xf2 /**< Inappropriate ioctl for device */
  146. #define ENXIO ENODEV /**< No such device or address */
  147. #define EOPNOTSUPP ENOTSUP /**< Operation not supported */
  148. #define EOVERFLOW 0xf3 /**< Result too large */
  149. #define EPERM EACCES /**< Operation not permitted */
  150. #define EPROTO 0xf4 /**< Protocol error */
  151. #define EPROTONOSUPPORT 0xf5 /**< Protocol not supported */
  152. #define EPROTOTYPE 0xf6 /**< Protocol wrong type for socket */
  153. #define ERANGE EOVERFLOW /**< Result too large */
  154. #define ETIMEDOUT 0xf7 /**< Connection timed out */
  155. #define EWOULDBLOCK EAGAIN /**< Resource temporarily unavailable */
  156. extern int errno;
  157. #endif /* ERRNO_H */