1*2175Sjp161948=pod 2*2175Sjp161948 3*2175Sjp161948=head1 NAME 4*2175Sjp161948 5*2175Sjp161948ERR_load_strings, ERR_PACK, ERR_get_next_error_library - load 6*2175Sjp161948arbitrary error strings 7*2175Sjp161948 8*2175Sjp161948=head1 SYNOPSIS 9*2175Sjp161948 10*2175Sjp161948 #include <openssl/err.h> 11*2175Sjp161948 12*2175Sjp161948 void ERR_load_strings(int lib, ERR_STRING_DATA str[]); 13*2175Sjp161948 14*2175Sjp161948 int ERR_get_next_error_library(void); 15*2175Sjp161948 16*2175Sjp161948 unsigned long ERR_PACK(int lib, int func, int reason); 17*2175Sjp161948 18*2175Sjp161948=head1 DESCRIPTION 19*2175Sjp161948 20*2175Sjp161948ERR_load_strings() registers error strings for library number B<lib>. 21*2175Sjp161948 22*2175Sjp161948B<str> is an array of error string data: 23*2175Sjp161948 24*2175Sjp161948 typedef struct ERR_string_data_st 25*2175Sjp161948 { 26*2175Sjp161948 unsigned long error; 27*2175Sjp161948 char *string; 28*2175Sjp161948 } ERR_STRING_DATA; 29*2175Sjp161948 30*2175Sjp161948The error code is generated from the library number and a function and 31*2175Sjp161948reason code: B<error> = ERR_PACK(B<lib>, B<func>, B<reason>). 32*2175Sjp161948ERR_PACK() is a macro. 33*2175Sjp161948 34*2175Sjp161948The last entry in the array is {0,0}. 35*2175Sjp161948 36*2175Sjp161948ERR_get_next_error_library() can be used to assign library numbers 37*2175Sjp161948to user libraries at runtime. 38*2175Sjp161948 39*2175Sjp161948=head1 RETURN VALUE 40*2175Sjp161948 41*2175Sjp161948ERR_load_strings() returns no value. ERR_PACK() return the error code. 42*2175Sjp161948ERR_get_next_error_library() returns a new library number. 43*2175Sjp161948 44*2175Sjp161948=head1 SEE ALSO 45*2175Sjp161948 46*2175Sjp161948L<err(3)|err(3)>, L<ERR_load_strings(3)|ERR_load_strings(3)> 47*2175Sjp161948 48*2175Sjp161948=head1 HISTORY 49*2175Sjp161948 50*2175Sjp161948ERR_load_error_strings() and ERR_PACK() are available in all versions 51*2175Sjp161948of SSLeay and OpenSSL. ERR_get_next_error_library() was added in 52*2175Sjp161948SSLeay 0.9.0. 53*2175Sjp161948 54*2175Sjp161948=cut 55