ERR_GET_LIB.pod 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. =pod
  2. =head1 NAME
  3. ERR_GET_LIB, ERR_GET_FUNC, ERR_GET_REASON - get library, function and
  4. reason code
  5. =head1 SYNOPSIS
  6. #include <openssl/err.h>
  7. int ERR_GET_LIB(unsigned long e);
  8. int ERR_GET_FUNC(unsigned long e);
  9. int ERR_GET_REASON(unsigned long e);
  10. =head1 DESCRIPTION
  11. The error code returned by ERR_get_error() consists of a library
  12. number, function code and reason code. ERR_GET_LIB(), ERR_GET_FUNC()
  13. and ERR_GET_REASON() can be used to extract these.
  14. The library number and function code describe where the error
  15. occurred, the reason code is the information about what went wrong.
  16. Each sub-library of OpenSSL has a unique library number; function and
  17. reason codes are unique within each sub-library. Note that different
  18. libraries may use the same value to signal different functions and
  19. reasons.
  20. B<ERR_R_...> reason codes such as B<ERR_R_MALLOC_FAILURE> are globally
  21. unique. However, when checking for sub-library specific reason codes,
  22. be sure to also compare the library number.
  23. ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are macros.
  24. =head1 RETURN VALUES
  25. The library number, function code and reason code respectively.
  26. =head1 SEE ALSO
  27. L<err(3)|err(3)>, L<ERR_get_error(3)|ERR_get_error(3)>
  28. =head1 HISTORY
  29. ERR_GET_LIB(), ERR_GET_FUNC() and ERR_GET_REASON() are available in
  30. all versions of SSLeay and OpenSSL.
  31. =cut