Author: adrian.chadd
Date: Fri Apr 17 02:42:29 2009
New Revision: 13940

Added:
    playpen/LUSCA_HEAD_module/libsqmod/
    playpen/LUSCA_HEAD_module/libsqmod/Makefile.am
    playpen/LUSCA_HEAD_module/libsqmod/module.c
Modified:
    playpen/LUSCA_HEAD_module/Makefile.am
    playpen/LUSCA_HEAD_module/configure.in

Log:
Start fleshing out some very basic support for dynamic modules.



Modified: playpen/LUSCA_HEAD_module/Makefile.am
==============================================================================
--- playpen/LUSCA_HEAD_module/Makefile.am       (original)
+++ playpen/LUSCA_HEAD_module/Makefile.am       Fri Apr 17 02:42:29 2009
@@ -4,8 +4,8 @@
  #

  AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5
-DIST_SUBDIRS   = lib libcore libmem libsqname libcb libiapp libstat libhttp  
libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem  
libasyncio snmplib scripts src icons errors contrib doc helpers tools app
-SUBDIRS                = lib libcore libmem libsqname libcb libiapp libstat 
libhttp  
libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem  
libasyncio @makesnmplib@ scripts src icons errors doc helpers tools app
+DIST_SUBDIRS   = lib libcore libmem libsqname libcb libiapp libstat libhttp  
libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem  
libasyncio libsqmod snmplib scripts src icons errors contrib doc helpers  
tools app
+SUBDIRS                = lib libcore libmem libsqname libcb libiapp libstat 
libhttp  
libsqdns libsqident libsqinet libhelper libmime libsqdebug libstmem  
libasyncio libsqmod @makesnmplib@ scripts src icons errors doc helpers  
tools app

  DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
  DEFAULT_PINGER                = $(libexecdir)/`echo pinger |  
sed '$(transform);s/$$/$(EXEEXT)/'`

Modified: playpen/LUSCA_HEAD_module/configure.in
==============================================================================
--- playpen/LUSCA_HEAD_module/configure.in      (original)
+++ playpen/LUSCA_HEAD_module/configure.in      Fri Apr 17 02:42:29 2009
@@ -3322,6 +3322,7 @@
        app/Makefile \
        app/tcptest/Makefile \
        libmime/Makefile \
+       libsqmod/Makefile \
        libasyncio/Makefile \
        libsqdns/Makefile \
        libsqident/Makefile \

Added: playpen/LUSCA_HEAD_module/libsqmod/Makefile.am
==============================================================================
--- (empty file)
+++ playpen/LUSCA_HEAD_module/libsqmod/Makefile.am      Fri Apr 17 02:42:29 2009
@@ -0,0 +1,7 @@
+## Process this file with automake to produce Makefile.in
+
+libsqmod_a_SOURCES = \
+       module.c
+
+noinst_LIBRARIES = \
+       libsqmod.a

Added: playpen/LUSCA_HEAD_module/libsqmod/module.c
==============================================================================
--- (empty file)
+++ playpen/LUSCA_HEAD_module/libsqmod/module.c Fri Apr 17 02:42:29 2009
@@ -0,0 +1,26 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include <dlfcn.h>
+
+/*
+ * Stuff to look at
+ *
+ * - dlopen() / dlclose() / dlsym()
+ * - getting a handle to the module "object" to start doing things with it
+ * - for now, ignore module "unloading" at runtime. Thats a hairier problem
+ *   to try and solve. It should be solved later on, at least for people
+ *   who want to be able to make Lusca reload updated modules during
+ *   reconfigure.
+ */
+int
+module_load(const char *path)
+{
+       void *handle = NULL;
+       
+       handle = dlopen(path, RTLD_LAZY);
+       if (! handle) {
+               return -1;
+       }
+}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to