[netperf-dev] netperf4 commit notice r130 - in
branches/glib_migration: . src
raj at netperf.org
raj at netperf.org
Wed Apr 5 13:56:30 PDT 2006
Author: raj
Date: 2006-04-05 13:56:28 -0700 (Wed, 05 Apr 2006)
New Revision: 130
Added:
branches/glib_migration/src/NetSysstatsDir/
Removed:
branches/glib_migration/src/NetSysstatDir/
Modified:
branches/glib_migration/README.windows
branches/glib_migration/src/netperf.c
branches/glib_migration/src/netperf.h
branches/glib_migration/src/nettest_bsd.c
Log:
Still more little Windows tweaks :)
Modified: branches/glib_migration/README.windows
===================================================================
--- branches/glib_migration/README.windows 2006-04-05 17:00:08 UTC (rev 129)
+++ branches/glib_migration/README.windows 2006-04-05 20:56:28 UTC (rev 130)
@@ -1,12 +1,7 @@
Netperf4 presently compiles under Windows - that is one can get a
-cleanly compiled netperf and netserver binary.
+cleanly compiled netperf and netserver binary. The DLLs are still a
+work in progress.
-What isn't done yet is compiling nettest_bsd.c (or any of the other
-nettest_mumble.c files) as a DLL to be loaded at runtime, so things
-are not terribly interesting :) The DLL's will entail cloning one of
-NetPerfDir or NetServerDir and munging the sources file therein to
-have a target of DLL and to use the apropriate source file(s).
-
There are a number of dependencies that have to be satisfied:
libxml2 development and runtime
@@ -39,3 +34,46 @@
version 2.8.6 of glib and 0.14.5 of gettext are presently presumed to
be sufficient. This may change without warning as actual tests are
run :)
+
+under src/ in the directory where you place the netperf4 sources,
+there will be four (presently) subdirectories:
+
+ NetPerfDir
+ NetServerDir
+ NetTestBSDDir
+ NetSysstatsDir
+
+In each is a "sources" file. If you have "installed" the dependencies
+in peer directories to src and they are the same versions as listed
+above, the sources files should be OK as is. Otherwise, you will need
+to edit them to point to all the right places for the dependencies.
+
+In subdirectory each you need to do a:
+
+build /cD
+
+When you have finished that you will also need to make sure that the
+Path variable points to all the respective bin directories so the DLLs
+can be found.
+
+For testing, I've been copying the .exe and .dll files created via
+build /cD up to src/ in the netperf tree.
+
+It is also necessary to add an apropriate entry in the XML catalog
+file. By default, Igor's port assumes the catalog is in etc\catalog
+under the directory where the libxml2 runtime bits have been placed.
+You will need to create the etc subdir, and then you can mimic the
+xmlcatalog commands you see in src/Makefile.am to provide the mapping
+from http://www.netperf.org/netperf_docs.dtd to where the DTD actually
+resides. The format for the second half will be something like:
+
+file:///C%3A/netperf4/src/netperf_docs.dtd
+
+which in this case assumes you have the DTD at (in native
+Windows-speak):
+
+C:/netperf4/src/netperf_docs.dtd
+
+Yes, that is three slashes ('/') after "file:" which I found a triffle
+surprising - I thought it should need only two but I guess I was wrong.
+
Copied: branches/glib_migration/src/NetSysstatsDir (from rev 128, branches/glib_migration/src/NetSysstatDir)
Modified: branches/glib_migration/src/netperf.c
===================================================================
--- branches/glib_migration/src/netperf.c 2006-04-05 17:00:08 UTC (rev 129)
+++ branches/glib_migration/src/netperf.c 2006-04-05 20:56:28 UTC (rev 130)
@@ -2104,13 +2104,25 @@
GOptionContext *option_context;
gboolean ret;
GError *error=NULL;
+#ifdef G_OS_WIN32
+ WSADATA wsa_data ;
+#endif
+
program_name = argv[0];
g_thread_init(NULL);
where = stderr;
+#ifdef G_OS_WIN32
+ /* Initialize the winsock lib ( version 2.2 ) */
+ if ( WSAStartup(MAKEWORD(2,2), &wsa_data) == SOCKET_ERROR ){
+ g_fprintf(where,"WSAStartup() failed : %d\n", GetLastError()) ;
+ return 1 ;
+ }
+#endif
+
option_context = g_option_context_new(" - netperf4 netperf options");
g_option_context_add_main_entries(option_context,netperf_entries, NULL);
ret = g_option_context_parse(option_context, &argc, &argv, &error);
Modified: branches/glib_migration/src/netperf.h
===================================================================
--- branches/glib_migration/src/netperf.h 2006-04-05 17:00:08 UTC (rev 129)
+++ branches/glib_migration/src/netperf.h 2006-04-05 20:56:28 UTC (rev 130)
@@ -101,7 +101,8 @@
#define getpid() ((int)GetCurrentProcessId())
#define __func__ __FUNCTION__
#define PATH_MAX MAXPATHLEN
-#define gettimeofday(a,b) g_get_current_time(a)
+#define gettimeofday(a,b) g_get_current_time((GTimeVal *)a)
+#define strdup(buffer) _strdup(buffer)
#else
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
Modified: branches/glib_migration/src/nettest_bsd.c
===================================================================
--- branches/glib_migration/src/nettest_bsd.c 2006-04-05 17:00:08 UTC (rev 129)
+++ branches/glib_migration/src/nettest_bsd.c 2006-04-05 20:56:28 UTC (rev 130)
@@ -130,6 +130,8 @@
#include "nettest_bsd.h"
+#include "netconfidence.h"
+
#ifdef WIN32
#define CHECK_FOR_INVALID_SOCKET (temp_socket == INVALID_SOCKET)
#define CHECK_FOR_RECV_ERROR(len) (len == SOCKET_ERROR)
More information about the netperf-dev
mailing list