|  |  |  |  | /home/brennan/n-sim/Vaike/linux/system-addons/config/libltdl/ltdl.c File Reference#include "ltdl.h"
 
Go to the source code of this file. 
|  |  | 
 Classes |  | struct | lt_caller_data |  | struct | lt_dlloader |  | struct | lt_dlhandle_struct |  | struct | lt_dlsymlists_t |  | 
 Defines |  | #define | dirent   direct |  | #define | LT_D_NAMLEN(dirent)   ((dirent)->d_namlen) |  | #define | assert(arg)   ((void) 0) |  | #define | LT_GLOBAL_DATA |  | #define | LT_READTEXT_MODE   "r" |  | #define | LTDL_SEARCHPATH_VAR   "LTDL_LIBRARY_PATH" |  | #define | LTDL_ARCHIVE_EXT   ".la" |  | #define | LT_FILENAME_MAX   1024 |  | #define | LT_SYMBOL_LENGTH   128 |  | #define | LT_SYMBOL_OVERHEAD   5 |  | #define | rpl_realloc   realloc |  | #define | LT_DLMALLOC(tp, n)   ((tp *) lt_dlmalloc ((n) * sizeof(tp))) |  | #define | LT_DLREALLOC(tp, p, n)   ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) |  | #define | LT_DLFREE(p)   LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END |  | #define | LT_EMALLOC(tp, n)   ((tp *) lt_emalloc ((n) * sizeof(tp))) |  | #define | LT_EREALLOC(tp, p, n)   ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) |  | #define | LT_DLMEM_REASSIGN(p, q) |  | #define | strdup   rpl_strdup |  | #define | strcmp   rpl_strcmp |  | #define | strchr   rpl_strchr |  | #define | strrchr   rpl_strrchr |  | #define | memcpy   rpl_memcpy |  | #define | memmove   rpl_memmove |  | #define | argz_append   rpl_argz_append |  | #define | argz_create_sep   rpl_argz_create_sep |  | #define | argz_insert   rpl_argz_insert |  | #define | argz_next   rpl_argz_next |  | #define | argz_stringify   rpl_argz_stringify |  | #define | LT_ERROR(name, diagnostic)   (diagnostic), |  | #define | LT_DLGET_FLAG(handle, flag)   (((handle)->flags & (flag)) == (flag)) |  | #define | LT_DLSET_FLAG(handle, flag)   ((handle)->flags |= (flag)) |  | #define | LT_DLRESIDENT_FLAG   (0x01 << 0) |  | #define | LT_DLIS_RESIDENT(handle)   LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) |  | #define | LT_DLSTRERROR(name)   lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] |  | #define | LT_DLMUTEX_LOCK() |  | #define | LT_DLMUTEX_UNLOCK() |  | #define | LT_DLMUTEX_SETERROR(errormsg) |  | #define | LT_DLMUTEX_GETERROR(errormsg) |  | #define | STR_DLNAME   "dlname=" |  | #define | STR_OLD_LIBRARY   "old_library=" |  | #define | STR_LIBDIR   "libdir=" |  | #define | STR_DL_DEPLIBS   "dependency_libs=" |  | #define | STR_LIBRARY_NAMES   "library_names=" |  | 
 Typedefs |  | typedef int foreach_callback_func | LT_PARAMS ((char *filename, lt_ptr data1, lt_ptr data2)) = (lt_ptr (*) LT_PARAMS((size_t))) malloc |  | 
 Functions |  | LT_GLOBAL_DATA lt_ptr lt_dlrealloc | LT_PARAMS ((lt_ptr ptr, size_t size)) |  | LT_GLOBAL_DATA void lt_dlfree | LT_PARAMS ((lt_ptr ptr)) |  | int | lt_dlmutex_register (lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock, lt_dlmutex_seterror *seterror, lt_dlmutex_geterror *geterror) |  | int | lt_dladderror (char *diagnostic) const |  | int | lt_dlseterror (int errindex) |  | int | lt_dlinit () |  | int | lt_dlpreload (lt_dlsymlist *preloaded) const |  | int | lt_dlpreload_default (lt_dlsymlist *preloaded) const |  | int | lt_dlexit () |  | lt_dlhandle | lt_dlopen (char *filename) const |  | lt_dlhandle | lt_dlopenext (char *filename) const |  | int | lt_dlforeachfile (char *search_path, int *func, lt_ptr data) const |  | int | lt_dlclose (lt_dlhandle handle) |  | lt_ptr | lt_dlsym (lt_dlhandle handle, const char *symbol) |  | const char * | lt_dlerror () |  | int | lt_dladdsearchdir (char *search_dir) const |  | int | lt_dlinsertsearchdir (char *before, const char *search_dir) const |  | int | lt_dlsetsearchpath (char *search_path) const |  | const char * | lt_dlgetsearchpath () |  | int | lt_dlmakeresident (lt_dlhandle handle) |  | int | lt_dlisresident (lt_dlhandle handle) |  | const lt_dlinfo * | lt_dlgetinfo (lt_dlhandle handle) |  | lt_dlhandle | lt_dlhandle_next (lt_dlhandle place) |  | int | lt_dlforeach (int *func, lt_ptr data) |  | lt_dlcaller_id | lt_dlcaller_register () |  | lt_ptr | lt_dlcaller_set_data (lt_dlcaller_id key, lt_dlhandle handle, lt_ptr data) |  | lt_ptr | lt_dlcaller_get_data (lt_dlcaller_id key, lt_dlhandle handle) |  | int | lt_dlloader_add (lt_dlloader *place, const struct lt_user_dlloader *dlloader, const char *loader_name) |  | int | lt_dlloader_remove (char *loader_name) const |  | lt_dlloader * | lt_dlloader_next (lt_dlloader *place) |  | const char * | lt_dlloader_name (lt_dlloader *place) |  | lt_user_data * | lt_dlloader_data (lt_dlloader *place) |  | lt_dlloader * | lt_dlloader_find (char *loader_name) const |  
 Define Documentation
 
  
    | 
        
          | #define argz_append   rpl_argz_append |  |  
 
  
    | 
        
          | #define argz_create_sep   rpl_argz_create_sep |  |  
 
  
    | 
        
          | #define argz_insert   rpl_argz_insert |  |  
 
  
    | 
        
          | #define argz_next   rpl_argz_next |  |  
 
  
    | 
        
          | #define argz_stringify   rpl_argz_stringify |  |  
 
  
    | 
        
          | #define assert | ( | arg |  | ) | ((void) 0) |  |  
 
 
  
    | 
        
          | #define LT_D_NAMLEN | ( | dirent |  | ) | ((dirent)->d_namlen) |  |  
 
  
    | 
        
          | #define LT_DLFREE | ( | p |  | ) | LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END |  |  
 
  
    | 
        
          | #define LT_DLGET_FLAG | ( | handle, |  
          |  |  | flag |  | ) | (((handle)->flags & (flag)) == (flag)) |  |  
 
  
    | 
        
          | #define LT_DLIS_RESIDENT | ( | handle |  | ) | LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) |  |  
 
  
    | 
        
          | #define LT_DLMALLOC | ( | tp, |  
          |  |  | n |  | ) | ((tp *) lt_dlmalloc ((n) * sizeof(tp))) |  |  
 
  
    | 
        
          | #define LT_DLMEM_REASSIGN | ( | p, |  
          |  |  | q |  | ) |  |  |  
  
    |  | 
Value: 
Definition at line 251 of file ltdl.c.     |  
 
  
    | 
        
          | #define LT_DLMUTEX_GETERROR | ( | errormsg |  | ) |  |  |  
 
  
    | 
        
          | #define LT_DLMUTEX_LOCK | ( |  | ) |  |  |  
  
    |  | 
Value: 
Definition at line 886 of file ltdl.c.
 
Referenced by lt_dladderror(), lt_dladdsearchdir(), lt_dlcaller_get_data(), lt_dlcaller_register(), lt_dlcaller_set_data(), lt_dlclose(), lt_dlexit(), lt_dlforeach(), lt_dlgetsearchpath(), lt_dlinit(), lt_dlinsertsearchdir(), lt_dlloader_add(), lt_dlloader_data(), lt_dlloader_find(), lt_dlloader_name(), lt_dlloader_next(), lt_dlloader_remove(), lt_dlmutex_register(), lt_dlpreload(), lt_dlpreload_default(), lt_dlseterror(), and lt_dlsetsearchpath().     |  
 
  
    | 
        
          | #define LT_DLMUTEX_SETERROR | ( | errormsg |  | ) |  |  |  
  
    |  | 
Value: LT_STMT_START { \
        if (lt_dlmutex_seterror_func)                           \
                (*lt_dlmutex_seterror_func) (errormsg);         \
        else    lt_dllast_error = (errormsg);   } LT_STMT_END
Definition at line 892 of file ltdl.c.
 
Referenced by lt_dlclose(), lt_dlerror(), lt_dlexit(), lt_dlgetinfo(), lt_dlinit(), lt_dlinsertsearchdir(), lt_dlisresident(), lt_dlloader_add(), lt_dlloader_data(), lt_dlloader_name(), lt_dlloader_remove(), lt_dlmakeresident(), lt_dlmutex_register(), lt_dlopenext(), lt_dlseterror(), and lt_dlsym().     |  
 
  
    | 
        
          | #define LT_DLMUTEX_UNLOCK | ( |  | ) |  |  |  
  
    |  | 
Value: 
Definition at line 889 of file ltdl.c.
 
Referenced by lt_dladderror(), lt_dladdsearchdir(), lt_dlcaller_register(), lt_dlclose(), lt_dlforeach(), lt_dlgetsearchpath(), lt_dlinit(), lt_dlinsertsearchdir(), lt_dlloader_data(), lt_dlloader_name(), lt_dlloader_next(), lt_dlpreload(), lt_dlpreload_default(), lt_dlseterror(), and lt_dlsetsearchpath().     |  
 
  
    | 
        
          | #define LT_DLREALLOC | ( | tp, |  
          |  |  | p, |  
          |  |  | n |  | ) | ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) |  |  
 
  
    | 
        
          | #define LT_DLRESIDENT_FLAG   (0x01 << 0) |  |  
 
  
    | 
        
          | #define LT_DLSET_FLAG | ( | handle, |  
          |  |  | flag |  | ) | ((handle)->flags |= (flag)) |  |  
 
  
    | 
        
          | #define LT_DLSTRERROR | ( | name |  | ) | lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] |  |  
  
    |  | 
 
Definition at line 864 of file ltdl.c.
 
Referenced by lt_dlclose(), lt_dlexit(), lt_dlgetinfo(), lt_dlinit(), lt_dlinsertsearchdir(), lt_dlisresident(), lt_dlloader_add(), lt_dlloader_data(), lt_dlloader_name(), lt_dlloader_remove(), lt_dlmakeresident(), lt_dlmutex_register(), lt_dlopenext(), lt_dlseterror(), and lt_dlsym().     |  
 
  
    | 
        
          | #define LT_EMALLOC | ( | tp, |  
          |  |  | n |  | ) | ((tp *) lt_emalloc ((n) * sizeof(tp))) |  |  
 
  
    | 
        
          | #define LT_EREALLOC | ( | tp, |  
          |  |  | p, |  
          |  |  | n |  | ) | ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) |  |  
 
  
    | 
        
          | #define LT_ERROR | ( | name, |  
          |  |  | diagnostic |  | ) | (diagnostic), |  |  
 
  
    | 
        
          | #define LT_FILENAME_MAX   1024 |  |  
 
 
  
    | 
        
          | #define LT_READTEXT_MODE   "r" |  |  
 
  
    | 
        
          | #define LT_SYMBOL_LENGTH   128 |  |  
 
  
    | 
        
          | #define LT_SYMBOL_OVERHEAD   5 |  |  
 
  
    | 
        
          | #define LTDL_ARCHIVE_EXT   ".la" |  |  
 
  
    | 
        
          | #define LTDL_SEARCHPATH_VAR   "LTDL_LIBRARY_PATH" |  |  
 
  
    | 
        
          | #define memcpy   rpl_memcpy |  |  
  
    |  | 
 
Definition at line 378 of file ltdl.c.
 
Referenced by link_entry_to_rtentry(), lwip_ore_init(), main(), mesh_ioctl(), mesh_raw_send(), mesh_recv(), mesh_recvmsg(), mesh_send(), mesh_sendmsg(), MPI_Init(), neighbor_address(), neighbor_discovery(), PeakTrack(), rcv_ctl_commands(), strength_send_mesh_discovery(), tftp_init(), timed_recv(), and timed_recv_peek().     |  
 
  
    | 
        
          | #define memmove   rpl_memmove |  |  
 
  
    | 
        
          | #define rpl_realloc   realloc |  |  
 
  
    | 
        
          | #define STR_DL_DEPLIBS   "dependency_libs=" |  |  
 
  
    | 
        
          | #define STR_DLNAME   "dlname=" |  |  
 
  
    | 
        
          | #define STR_LIBDIR   "libdir=" |  |  
 
  
    | 
        
          | #define STR_LIBRARY_NAMES   "library_names=" |  |  
 
  
    | 
        
          | #define STR_OLD_LIBRARY   "old_library=" |  |  
 
  
    | 
        
          | #define strchr   rpl_strchr |  |  
 
  
    | 
        
          | #define strcmp   rpl_strcmp |  |  
  
    |  | 
 
Definition at line 286 of file ltdl.c.
 
Referenced by get_gateways(), lt_dlloader_find(), lt_dlopenext(), main(), metric_by_name(), Configuration::on_character_data(), Configuration::on_end_element(), Configuration::on_start_element(), sim_if_service(), Configuration::Source_type_index(), and Configuration::Source_type_tree_index().     |  
 
  
    | 
        
          | #define strdup   rpl_strdup |  |  
 
  
    | 
        
          | #define strrchr   rpl_strrchr |  |  
 Typedef Documentation
 
  
    | 
        
          | LT_SCOPE int lt_dlloader_remove LT_PARAMS = (lt_ptr (*) LT_PARAMS((size_t))) malloc |  |  
 Function Documentation
 
  
    | 
        
          | int lt_dladderror | ( | char * | diagnostic | ) | const |  |  
 
  
    | 
        
          | int lt_dladdsearchdir | ( | char * | search_dir | ) | const |  |  
 
 
 
 
 
  
    | 
        
          | const char* lt_dlerror | ( |  | ) |  |  |  
 
 
  
    | 
        
          | int lt_dlforeach | ( | int * | func, |  
          |  |  | lt_ptr | data |  
          |  | ) |  |  |  
 
  
    | 
        
          | int lt_dlforeachfile | ( | char * | search_path, |  
          |  |  | int * | func, |  
          |  |  | lt_ptr | data |  
          |  | ) | const |  |  
 
 
  
    | 
        
          | const char* lt_dlgetsearchpath | ( |  | ) |  |  |  
 
 
 
  
    | 
        
          | int lt_dlinsertsearchdir | ( | char * | before, |  
          |  |  | const char * | search_dir |  
          |  | ) | const |  |  
 
 
  
    |  | 
 
Definition at line 4310 of file ltdl.c.
 
References lt_user_dlloader::dlloader_data, lt_dlloader::dlloader_data, lt_user_dlloader::dlloader_exit, lt_dlloader::dlloader_exit, lt_dlloader::find_sym, lt_user_dlloader::find_sym, lt_dlloader::loader_name, LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLSTRERROR, LT_EMALLOC, lt_dlloader::module_close, lt_user_dlloader::module_close, lt_dlloader::module_open, lt_user_dlloader::module_open, lt_dlloader::next, lt_user_dlloader::sym_prefix, and lt_dlloader::sym_prefix.
 
Referenced by lt_dlinit().     |  
 
 
  
    | 
        
          | lt_dlloader* lt_dlloader_find | ( | char * | loader_name | ) | const |  |  
 
 
 
  
    | 
        
          | int lt_dlloader_remove | ( | char * | loader_name | ) | const |  |  
 
 
  
    | 
        
          | int lt_dlmutex_register | ( | lt_dlmutex_lock * | lock, |  
          |  |  | lt_dlmutex_unlock * | unlock, |  
          |  |  | lt_dlmutex_seterror * | seterror, |  
          |  |  | lt_dlmutex_geterror * | geterror |  
          |  | ) |  |  |  
 
 
 
 
 
  
    | 
        
          | int lt_dlseterror | ( | int | errindex | ) |  |  |  
 
  
    | 
        
          | int lt_dlsetsearchpath | ( | char * | search_path | ) | const |  |  
 
  
    | 
        
          | lt_ptr lt_dlsym | ( | lt_dlhandle | handle, |  
          |  |  | const char * | symbol |  
          |  | ) |  |  |  
 
  
    | 
        
          | LT_GLOBAL_DATA void lt_dlfree LT_PARAMS | ( | (lt_ptr ptr) |  | ) |  |  |  
 
  
    | 
        
          | LT_GLOBAL_DATA lt_ptr lt_dlrealloc LT_PARAMS | ( | (lt_ptr ptr, size_t size) |  | ) |  |  |  |