bio_err.c 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * Generated by util/mkerr.pl DO NOT EDIT
  3. * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
  4. *
  5. * Licensed under the OpenSSL license (the "License"). You may not use
  6. * this file except in compliance with the License. You can obtain a copy
  7. * in the file LICENSE in the source distribution or at
  8. * https://www.openssl.org/source/license.html
  9. */
  10. #include <stdio.h>
  11. #include <openssl/err.h>
  12. #include <openssl/bio.h>
  13. /* BEGIN ERROR CODES */
  14. #ifndef OPENSSL_NO_ERR
  15. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_BIO,func,0)
  16. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_BIO,0,reason)
  17. static ERR_STRING_DATA BIO_str_functs[] = {
  18. {ERR_FUNC(BIO_F_ACPT_STATE), "acpt_state"},
  19. {ERR_FUNC(BIO_F_ADDR_STRINGS), "addr_strings"},
  20. {ERR_FUNC(BIO_F_BIO_ACCEPT), "BIO_accept"},
  21. {ERR_FUNC(BIO_F_BIO_ACCEPT_EX), "BIO_accept_ex"},
  22. {ERR_FUNC(BIO_F_BIO_ADDR_NEW), "BIO_ADDR_new"},
  23. {ERR_FUNC(BIO_F_BIO_CALLBACK_CTRL), "BIO_callback_ctrl"},
  24. {ERR_FUNC(BIO_F_BIO_CONNECT), "BIO_connect"},
  25. {ERR_FUNC(BIO_F_BIO_CTRL), "BIO_ctrl"},
  26. {ERR_FUNC(BIO_F_BIO_GETS), "BIO_gets"},
  27. {ERR_FUNC(BIO_F_BIO_GET_HOST_IP), "BIO_get_host_ip"},
  28. {ERR_FUNC(BIO_F_BIO_GET_NEW_INDEX), "BIO_get_new_index"},
  29. {ERR_FUNC(BIO_F_BIO_GET_PORT), "BIO_get_port"},
  30. {ERR_FUNC(BIO_F_BIO_LISTEN), "BIO_listen"},
  31. {ERR_FUNC(BIO_F_BIO_LOOKUP), "BIO_lookup"},
  32. {ERR_FUNC(BIO_F_BIO_LOOKUP_EX), "BIO_lookup_ex"},
  33. {ERR_FUNC(BIO_F_BIO_MAKE_PAIR), "bio_make_pair"},
  34. {ERR_FUNC(BIO_F_BIO_NEW), "BIO_new"},
  35. {ERR_FUNC(BIO_F_BIO_NEW_DGRAM_SCTP), "BIO_new_dgram_sctp"},
  36. {ERR_FUNC(BIO_F_BIO_NEW_FILE), "BIO_new_file"},
  37. {ERR_FUNC(BIO_F_BIO_NEW_MEM_BUF), "BIO_new_mem_buf"},
  38. {ERR_FUNC(BIO_F_BIO_NREAD), "BIO_nread"},
  39. {ERR_FUNC(BIO_F_BIO_NREAD0), "BIO_nread0"},
  40. {ERR_FUNC(BIO_F_BIO_NWRITE), "BIO_nwrite"},
  41. {ERR_FUNC(BIO_F_BIO_NWRITE0), "BIO_nwrite0"},
  42. {ERR_FUNC(BIO_F_BIO_PARSE_HOSTSERV), "BIO_parse_hostserv"},
  43. {ERR_FUNC(BIO_F_BIO_PUTS), "BIO_puts"},
  44. {ERR_FUNC(BIO_F_BIO_READ), "BIO_read"},
  45. {ERR_FUNC(BIO_F_BIO_READ_EX), "BIO_read_ex"},
  46. {ERR_FUNC(BIO_F_BIO_READ_INTERN), "bio_read_intern"},
  47. {ERR_FUNC(BIO_F_BIO_SOCKET), "BIO_socket"},
  48. {ERR_FUNC(BIO_F_BIO_SOCKET_NBIO), "BIO_socket_nbio"},
  49. {ERR_FUNC(BIO_F_BIO_SOCK_INFO), "BIO_sock_info"},
  50. {ERR_FUNC(BIO_F_BIO_SOCK_INIT), "BIO_sock_init"},
  51. {ERR_FUNC(BIO_F_BIO_WRITE), "BIO_write"},
  52. {ERR_FUNC(BIO_F_BIO_WRITE_EX), "BIO_write_ex"},
  53. {ERR_FUNC(BIO_F_BIO_WRITE_INTERN), "bio_write_intern"},
  54. {ERR_FUNC(BIO_F_BUFFER_CTRL), "buffer_ctrl"},
  55. {ERR_FUNC(BIO_F_CONN_CTRL), "conn_ctrl"},
  56. {ERR_FUNC(BIO_F_CONN_STATE), "conn_state"},
  57. {ERR_FUNC(BIO_F_DGRAM_SCTP_READ), "dgram_sctp_read"},
  58. {ERR_FUNC(BIO_F_DGRAM_SCTP_WRITE), "dgram_sctp_write"},
  59. {ERR_FUNC(BIO_F_FILE_CTRL), "file_ctrl"},
  60. {ERR_FUNC(BIO_F_FILE_READ), "file_read"},
  61. {ERR_FUNC(BIO_F_LINEBUFFER_CTRL), "linebuffer_ctrl"},
  62. {ERR_FUNC(BIO_F_MEM_WRITE), "mem_write"},
  63. {ERR_FUNC(BIO_F_SSL_NEW), "SSL_new"},
  64. {0, NULL}
  65. };
  66. static ERR_STRING_DATA BIO_str_reasons[] = {
  67. {ERR_REASON(BIO_R_ACCEPT_ERROR), "accept error"},
  68. {ERR_REASON(BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET),
  69. "addrinfo addr is not af inet"},
  70. {ERR_REASON(BIO_R_AMBIGUOUS_HOST_OR_SERVICE),
  71. "ambiguous host or service"},
  72. {ERR_REASON(BIO_R_BAD_FOPEN_MODE), "bad fopen mode"},
  73. {ERR_REASON(BIO_R_BROKEN_PIPE), "broken pipe"},
  74. {ERR_REASON(BIO_R_CONNECT_ERROR), "connect error"},
  75. {ERR_REASON(BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET),
  76. "gethostbyname addr is not af inet"},
  77. {ERR_REASON(BIO_R_GETSOCKNAME_ERROR), "getsockname error"},
  78. {ERR_REASON(BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS),
  79. "getsockname truncated address"},
  80. {ERR_REASON(BIO_R_GETTING_SOCKTYPE), "getting socktype"},
  81. {ERR_REASON(BIO_R_INVALID_ARGUMENT), "invalid argument"},
  82. {ERR_REASON(BIO_R_INVALID_SOCKET), "invalid socket"},
  83. {ERR_REASON(BIO_R_IN_USE), "in use"},
  84. {ERR_REASON(BIO_R_LENGTH_TOO_LONG), "length too long"},
  85. {ERR_REASON(BIO_R_LISTEN_V6_ONLY), "listen v6 only"},
  86. {ERR_REASON(BIO_R_LOOKUP_RETURNED_NOTHING), "lookup returned nothing"},
  87. {ERR_REASON(BIO_R_MALFORMED_HOST_OR_SERVICE),
  88. "malformed host or service"},
  89. {ERR_REASON(BIO_R_NBIO_CONNECT_ERROR), "nbio connect error"},
  90. {ERR_REASON(BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED),
  91. "no accept addr or service specified"},
  92. {ERR_REASON(BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED),
  93. "no hostname or service specified"},
  94. {ERR_REASON(BIO_R_NO_PORT_DEFINED), "no port defined"},
  95. {ERR_REASON(BIO_R_NO_SUCH_FILE), "no such file"},
  96. {ERR_REASON(BIO_R_NULL_PARAMETER), "null parameter"},
  97. {ERR_REASON(BIO_R_UNABLE_TO_BIND_SOCKET), "unable to bind socket"},
  98. {ERR_REASON(BIO_R_UNABLE_TO_CREATE_SOCKET), "unable to create socket"},
  99. {ERR_REASON(BIO_R_UNABLE_TO_KEEPALIVE), "unable to keepalive"},
  100. {ERR_REASON(BIO_R_UNABLE_TO_LISTEN_SOCKET), "unable to listen socket"},
  101. {ERR_REASON(BIO_R_UNABLE_TO_NODELAY), "unable to nodelay"},
  102. {ERR_REASON(BIO_R_UNABLE_TO_REUSEADDR), "unable to reuseaddr"},
  103. {ERR_REASON(BIO_R_UNAVAILABLE_IP_FAMILY), "unavailable ip family"},
  104. {ERR_REASON(BIO_R_UNINITIALIZED), "uninitialized"},
  105. {ERR_REASON(BIO_R_UNKNOWN_INFO_TYPE), "unknown info type"},
  106. {ERR_REASON(BIO_R_UNSUPPORTED_IP_FAMILY), "unsupported ip family"},
  107. {ERR_REASON(BIO_R_UNSUPPORTED_METHOD), "unsupported method"},
  108. {ERR_REASON(BIO_R_UNSUPPORTED_PROTOCOL_FAMILY),
  109. "unsupported protocol family"},
  110. {ERR_REASON(BIO_R_WRITE_TO_READ_ONLY_BIO), "write to read only BIO"},
  111. {ERR_REASON(BIO_R_WSASTARTUP), "WSAStartup"},
  112. {0, NULL}
  113. };
  114. #endif
  115. int ERR_load_BIO_strings(void)
  116. {
  117. #ifndef OPENSSL_NO_ERR
  118. if (ERR_func_error_string(BIO_str_functs[0].error) == NULL) {
  119. ERR_load_strings(0, BIO_str_functs);
  120. ERR_load_strings(0, BIO_str_reasons);
  121. }
  122. #endif
  123. return 1;
  124. }