]>
Commit | Line | Data |
---|---|---|
388f2f56 UM |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON - get library, function and | |
6 | reason code | |
7 | ||
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/err.h> | |
11 | ||
12 | int ERR_GET_LIB(unsigned long e); | |
13 | ||
14 | int ERR_GET_FUNC(unsigned long e); | |
15 | ||
16 | int ERR_GET_REASON(unsigned long e); | |
17 | ||
18 | =head1 DESCRIPTION | |
19 | ||
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. | |
23 | ||
24 | The library number and function code describe where the error | |
25 | occurred, the reason code is the information about what went wrong. | |
26 | ||
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 | |
30 | reasons. | |
31 | ||
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. | |
35 | ||
36 | ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are macros. | |
37 | ||
38 | =head1 RETURN VALUES | |
39 | ||
40 | The library number, function code and reason code respectively. | |
41 | ||
42 | =head1 SEE ALSO | |
43 | ||
b97fdb57 | 44 | L<err(7)>, L<ERR_get_error(3)> |
388f2f56 UM |
45 | |
46 | =head1 HISTORY | |
47 | ||
48 | ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in | |
a528d4f0 | 49 | all versions of OpenSSL. |
388f2f56 | 50 | |
e2f92610 RS |
51 | =head1 COPYRIGHT |
52 | ||
53 | Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved. | |
54 | ||
55 | Licensed under the OpenSSL license (the "License"). You may not use | |
56 | this file except in compliance with the License. You can obtain a copy | |
57 | in the file LICENSE in the source distribution or at | |
58 | L<https://www.openssl.org/source/license.html>. | |
59 | ||
60 | =cut |