PageRenderTime 53ms CodeModel.GetById 27ms RepoModel.GetById 0ms app.codeStats 0ms

/i4k/orionsocket-dev-alpha/src/err.h

http://bugsec.googlecode.com/
C Header | 58 lines | 31 code | 5 blank | 22 comment | 0 complexity | 30efdfc28c68971d95e2bef9963a67f4 MD5 | raw file
Possible License(s): Apache-2.0, BSD-2-Clause
  1. /*
  2. OrionSocket - Error Codes
  3. --------------------------------
  4. Author: Tiago Natel de Moura <tiago4orion@gmail.com>
  5. Copyright 2010, 2011 by Tiago Natel de Moura. All Rights Reserved.
  6. Licensed under the Apache License, Version 2.0 (the "License");
  7. you may not use this file except in compliance with the License.
  8. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. */
  16. #ifndef __ORION_SOCKET_ERR_
  17. #define __ORION_SOCKET_ERR_
  18. #define ORION_EAI_BADFLAGS -1 /* Invalid value for `ai_flags' field. */
  19. #define ORION_EAI_NONAME -2 /* NAME or SERVICE is unknown. */
  20. #define ORION_EAI_AGAIN -3 /* Temporary failure in name resolution. */
  21. #define ORION_EAI_FAIL -4 /* Non-recoverable failure in name res. */
  22. #define ORION_EAI_FAMILY -6 /* `ai_family' not supported. */
  23. #define ORION_EAI_SOCKTYPE -7 /* `ai_socktype' not supported. */
  24. #define ORION_EAI_SERVICE -8 /* SERVICE not supported for `ai_socktype'. */
  25. #define ORION_EAI_MEMORY -10 /* Memory allocation failure. */
  26. #define ORION_EAI_SYSTEM -11 /* System error returned in `errno'. */
  27. #define ORION_EAI_OVERFLOW -12 /* Argument buffer overflow. */
  28. #define ORION_EAI_NODATA -5 /* No address associated with NAME. */
  29. #define ORION_EAI_ADDRFAMILY -9 /* Address family for NAME not supported. */
  30. #define ORION_EAI_INPROGRESS -100 /* Processing request in progress. */
  31. #define ORION_EAI_CANCELED -101 /* Request canceled. */
  32. #define ORION_EAI_NOTCANCELED -102 /* Request not canceled. */
  33. #define ORION_EAI_ALLDONE -103 /* All requests done. */
  34. #define ORION_EAI_INTR -104 /* Interrupted by a signal. */
  35. #define ORION_EAI_IDN_ENCODE -105 /* IDN encoding failed. */
  36. #define ORION_SOCKET_ERR_UNKNOWN -200
  37. #define ORION_SOCKET_ERR_ALLOC -201
  38. #define ORION_SOCKET_ERR_HTTPREQUEST -202
  39. #define ORION_SOCKET_INVALIDHOST -203
  40. #define ORION_SOCKET_INVALIDHTTPREQUEST -204
  41. #define ORION_SOCKET_ADDR_NOTFOUND -205
  42. #define ORION_SOCKET_BIND_ERROR -206
  43. #define ORION_SOCKET_ACCEPT_ERROR -207
  44. void orion_socket_geterror(_i8 error, char* buffer);
  45. void _orion_socket_geterror_macroname(_i8 error, char* buffer);
  46. #endif /* __ORION_SOCKET_ERR_ */