[netperf-dev] netperf4 commit notice r203 - in branches/gobject_migration: include src

raj at netperf.org raj at netperf.org
Fri Mar 2 17:06:37 PST 2007


Author: raj
Date: 2007-03-02 17:06:36 -0800 (Fri, 02 Mar 2007)
New Revision: 203

Modified:
   branches/gobject_migration/include/netlib.h
   branches/gobject_migration/src/Makefile.am
   branches/gobject_migration/src/Makefile.in
   branches/gobject_migration/src/netperf-control.c
   branches/gobject_migration/src/netperf-netserver.h
   branches/gobject_migration/src/netperf-test.c
   branches/gobject_migration/src/netperf-test.h
Log:
more halting steps along GObjectification

Modified: branches/gobject_migration/include/netlib.h
===================================================================
--- branches/gobject_migration/include/netlib.h	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/include/netlib.h	2007-03-03 01:06:36 UTC (rev 203)
@@ -69,11 +69,13 @@
 #include <libxml/parser.h>
 #include <libxml/tree.h>
 
+#include "netperf-test.h"
+#include "netperf-netserver.h"
 
 extern  void delete_test(const xmlChar *id);
 extern  test_t * find_test_in_hash(const xmlChar *id);
-extern  void report_test_status(test_t *test);
-extern  void report_servers_test_status(server_t *server);
+extern  void report_test_status(NetperfTest *test);
+extern  void report_servers_test_status(NetperfNetserver *server);
 extern  GenReport get_report_function(xmlNodePtr cmd);
 extern  const char * netperf_error_name(int rc);
 extern  char * npe_to_str(int npe_error);
@@ -108,14 +110,14 @@
 			  xmlChar *host, xmlChar *port, int family);
 extern SOCKET establish_control(xmlChar *hostname,  xmlChar *port, int remfam,
 			     xmlChar *localhost, xmlChar *localport, int locfam);
-extern int get_test_function(test_t *test, const xmlChar *func);
-extern int add_test_to_hash(test_t *new_test);
+extern int get_test_function(NetperfTest *test, const xmlChar *func);
+extern int add_test_to_hash(NetperfTest *new_test);
 extern int write_to_control_connection(GIOChannel *channel, 
 				       xmlNodePtr body,
 				       xmlChar *nid,
 				       const xmlChar *fromnid);
 extern int32_t recv_control_message(SOCKET control_sock, xmlDocPtr *message);
-extern void report_server_error(server_t *server);
+extern void report_server_error(NetperfNetserver *server);
 extern int launch_thread(GThread **tid, void *(*start_routine)(void *), void *data);
 extern void break_args_explicit(char *s, char *arg1, char *arg2);
 extern int parse_address_family(char family_string[]);

Modified: branches/gobject_migration/src/Makefile.am
===================================================================
--- branches/gobject_migration/src/Makefile.am	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/src/Makefile.am	2007-03-03 01:06:36 UTC (rev 203)
@@ -1,6 +1,7 @@
 #SUBDIRS = suites
 
-bin_PROGRAMS = netperf4 netserver
+#bin_PROGRAMS = netperf4 netserver
+bin_PROGRAMS = netperf4
 
 AM_CFLAGS = $(NETPERF_CFLAGS)
 AM_CPPFLAGS = -I$(top_srcdir)/include -DLIBDIR="\"$(libdir)\"" -DNETPERFDIR="\"$(netperfdir)\""
@@ -17,10 +18,10 @@
 
 # some of the other include files are actually up in include/
 COMMON_SRC = netlib.c netcpu.h netmsg.c netmsg.h netconfidence.c
-FOO_SRC = netperf-netserver.c netperf-netserver.h netperf-control.h netperf-control.c netperf-test.c netperf-test.h
+FOO_SRC = netperf-netserver.c netperf-netserver.h netperf-control.h netperf-control.c netperf-test.c netperf-test.h netlib4.c
 
 netperf4_SOURCES = netperf4.c $(FOO_SRC) $(USE_NETLIB_SOURCE)
-netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
+#netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
 
 netperf4dir = @datadir@/netperf
 netperf4_DATA = netperf_docs.dtd default_commands.xml default_config.xml
@@ -38,11 +39,11 @@
 
 # if there are any "missing" routines, the libobjs should cover it
 netperf4_LDADD = @LIBOBJS@
-netserver_LDADD = @LIBOBJS@
+#netserver_LDADD = @LIBOBJS@
 
 # so far, it does not appear we need this in netserver
 netperf4_LDFLAGS = -rpath $(libdir) -export-dynamic
-netserver_LDFLAGS = -rpath $(libdir) -export-dynamic
+#netserver_LDFLAGS = -rpath $(libdir) -export-dynamic
 
 missing/getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
 	$(COMPILE) -o $@ -c $(srcdir)/missing/getaddrinfo.c

Modified: branches/gobject_migration/src/Makefile.in
===================================================================
--- branches/gobject_migration/src/Makefile.in	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/src/Makefile.in	2007-03-03 01:06:36 UTC (rev 203)
@@ -157,7 +157,8 @@
 target_os = @target_os@
 target_vendor = @target_vendor@
 
-bin_PROGRAMS = netperf4 netserver
+#bin_PROGRAMS = netperf4 netserver
+bin_PROGRAMS = netperf4
 
 AM_CFLAGS = $(NETPERF_CFLAGS)
 AM_CPPFLAGS = -I$(top_srcdir)/include -DLIBDIR="\"$(libdir)\"" -DNETPERFDIR="\"$(netperfdir)\""
@@ -174,11 +175,11 @@
 
 # some of the other include files are actually up in include/
 COMMON_SRC = netlib.c netcpu.h netmsg.c netmsg.h netconfidence.c
-FOO_SRC = netperf-netserver.c netperf-netserver.h netperf-control.h netperf-control.c netperf-test.c netperf-test.h
+FOO_SRC = netperf-netserver.c netperf-netserver.h netperf-control.h netperf-control.c netperf-test.c netperf-test.h netlib4.c
 
 netperf4_SOURCES = netperf4.c $(FOO_SRC) $(USE_NETLIB_SOURCE)
-netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
 
+#netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
 netperf4dir = @datadir@/netperf
 netperf4_DATA = netperf_docs.dtd default_commands.xml default_config.xml
 
@@ -195,11 +196,10 @@
 
 # if there are any "missing" routines, the libobjs should cover it
 netperf4_LDADD = @LIBOBJS@
-netserver_LDADD = @LIBOBJS@
+#netserver_LDADD = @LIBOBJS@
 
 # so far, it does not appear we need this in netserver
 netperf4_LDFLAGS = -rpath $(libdir) -export-dynamic
-netserver_LDFLAGS = -rpath $(libdir) -export-dynamic
 subdir = src
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -214,35 +214,27 @@
 nettest_bsd_la_LIBADD =
 am_nettest_bsd_la_OBJECTS = nettest_bsd.lo
 nettest_bsd_la_OBJECTS = $(am_nettest_bsd_la_OBJECTS)
-bin_PROGRAMS = netperf4$(EXEEXT) netserver$(EXEEXT)
+bin_PROGRAMS = netperf4$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS)
 
 am__objects_2 = netperf-netserver.$(OBJEXT) netperf-control.$(OBJEXT) \
-	netperf-test.$(OBJEXT)
+	netperf-test.$(OBJEXT) netlib4.$(OBJEXT)
 am__objects_3 = netlib_ at NETSYS_SOURCE@.$(OBJEXT)
 am_netperf4_OBJECTS = netperf4.$(OBJEXT) $(am__objects_2) \
 	$(am__objects_3)
 netperf4_OBJECTS = $(am_netperf4_OBJECTS)
 netperf4_DEPENDENCIES = @LIBOBJS@
-am__objects_4 = netlib.$(OBJEXT) netmsg.$(OBJEXT) \
-	netconfidence.$(OBJEXT)
-am_netserver_OBJECTS = netserver.$(OBJEXT) $(am__objects_4) \
-	$(am__objects_3)
-netserver_OBJECTS = $(am_netserver_OBJECTS)
-netserver_DEPENDENCIES = @LIBOBJS@
 
 DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
 @AMDEP_TRUE at DEP_FILES = $(DEPDIR)/missing/getaddrinfo.Po \
 @AMDEP_TRUE@	$(DEPDIR)/missing/inet_ntop.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/netconfidence.Po ./$(DEPDIR)/netlib.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/netlib4.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netlib_ at NETSYS_SOURCE@.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/netmsg.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netperf-control.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netperf-netserver.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netperf-test.Po ./$(DEPDIR)/netperf4.Po \
- at AMDEP_TRUE@	./$(DEPDIR)/netserver.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netsysstats_ at NETSYS_SOURCE@.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/netsysstats_common.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/nettest_bsd.Plo
@@ -254,12 +246,12 @@
 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
 DIST_SOURCES = $(netsysstats_la_SOURCES) $(nettest_bsd_la_SOURCES) \
-	$(netperf4_SOURCES) $(netserver_SOURCES)
+	$(netperf4_SOURCES)
 DATA = $(netperf4_DATA)
 
 DIST_COMMON = $(srcdir)/Makefile.in Makefile.am missing/getaddrinfo.c \
 	missing/inet_ntop.c
-SOURCES = $(netsysstats_la_SOURCES) $(nettest_bsd_la_SOURCES) $(netperf4_SOURCES) $(netserver_SOURCES)
+SOURCES = $(netsysstats_la_SOURCES) $(nettest_bsd_la_SOURCES) $(netperf4_SOURCES)
 
 all: all-am
 
@@ -334,9 +326,6 @@
 netperf4$(EXEEXT): $(netperf4_OBJECTS) $(netperf4_DEPENDENCIES) 
 	@rm -f netperf4$(EXEEXT)
 	$(LINK) $(netperf4_LDFLAGS) $(netperf4_OBJECTS) $(netperf4_LDADD) $(LIBS)
-netserver$(EXEEXT): $(netserver_OBJECTS) $(netserver_DEPENDENCIES) 
-	@rm -f netserver$(EXEEXT)
-	$(LINK) $(netserver_LDFLAGS) $(netserver_OBJECTS) $(netserver_LDADD) $(LIBS)
 
 mostlyclean-compile:
 	-rm -f *.$(OBJEXT) core *.core
@@ -346,15 +335,12 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/missing/getaddrinfo.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/missing/inet_ntop.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netconfidence.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netlib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netlib4.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netlib_ at NETSYS_SOURCE@.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netmsg.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netperf-control.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netperf-netserver.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netperf-test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netperf4.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netserver.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netsysstats_ at NETSYS_SOURCE@.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netsysstats_common.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nettest_bsd.Plo at am__quote@
@@ -602,6 +588,7 @@
 	uninstall-am uninstall-binPROGRAMS uninstall-info-am \
 	uninstall-libLTLIBRARIES uninstall-netperf4DATA
 
+#netserver_LDFLAGS = -rpath $(libdir) -export-dynamic
 
 missing/getaddrinfo.o: $(srcdir)/missing/getaddrinfo.c
 	$(COMPILE) -o $@ -c $(srcdir)/missing/getaddrinfo.c

Modified: branches/gobject_migration/src/netperf-control.c
===================================================================
--- branches/gobject_migration/src/netperf-control.c	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/src/netperf-control.c	2007-03-03 01:06:36 UTC (rev 203)
@@ -293,7 +293,23 @@
   return(FALSE);
 }
 
+gboolean
+handle_control_connection_error(GIOChannel *source, gpointer data) {
+  /* not sure exactly how to handle things here - a simple
+     g_main_loop_quit() may not be indicated */
+#ifdef notdef
+  global_state_t *global_state;
 
+  global_state = data;
+
+  /* for now, it is rather simple - cause the mainloop to exit which
+     may take quite a bit with it... */
+  g_main_loop_quit(global_state->loop);
+#endif
+
+  return(FALSE);
+}
+
 gboolean
 read_from_control_connection(GIOChannel *source, GIOCondition condition, gpointer data) {
 

Modified: branches/gobject_migration/src/netperf-netserver.h
===================================================================
--- branches/gobject_migration/src/netperf-netserver.h	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/src/netperf-netserver.h	2007-03-03 01:06:36 UTC (rev 203)
@@ -1,5 +1,8 @@
 #ifndef NETPERF_NETSERVER_H
 #define NETPERF_NETSERVER_H
+
+#include <glib-object.h>
+
 /* declarations to provide us with a Netserver object to be used by
    netperf4's GObject conversion */
 

Modified: branches/gobject_migration/src/netperf-test.c
===================================================================
--- branches/gobject_migration/src/netperf-test.c	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/src/netperf-test.c	2007-03-03 01:06:36 UTC (rev 203)
@@ -10,7 +10,9 @@
   TEST_PROP_TEST_FUNC,
   TEST_PROP_TEST_CLEAR,
   TEST_PROP_TEST_STATS,
-  TEST_PROP_TEST_DECODE
+  TEST_PROP_TEST_DECODE,
+  TEST_PROP_TEST_ADD_DEPENDANT,
+  TEST_PROP_TEST_DEL_DEPENDANT
 };
 
 /* some forward declarations to make the compiler happy regardless of
@@ -34,14 +36,14 @@
   CONTROL_CLOSED,     /* this would be the control connection object
 			 telling us the controll connection died. */
   DEPENDENCY_MET,     /* we receive this when the test on which we are
-			 dependent has finished initializing */
+			 dependant has finished initializing */
   LAST_SIGNAL         /* this should always be the last in the list so
 			 we can use it to size the array correctly. */
 };
 
 static void netperf_test_new_message(NetperfTest *test, gpointer message);
 static void netperf_test_control_closed(NetperfTest *test);
-static void netperf_test_dependcy_met(NetperfTest *test);
+static void netperf_test_dependency_met(NetperfTest *test);
 
 /* a place to stash the id's returned by g_signal_new should we ever
    need to refer to them by their ID. */ 
@@ -85,6 +87,8 @@
   GParamSpec *test_clear_param;
   GParamSpec *test_stats_param;
   GParamSpec *test_decode_param;
+  GParamSpec *test_add_dependant_param;
+  GParamSpec *test_del_dependant_param;
 
   /* and on with the show */
   GObjectClass *g_object_class;
@@ -92,23 +96,23 @@
   g_object_class = G_OBJECT_CLASS(klass);
 
   /* we might create GParamSpec descriptions for properties here */
+  req_state_param = 
+    g_param_spec_uint("req-state", /* identifier */
+		      "requested state", /* longer name */
+		      "desired state of the test", /* description */
+		      NP_TST_PREINIT, /* min value */
+		      NP_TST_DEAD,    /* max value */
+		      NP_TST_PREINIT, /* def value */
+		      G_PARAM_READWRITE); 
+
   state_param = 
     g_param_spec_uint("state", /* identifier */
 		      "test state", /* longer name */
 		      "currentstate of the test",
-		      TEST_PREINIT, /* min value */
-		      TEST_DEAD,    /* max value */
-		      TEST_PREINIT, /* dev value */
+		      NP_TST_PREINIT, /* min value */
+		      NP_TST_DEAD,    /* max value */
+		      NP_TST_PREINIT, /* def value */
 		      G_PARAM_READABLE); /* should this be read only? */
-  req_state_param = 
-    g_param_spec_uint("req-state", /* identifier */
-		      "requested state", /* longer name */
-		      "desired state of the test", /* description
-							   */
-		      TEST_PREINIT, /* min value */
-		      TEST_DEAD,    /* max value */
-		      TEST_PREINIT, /* def value */
-		      G_PARAM_READWRITE); 
 
   id_param = 
     g_param_spec_string("id",         /* identifier */
@@ -141,6 +145,24 @@
 			 "the function which decode, accumulate and report stats",
 			 G_PARAM_READWRITE);
 
+  test_add_dependant_param =
+    g_param_spec_pointer("add_dependant",
+			 "add dependant test",
+			 "add this test object to the list of dependant tests",
+			 G_PARAM_READWRITE); /* should this be just
+						WRITABLE? */
+
+  /* if we go with a weak pointer reference then we probably don't
+     need/want a delete property, but if we simply keep a pointer to
+     the test instance then we do */
+  test_del_dependant_param =
+    g_param_spec_pointer("del_dependant",
+			 "delete dependant test",
+			 "delete this test object from the list of dependant tests",
+			 G_PARAM_READWRITE); /* should this be just
+						WRITABLE? */
+
+  
   /* overwrite the base object methods with our own get and set
      property routines */
 
@@ -176,12 +198,21 @@
 				  TEST_PROP_TEST_DECODE,
 				  test_decode_param);
 
+  g_object_class_install_property(g_object_class,
+				  TEST_PROP_TEST_ADD_DEPENDANT,
+				  test_add_dependant_param);
+
+  g_object_class_install_property(g_object_class,
+				  TEST_PROP_TEST_DEL_DEPENDANT,
+				  test_del_dependant_param);
+
   /* we would set the signal handlers for the class here. we might
      have a signal say for the arrival of a complete message or
      perhaps the cotnrol connection going down or somesuch. */
 
   klass->new_message = netperf_test_new_message;
   klass->control_closed = netperf_test_control_closed;
+  klass->dependency_met = netperf_test_dependency_met;
 
   netperf_test_signals[NEW_MESSAGE] = 
     g_signal_new("new_message",            /* signal name */
@@ -245,7 +276,7 @@
   return;
 }
 
-/* we are sent this signal when the test on whichwe are dependent has
+/* we are sent this signal when the test on which we are dependant has
    finished its initialization, which means we can get our dependency
    data */ 
 static void netperf_test_dependency_met(NetperfTest *test)
@@ -300,6 +331,14 @@
     test->test_decode = g_value_get_pointer(value);
     break;
 
+  case TEST_PROP_TEST_ADD_DEPENDANT:
+    g_print("Yo, add the code to add a dependant!\n");
+    break;
+
+  case TEST_PROP_TEST_DEL_DEPENDANT:
+    g_print("Yo, add the code to delete a dependant!\n");
+    break;
+
   default:
     G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
     break;
@@ -345,6 +384,12 @@
     g_value_set_pointer(value, test->test_decode);
     break;
 
+    /* it doesn't seem to make much sense to have "get" for add/del a
+       dependant test so we will let those fall-through to the default
+       case */
+
+  case TEST_PROP_TEST_ADD_DEPENDANT:
+  case TEST_PROP_TEST_DEL_DEPENDANT:
   default:
     G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
     break;

Modified: branches/gobject_migration/src/netperf-test.h
===================================================================
--- branches/gobject_migration/src/netperf-test.h	2007-03-01 19:27:00 UTC (rev 202)
+++ branches/gobject_migration/src/netperf-test.h	2007-03-03 01:06:36 UTC (rev 203)
@@ -1,22 +1,29 @@
 #ifndef NETPERF_TEST_H
 #define NETPERF_TEST_H
+
+/* one school of thought says this should be up in all the .c's which
+   include this .h, another says this should be here. */
+#include <glib-object.h>
+
 /* declarations to provide us with a Test object to be used by
    netperf4's GObject conversion */
 
+/* there may be some conflicts with object macros if we spell-out
+   NETPERF_test so we shorten things a bit. */
 typedef enum netperf_test_state {
-  TEST_PREINIT,
-  TEST_INIT,
-  TEST_IDLE,
-  TEST_LOADED,
-  TEST_MEASURE,
-  TEST_ERROR,
-  TEST_DEAD
-} test_state_t;
+  NP_TST_PREINIT,
+  NP_TST_INIT,
+  NP_TST_IDLE,
+  NP_TST_LOADED,
+  NP_TST_MEASURE,
+  NP_TST_ERROR,
+  NP_TST_DEAD
+} netperf_test_state_t;
 
-typedef void      *(*TestFunc)(void *test_data);
-typedef void      *(*TestDecode)(void *statistics);
-typedef int        (*TestClear)(void *test_info);
-typedef void      *(*TestStats)(void *test_data);
+typedef void      *(*NetperfTestFunc)(void *test_data);
+typedef void      *(*NetperfTestDecode)(void *statistics);
+typedef int        (*NetperfTestClear)(void *test_info);
+typedef void      *(*NetperfTestStats)(void *test_data);
 
 /* first the instance structure. this will look remarkably like the
    old test_t structure. */
@@ -43,29 +50,29 @@
 
   FILE   *where;     /* where should that output go? */
 
-  test_state_t  state;     /* the state netperf or netserver believes
+  netperf_test_state_t  state;     /* the state netperf or netserver believes
 			      the test instance to be in at the
 			      moment.  only changed by netperf or
 			      netserver  */
 
-  test_state_t  new_state; /* the state the test is currently in.
+  netperf_test_state_t  new_state; /* the state the test is currently in.
 			      this field is modified by the test when
 			      it has transitioned to a new state. */
 
-  test_state_t  state_req; /* the state to which the test has been
+  netperf_test_state_t  state_req; /* the state to which the test has been
 			      requested to transition. this field is
 			      monitored by the the test thread and
 			      when the field is changed the test takes
 			      action and changes its state. */
 
   gint          err_rc;    /* error code received which caused this
-			      server to enter the TEST_ERROR state */
+			      server to enter the NETPERF_TEST_ERROR state */
 
   gchar        *err_fn;    /* name of the routine which placed this
-			     server into the TEST_ERROR state*/
+			     server into the NETPERF_TEST_ERROR state*/
 
   char        *err_str;     /* character string which reports the
-			       error causing entry to the TEST_ERROR
+			       error causing entry to the NETPERF_TEST_ERROR
 			       state. */
 
   int        err_no;        /* The errno returned by the failing
@@ -92,25 +99,25 @@
                                   test-specific routines was
                                   opened. */
 
-  TestFunc   test_func;        /* the function pointer returned by
+  NetperfTestFunc   test_func;        /* the function pointer returned by
                                   dlsym for the test_name
                                   function. This function is launched
                                   as a thread to initialize the
                                   test. */
   
-  TestClear  test_clear;       /* the function pointer returned by
+  NetperfTestClear  test_clear;       /* the function pointer returned by
                                   dlsym for the test_clear
                                   function. the function clears all
                                   statistics counters. */
   
-  TestStats  test_stats;       /* the function pointer returned by
+  NetperfTestStats  test_stats;       /* the function pointer returned by
                                   dlsym for the test_stats
                                   function. this function reads all
                                   statistics counters for the test and
                                   returns an xml statistics node for
                                   the test. */
   
-  TestDecode test_decode;      /* the function pointer returned by
+  NetperfTestDecode test_decode;      /* the function pointer returned by
                                   dlsym for the test_decode
                                   function. this function is called by
                                   netperf to decode, accumulate, and
@@ -136,8 +143,12 @@
 
   /* we probably need/want some sort of list of test objects which
      depend upon us so we will be able to signal them that their
-     dependecies have been met */
+     dependecies have been met. probably need to use some sort of
+     "weak" object pointer rather than just the object pointer and a
+     strong object reference? */
 
+  GList *dependent_tests;
+
 } NetperfTest;
 
 /* second, the class structure, which is where we will put any method



More information about the netperf-dev mailing list