N-sim
Emulation and simulation of
Wireless Sensor Networks



   Home


   Project Page


   Download


   CVS



   Installation


   Configuration


   Plug-ins




 Hosted by
SourceForge.net Logo

/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_dlinfolt_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_dlloaderlt_dlloader_next (lt_dlloader *place)
const char * lt_dlloader_name (lt_dlloader *place)
lt_user_datalt_dlloader_data (lt_dlloader *place)
lt_dlloaderlt_dlloader_find (char *loader_name) const


Define Documentation

#define argz_append   rpl_argz_append
 

Definition at line 567 of file ltdl.c.

#define argz_create_sep   rpl_argz_create_sep
 

Definition at line 609 of file ltdl.c.

#define argz_insert   rpl_argz_insert
 

Definition at line 672 of file ltdl.c.

#define argz_next   rpl_argz_next
 

Definition at line 729 of file ltdl.c.

#define argz_stringify   rpl_argz_stringify
 

Definition at line 774 of file ltdl.c.

#define assert arg   )     ((void) 0)
 

Definition at line 126 of file ltdl.c.

Referenced by audio_open(), lt_dladderror(), lt_dlopenext(), and main().

#define dirent   direct
 

Definition at line 105 of file ltdl.c.

#define LT_D_NAMLEN dirent   )     ((dirent)->d_namlen)
 

Definition at line 106 of file ltdl.c.

#define LT_DLFREE  )     LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END
 

Definition at line 243 of file ltdl.c.

Referenced by lt_dlclose(), lt_dlopenext(), lt_dlsetsearchpath(), and lt_dlsym().

#define LT_DLGET_FLAG handle,
flag   )     (((handle)->flags & (flag)) == (flag))
 

Definition at line 855 of file ltdl.c.

#define LT_DLIS_RESIDENT handle   )     LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG)
 

Definition at line 861 of file ltdl.c.

Referenced by lt_dlclose(), lt_dlexit(), and lt_dlisresident().

#define LT_DLMALLOC tp,
 )     ((tp *) lt_dlmalloc ((n) * sizeof(tp)))
 

Definition at line 241 of file ltdl.c.

#define LT_DLMEM_REASSIGN p,
 ) 
 

Value:

LT_STMT_START { \
        if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; }   \
                                                } LT_STMT_END

Definition at line 251 of file ltdl.c.

#define LT_DLMUTEX_GETERROR errormsg   ) 
 

Value:

LT_STMT_START { \
        if (lt_dlmutex_seterror_func)                           \
                (errormsg) = (*lt_dlmutex_geterror_func) ();    \
        else    (errormsg) = lt_dllast_error;   } LT_STMT_END

Definition at line 896 of file ltdl.c.

Referenced by lt_dlerror(), and lt_dlsym().

 
#define LT_DLMUTEX_LOCK  ) 
 

Value:

LT_STMT_START { \
        if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)();    \
                                                } LT_STMT_END

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:

LT_STMT_START { \
        if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\
                                                } LT_STMT_END

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,
 )     ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp)))
 

Definition at line 242 of file ltdl.c.

#define LT_DLRESIDENT_FLAG   (0x01 << 0)
 

Definition at line 858 of file ltdl.c.

Referenced by lt_dlmakeresident().

#define LT_DLSET_FLAG handle,
flag   )     ((handle)->flags |= (flag))
 

Definition at line 856 of file ltdl.c.

Referenced by lt_dlmakeresident().

#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,
 )     ((tp *) lt_emalloc ((n) * sizeof(tp)))
 

Definition at line 246 of file ltdl.c.

Referenced by lt_dlloader_add(), lt_dlopenext(), and lt_dlsym().

#define LT_EREALLOC tp,
p,
 )     ((tp *) lt_erealloc ((p), (n) * sizeof(tp)))
 

Definition at line 247 of file ltdl.c.

Referenced by lt_dladderror().

#define LT_ERROR name,
diagnostic   )     (diagnostic),
 

#define LT_FILENAME_MAX   1024
 

Definition at line 192 of file ltdl.c.

#define LT_GLOBAL_DATA
 

Definition at line 144 of file ltdl.c.

#define LT_READTEXT_MODE   "r"
 

Definition at line 152 of file ltdl.c.

#define LT_SYMBOL_LENGTH   128
 

Definition at line 197 of file ltdl.c.

Referenced by lt_dlsym().

#define LT_SYMBOL_OVERHEAD   5
 

Definition at line 201 of file ltdl.c.

Referenced by lt_dlsym().

#define LTDL_ARCHIVE_EXT   ".la"
 

Definition at line 188 of file ltdl.c.

#define LTDL_SEARCHPATH_VAR   "LTDL_LIBRARY_PATH"
 

Definition at line 184 of file ltdl.c.

#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
 

Definition at line 404 of file ltdl.c.

#define rpl_realloc   realloc
 

Definition at line 217 of file ltdl.c.

#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
 

Definition at line 318 of file ltdl.c.

Referenced by reconfig1().

#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
 

Definition at line 260 of file ltdl.c.

#define strrchr   rpl_strrchr
 

Definition at line 344 of file ltdl.c.

Referenced by l4fprov_file_open_component(), and lt_dlopenext().


Typedef Documentation

LT_SCOPE int lt_dlloader_remove LT_PARAMS = (lt_ptr (*) LT_PARAMS((size_t))) malloc
 

Definition at line 2144 of file ltdl.c.


Function Documentation

int lt_dladderror char *  diagnostic  )  const
 

Definition at line 960 of file ltdl.c.

References assert, LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK, LT_EREALLOC, and LT_ERROR_MAX.

int lt_dladdsearchdir char *  search_dir  )  const
 

Definition at line 4037 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

lt_ptr lt_dlcaller_get_data lt_dlcaller_id  key,
lt_dlhandle  handle
 

Definition at line 4276 of file ltdl.c.

References lt_dlhandle_struct::caller_data, lt_caller_data::data, lt_caller_data::key, and LT_DLMUTEX_LOCK.

lt_dlcaller_id lt_dlcaller_register  ) 
 

Definition at line 4208 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

lt_ptr lt_dlcaller_set_data lt_dlcaller_id  key,
lt_dlhandle  handle,
lt_ptr  data
 

Definition at line 4221 of file ltdl.c.

References lt_dlhandle_struct::caller_data, lt_caller_data::data, lt_caller_data::key, and LT_DLMUTEX_LOCK.

int lt_dlclose lt_dlhandle  handle  ) 
 

Definition at line 3792 of file ltdl.c.

References lt_dlhandle_struct::loader, LT_DLFREE, LT_DLIS_RESIDENT, LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, LT_DLSTRERROR, lt_dlloader::module_close, and lt_dlhandle_struct::next.

Referenced by lt_dlexit().

const char* lt_dlerror  ) 
 

Definition at line 3954 of file ltdl.c.

References LT_DLMUTEX_GETERROR, and LT_DLMUTEX_SETERROR.

int lt_dlexit  ) 
 

Definition at line 2300 of file ltdl.c.

References lt_dlclose(), LT_DLIS_RESIDENT, LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLSTRERROR, and lt_dlhandle_struct::next.

int lt_dlforeach int *  func,
lt_ptr  data
 

Definition at line 4180 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK, and lt_dlhandle_struct::next.

int lt_dlforeachfile char *  search_path,
int *  func,
lt_ptr  data
const
 

Definition at line 3747 of file ltdl.c.

const lt_dlinfo* lt_dlgetinfo lt_dlhandle  handle  ) 
 

Definition at line 4160 of file ltdl.c.

References LT_DLMUTEX_SETERROR, and LT_DLSTRERROR.

const char* lt_dlgetsearchpath  ) 
 

Definition at line 4111 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

lt_dlhandle lt_dlhandle_next lt_dlhandle  place  ) 
 

Definition at line 4173 of file ltdl.c.

References lt_dlhandle_struct::next.

int lt_dlinit  ) 
 

Definition at line 2214 of file ltdl.c.

References lt_user_dlloader::dlloader_data, lt_dlloader_add(), lt_dlloader_next(), LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, and LT_DLSTRERROR.

int lt_dlinsertsearchdir char *  before,
const char *  search_dir
const
 

Definition at line 4054 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, LT_DLSTRERROR, and LT_STRLEN.

int lt_dlisresident lt_dlhandle  handle  ) 
 

Definition at line 4142 of file ltdl.c.

References LT_DLIS_RESIDENT, LT_DLMUTEX_SETERROR, and LT_DLSTRERROR.

int lt_dlloader_add lt_dlloader place,
const struct lt_user_dlloader dlloader,
const char *  loader_name
 

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_user_data* lt_dlloader_data lt_dlloader place  ) 
 

Definition at line 4485 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, and LT_DLSTRERROR.

lt_dlloader* lt_dlloader_find char *  loader_name  )  const
 

Definition at line 4505 of file ltdl.c.

References lt_dlloader::loader_name, LT_DLMUTEX_LOCK, lt_dlloader::next, and strcmp.

Referenced by lt_dlloader_remove().

const char* lt_dlloader_name lt_dlloader place  ) 
 

Definition at line 4465 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, and LT_DLSTRERROR.

lt_dlloader* lt_dlloader_next lt_dlloader place  ) 
 

Definition at line 4452 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK, and lt_dlloader::next.

Referenced by lt_dlinit().

int lt_dlloader_remove char *  loader_name  )  const
 

Definition at line 4391 of file ltdl.c.

References lt_dlhandle_struct::loader, lt_dlloader_find(), LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLSTRERROR, and lt_dlhandle_struct::next.

int lt_dlmakeresident lt_dlhandle  handle  ) 
 

Definition at line 4123 of file ltdl.c.

References LT_DLMUTEX_SETERROR, LT_DLRESIDENT_FLAG, LT_DLSET_FLAG, and LT_DLSTRERROR.

int lt_dlmutex_register lt_dlmutex_lock *  lock,
lt_dlmutex_unlock *  unlock,
lt_dlmutex_seterror *  seterror,
lt_dlmutex_geterror *  geterror
 

Definition at line 915 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, and LT_DLSTRERROR.

lt_dlhandle lt_dlopen char *  filename  )  const
 

Definition at line 3429 of file ltdl.c.

Referenced by lt_dlopenext().

lt_dlhandle lt_dlopenext char *  filename  )  const
 

Definition at line 3461 of file ltdl.c.

References assert, LT_DLFREE, LT_DLMUTEX_SETERROR, lt_dlopen(), LT_DLSTRERROR, LT_EMALLOC, LT_EOS_CHAR, LT_STRLEN, strcmp, and strrchr.

int lt_dlpreload lt_dlsymlist preloaded  )  const
 

Definition at line 2265 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

Referenced by lt_dlpreload().

int lt_dlpreload_default lt_dlsymlist preloaded  )  const
 

Definition at line 2290 of file ltdl.c.

References LT_DLMUTEX_LOCK, and LT_DLMUTEX_UNLOCK.

int lt_dlseterror int  errindex  ) 
 

Definition at line 986 of file ltdl.c.

References LT_DLMUTEX_LOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_UNLOCK, LT_DLSTRERROR, and LT_ERROR_MAX.

int lt_dlsetsearchpath char *  search_path  )  const
 

Definition at line 4088 of file ltdl.c.

References LT_DLFREE, LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK, and LT_STRLEN.

lt_ptr lt_dlsym lt_dlhandle  handle,
const char *  symbol
 

Definition at line 3860 of file ltdl.c.

References LT_DLFREE, LT_DLMUTEX_GETERROR, LT_DLMUTEX_SETERROR, LT_DLSTRERROR, LT_EMALLOC, LT_STRLEN, LT_SYMBOL_LENGTH, and LT_SYMBOL_OVERHEAD.

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)   ) 
 


© 2007, Los Alamos National Security, LLC.