5 ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON - get library, function and
10 #include <openssl/err.h>
12 int ERR_GET_LIB(unsigned long e);
14 int ERR_GET_FUNC(unsigned long e);
16 int ERR_GET_REASON(unsigned long e);
20 The error code returned by ERR_get_error() consists of a library
21 number, function code and reason code. ERR_GET_LIB(), ERR_GET_FUNC()
22 and ERR_GET_REASON() can be used to extract these.
24 The library number and function code describe where the error
25 occurred, the reason code is the information about what went wrong.
27 Each sub-library of OpenSSL has a unique library number; function and
28 reason codes are unique within each sub-library. Note that different
29 libraries may use the same value to signal different functions and
32 B<ERR_R_...> reason codes such as B<ERR_R_MALLOC_FAILURE> are globally
33 unique. However, when checking for sub-library specific reason codes,
34 be sure to also compare the library number.
36 ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are macros.
40 The library number, function code and reason code respectively.
44 L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
48 ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in
49 all versions of SSLeay and OpenSSL.