2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the OpenSSL license (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 * NOTE: this file was auto generated by the mkerr.pl script: any changes
12 * made to it will be overwritten when the script next updates this file,
13 * only reason strings will be preserved.
17 #include <openssl/err.h>
18 #include "e_afalg_err.h"
20 /* BEGIN ERROR CODES */
21 #ifndef OPENSSL_NO_ERR
23 # define ERR_FUNC(func) ERR_PACK(0,func,0)
24 # define ERR_REASON(reason) ERR_PACK(0,0,reason)
26 static ERR_STRING_DATA AFALG_str_functs[] = {
27 {ERR_FUNC(AFALG_F_AFALG_CHK_PLATFORM), "afalg_chk_platform"},
28 {ERR_FUNC(AFALG_F_AFALG_CREATE_BIND_SK), "afalg_create_bind_sk"},
29 {ERR_FUNC(AFALG_F_AFALG_CREATE_BIND_SOCKET), "afalg_create_bind_sk"},
30 {ERR_FUNC(AFALG_F_AFALG_CREATE_SK), "afalg_create_sk"},
31 {ERR_FUNC(AFALG_F_AFALG_INIT_AIO), "afalg_init_aio"},
32 {ERR_FUNC(AFALG_F_AFALG_SETUP_ASYNC_EVENT_NOTIFICATION),
33 "afalg_setup_async_event_notification"},
34 {ERR_FUNC(AFALG_F_AFALG_SET_KEY), "afalg_set_key"},
35 {ERR_FUNC(AFALG_F_AFALG_SOCKET), "afalg_socket"},
36 {ERR_FUNC(AFALG_F_AFALG_START_CIPHER_SK), "afalg_start_cipher_sk"},
37 {ERR_FUNC(AFALG_F_BIND_AFALG), "bind_afalg"},
41 static ERR_STRING_DATA AFALG_str_reasons[] = {
42 {ERR_REASON(AFALG_R_EVENTFD_FAILED), "eventfd failed"},
43 {ERR_REASON(AFALG_R_FAILED_TO_GET_PLATFORM_INFO),
44 "failed to get platform info"},
45 {ERR_REASON(AFALG_R_INIT_FAILED), "init failed"},
46 {ERR_REASON(AFALG_R_IO_SETUP_FAILED), "io setup failed"},
47 {ERR_REASON(AFALG_R_KERNEL_DOES_NOT_SUPPORT_AFALG),
48 "kernel does not support afalg"},
49 {ERR_REASON(AFALG_R_KERNEL_DOES_NOT_SUPPORT_ASYNC_AFALG),
50 "kernel does not support async afalg"},
51 {ERR_REASON(AFALG_R_MEM_ALLOC_FAILED), "mem alloc failed"},
52 {ERR_REASON(AFALG_R_SOCKET_ACCEPT_FAILED), "socket accept failed"},
53 {ERR_REASON(AFALG_R_SOCKET_BIND_FAILED), "socket bind failed"},
54 {ERR_REASON(AFALG_R_SOCKET_CREATE_FAILED), "socket create failed"},
55 {ERR_REASON(AFALG_R_SOCKET_OPERATION_FAILED), "socket operation failed"},
56 {ERR_REASON(AFALG_R_SOCKET_SET_KEY_FAILED), "socket set key failed"},
63 static ERR_STRING_DATA AFALG_lib_name[] = {
69 static int AFALG_lib_error_code = 0;
70 static int AFALG_error_init = 1;
72 void ERR_load_AFALG_strings(void)
74 if (AFALG_lib_error_code == 0)
75 AFALG_lib_error_code = ERR_get_next_error_library();
77 if (AFALG_error_init) {
79 #ifndef OPENSSL_NO_ERR
80 ERR_load_strings(AFALG_lib_error_code, AFALG_str_functs);
81 ERR_load_strings(AFALG_lib_error_code, AFALG_str_reasons);
85 AFALG_lib_name->error = ERR_PACK(AFALG_lib_error_code, 0, 0);
86 ERR_load_strings(0, AFALG_lib_name);
91 void ERR_unload_AFALG_strings(void)
93 if (AFALG_error_init == 0) {
94 #ifndef OPENSSL_NO_ERR
95 ERR_unload_strings(AFALG_lib_error_code, AFALG_str_functs);
96 ERR_unload_strings(AFALG_lib_error_code, AFALG_str_reasons);
100 ERR_unload_strings(0, AFALG_lib_name);
102 AFALG_error_init = 1;
106 void ERR_AFALG_error(int function, int reason, char *file, int line)
108 if (AFALG_lib_error_code == 0)
109 AFALG_lib_error_code = ERR_get_next_error_library();
110 ERR_PUT_error(AFALG_lib_error_code, function, reason, file, line);