summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dso/dso.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/dso/dso.h')
-rw-r--r--src/lib/libcrypto/dso/dso.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/libcrypto/dso/dso.h b/src/lib/libcrypto/dso/dso.h
index 9010251bbc..71a8a8af39 100644
--- a/src/lib/libcrypto/dso/dso.h
+++ b/src/lib/libcrypto/dso/dso.h
@@ -10,7 +10,7 @@
10 * are met: 10 * are met:
11 * 11 *
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 14 *
15 * 2. Redistributions in binary form must reproduce the above copyright 15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in 16 * notice, this list of conditions and the following disclaimer in
@@ -131,8 +131,7 @@ typedef char* (*DSO_NAME_CONVERTER_FUNC)(DSO *, const char *);
131 * first. */ 131 * first. */
132typedef char* (*DSO_MERGER_FUNC)(DSO *, const char *, const char *); 132typedef char* (*DSO_MERGER_FUNC)(DSO *, const char *, const char *);
133 133
134typedef struct dso_meth_st 134typedef struct dso_meth_st {
135 {
136 const char *name; 135 const char *name;
137 /* Loads a shared library, NB: new DSO_METHODs must ensure that a 136 /* Loads a shared library, NB: new DSO_METHODs must ensure that a
138 * successful load populates the loaded_filename field, and likewise a 137 * successful load populates the loaded_filename field, and likewise a
@@ -172,16 +171,15 @@ typedef struct dso_meth_st
172 int (*finish)(DSO *dso); 171 int (*finish)(DSO *dso);
173 172
174 /* Return pathname of the module containing location */ 173 /* Return pathname of the module containing location */
175 int (*pathbyaddr)(void *addr,char *path,int sz); 174 int (*pathbyaddr)(void *addr, char *path, int sz);
176 /* Perform global symbol lookup, i.e. among *all* modules */ 175 /* Perform global symbol lookup, i.e. among *all* modules */
177 void *(*globallookup)(const char *symname); 176 void *(*globallookup)(const char *symname);
178 } DSO_METHOD; 177} DSO_METHOD;
179 178
180/**********************************************************************/ 179/**********************************************************************/
181/* The low-level handle type used to refer to a loaded shared library */ 180/* The low-level handle type used to refer to a loaded shared library */
182 181
183struct dso_st 182struct dso_st {
184 {
185 DSO_METHOD *meth; 183 DSO_METHOD *meth;
186 /* Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS 184 /* Standard dlopen uses a (void *). Win32 uses a HANDLE. VMS
187 * doesn't use anything but will need to cache the filename 185 * doesn't use anything but will need to cache the filename
@@ -215,7 +213,7 @@ struct dso_st
215 * corresponds to a loaded library or not, and (b) the filename with 213 * corresponds to a loaded library or not, and (b) the filename with
216 * which it was actually loaded. */ 214 * which it was actually loaded. */
217 char *loaded_filename; 215 char *loaded_filename;
218 }; 216};
219 217
220 218
221DSO * DSO_new(void); 219DSO * DSO_new(void);
@@ -230,7 +228,7 @@ long DSO_ctrl(DSO *dso, int cmd, long larg, void *parg);
230 * oldcb is non-NULL then it is set to the function pointer value being 228 * oldcb is non-NULL then it is set to the function pointer value being
231 * replaced. Return value is non-zero for success. */ 229 * replaced. Return value is non-zero for success. */
232int DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb, 230int DSO_set_name_converter(DSO *dso, DSO_NAME_CONVERTER_FUNC cb,
233 DSO_NAME_CONVERTER_FUNC *oldcb); 231 DSO_NAME_CONVERTER_FUNC *oldcb);
234/* These functions can be used to get/set the platform-independant filename 232/* These functions can be used to get/set the platform-independant filename
235 * used for a DSO. NB: set will fail if the DSO is already loaded. */ 233 * used for a DSO. NB: set will fail if the DSO is already loaded. */
236const char *DSO_get_filename(DSO *dso); 234const char *DSO_get_filename(DSO *dso);
@@ -299,7 +297,7 @@ DSO_METHOD *DSO_METHOD_dlfcn(void);
299 * pathname of cryptolib itself is returned. Negative or zero 297 * pathname of cryptolib itself is returned. Negative or zero
300 * return value denotes error. 298 * return value denotes error.
301 */ 299 */
302int DSO_pathbyaddr(void *addr,char *path,int sz); 300int DSO_pathbyaddr(void *addr, char *path, int sz);
303 301
304/* This function should be used with caution! It looks up symbols in 302/* This function should be used with caution! It looks up symbols in
305 * *all* loaded modules and if module gets unloaded by somebody else 303 * *all* loaded modules and if module gets unloaded by somebody else