diff options
Diffstat (limited to 'src/lib/libcrypto/dso/dso.h')
-rw-r--r-- | src/lib/libcrypto/dso/dso.h | 43 |
1 files changed, 42 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dso/dso.h b/src/lib/libcrypto/dso/dso.h index 3e51913a72..839f2e0617 100644 --- a/src/lib/libcrypto/dso/dso.h +++ b/src/lib/libcrypto/dso/dso.h | |||
@@ -170,6 +170,11 @@ typedef struct dso_meth_st | |||
170 | /* [De]Initialisation handlers. */ | 170 | /* [De]Initialisation handlers. */ |
171 | int (*init)(DSO *dso); | 171 | int (*init)(DSO *dso); |
172 | int (*finish)(DSO *dso); | 172 | int (*finish)(DSO *dso); |
173 | |||
174 | /* Return pathname of the module containing location */ | ||
175 | int (*pathbyaddr)(void *addr,char *path,int sz); | ||
176 | /* Perform global symbol lookup, i.e. among *all* modules */ | ||
177 | void *(*globallookup)(const char *symname); | ||
173 | } DSO_METHOD; | 178 | } DSO_METHOD; |
174 | 179 | ||
175 | /**********************************************************************/ | 180 | /**********************************************************************/ |
@@ -183,7 +188,7 @@ struct dso_st | |||
183 | * for use in the dso_bind handler. All in all, let each | 188 | * for use in the dso_bind handler. All in all, let each |
184 | * method control its own destiny. "Handles" and such go in | 189 | * method control its own destiny. "Handles" and such go in |
185 | * a STACK. */ | 190 | * a STACK. */ |
186 | STACK *meth_data; | 191 | STACK_OF(void) *meth_data; |
187 | int references; | 192 | int references; |
188 | int flags; | 193 | int flags; |
189 | /* For use by applications etc ... use this for your bits'n'pieces, | 194 | /* For use by applications etc ... use this for your bits'n'pieces, |
@@ -296,6 +301,30 @@ DSO_METHOD *DSO_METHOD_win32(void); | |||
296 | /* If VMS is defined, use shared images. If not, return NULL. */ | 301 | /* If VMS is defined, use shared images. If not, return NULL. */ |
297 | DSO_METHOD *DSO_METHOD_vms(void); | 302 | DSO_METHOD *DSO_METHOD_vms(void); |
298 | 303 | ||
304 | /* This function writes null-terminated pathname of DSO module | ||
305 | * containing 'addr' into 'sz' large caller-provided 'path' and | ||
306 | * returns the number of characters [including trailing zero] | ||
307 | * written to it. If 'sz' is 0 or negative, 'path' is ignored and | ||
308 | * required amount of charachers [including trailing zero] to | ||
309 | * accomodate pathname is returned. If 'addr' is NULL, then | ||
310 | * pathname of cryptolib itself is returned. Negative or zero | ||
311 | * return value denotes error. | ||
312 | */ | ||
313 | int DSO_pathbyaddr(void *addr,char *path,int sz); | ||
314 | |||
315 | /* This function should be used with caution! It looks up symbols in | ||
316 | * *all* loaded modules and if module gets unloaded by somebody else | ||
317 | * attempt to dereference the pointer is doomed to have fatal | ||
318 | * consequences. Primary usage for this function is to probe *core* | ||
319 | * system functionality, e.g. check if getnameinfo(3) is available | ||
320 | * at run-time without bothering about OS-specific details such as | ||
321 | * libc.so.versioning or where does it actually reside: in libc | ||
322 | * itself or libsocket. */ | ||
323 | void *DSO_global_lookup(const char *name); | ||
324 | |||
325 | /* If BeOS is defined, use shared images. If not, return NULL. */ | ||
326 | DSO_METHOD *DSO_METHOD_beos(void); | ||
327 | |||
299 | /* BEGIN ERROR CODES */ | 328 | /* BEGIN ERROR CODES */ |
300 | /* The following lines are auto generated by the script mkerr.pl. Any changes | 329 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
301 | * made after this point may be overwritten when the script is next run. | 330 | * made after this point may be overwritten when the script is next run. |
@@ -305,6 +334,11 @@ void ERR_load_DSO_strings(void); | |||
305 | /* Error codes for the DSO functions. */ | 334 | /* Error codes for the DSO functions. */ |
306 | 335 | ||
307 | /* Function codes. */ | 336 | /* Function codes. */ |
337 | #define DSO_F_BEOS_BIND_FUNC 144 | ||
338 | #define DSO_F_BEOS_BIND_VAR 145 | ||
339 | #define DSO_F_BEOS_LOAD 146 | ||
340 | #define DSO_F_BEOS_NAME_CONVERTER 147 | ||
341 | #define DSO_F_BEOS_UNLOAD 148 | ||
308 | #define DSO_F_DLFCN_BIND_FUNC 100 | 342 | #define DSO_F_DLFCN_BIND_FUNC 100 |
309 | #define DSO_F_DLFCN_BIND_VAR 101 | 343 | #define DSO_F_DLFCN_BIND_VAR 101 |
310 | #define DSO_F_DLFCN_LOAD 102 | 344 | #define DSO_F_DLFCN_LOAD 102 |
@@ -324,22 +358,29 @@ void ERR_load_DSO_strings(void); | |||
324 | #define DSO_F_DSO_FREE 111 | 358 | #define DSO_F_DSO_FREE 111 |
325 | #define DSO_F_DSO_GET_FILENAME 127 | 359 | #define DSO_F_DSO_GET_FILENAME 127 |
326 | #define DSO_F_DSO_GET_LOADED_FILENAME 128 | 360 | #define DSO_F_DSO_GET_LOADED_FILENAME 128 |
361 | #define DSO_F_DSO_GLOBAL_LOOKUP 139 | ||
327 | #define DSO_F_DSO_LOAD 112 | 362 | #define DSO_F_DSO_LOAD 112 |
328 | #define DSO_F_DSO_MERGE 132 | 363 | #define DSO_F_DSO_MERGE 132 |
329 | #define DSO_F_DSO_NEW_METHOD 113 | 364 | #define DSO_F_DSO_NEW_METHOD 113 |
365 | #define DSO_F_DSO_PATHBYADDR 140 | ||
330 | #define DSO_F_DSO_SET_FILENAME 129 | 366 | #define DSO_F_DSO_SET_FILENAME 129 |
331 | #define DSO_F_DSO_SET_NAME_CONVERTER 122 | 367 | #define DSO_F_DSO_SET_NAME_CONVERTER 122 |
332 | #define DSO_F_DSO_UP_REF 114 | 368 | #define DSO_F_DSO_UP_REF 114 |
369 | #define DSO_F_GLOBAL_LOOKUP_FUNC 138 | ||
370 | #define DSO_F_PATHBYADDR 137 | ||
333 | #define DSO_F_VMS_BIND_SYM 115 | 371 | #define DSO_F_VMS_BIND_SYM 115 |
334 | #define DSO_F_VMS_LOAD 116 | 372 | #define DSO_F_VMS_LOAD 116 |
335 | #define DSO_F_VMS_MERGER 133 | 373 | #define DSO_F_VMS_MERGER 133 |
336 | #define DSO_F_VMS_UNLOAD 117 | 374 | #define DSO_F_VMS_UNLOAD 117 |
337 | #define DSO_F_WIN32_BIND_FUNC 118 | 375 | #define DSO_F_WIN32_BIND_FUNC 118 |
338 | #define DSO_F_WIN32_BIND_VAR 119 | 376 | #define DSO_F_WIN32_BIND_VAR 119 |
377 | #define DSO_F_WIN32_GLOBALLOOKUP 142 | ||
378 | #define DSO_F_WIN32_GLOBALLOOKUP_FUNC 143 | ||
339 | #define DSO_F_WIN32_JOINER 135 | 379 | #define DSO_F_WIN32_JOINER 135 |
340 | #define DSO_F_WIN32_LOAD 120 | 380 | #define DSO_F_WIN32_LOAD 120 |
341 | #define DSO_F_WIN32_MERGER 134 | 381 | #define DSO_F_WIN32_MERGER 134 |
342 | #define DSO_F_WIN32_NAME_CONVERTER 125 | 382 | #define DSO_F_WIN32_NAME_CONVERTER 125 |
383 | #define DSO_F_WIN32_PATHBYADDR 141 | ||
343 | #define DSO_F_WIN32_SPLITTER 136 | 384 | #define DSO_F_WIN32_SPLITTER 136 |
344 | #define DSO_F_WIN32_UNLOAD 121 | 385 | #define DSO_F_WIN32_UNLOAD 121 |
345 | 386 | ||