[netperf-dev] netperf2 commit notice r498 - trunk/src

raj at netperf.org raj at netperf.org
Tue Nov 8 11:48:28 PST 2011


Author: raj
Date: 2011-11-08 11:48:28 -0800 (Tue, 08 Nov 2011)
New Revision: 498

Modified:
   trunk/src/netperf.c
   trunk/src/netsh.c
   trunk/src/nettest_bsd.c
Log:
a few more cleanups and tweaks

Modified: trunk/src/netperf.c
===================================================================
--- trunk/src/netperf.c	2011-11-08 19:08:29 UTC (rev 497)
+++ trunk/src/netperf.c	2011-11-08 19:48:28 UTC (rev 498)
@@ -59,11 +59,6 @@
 # include <sys/types.h>
 #endif
 
-#ifndef WIN32
-/* this should only be temporary */
-#include <sys/socket.h>
-#endif
-
 #ifdef WIN32
 #include <winsock2.h>
 #include <windows.h>
@@ -101,8 +96,8 @@
 #include "nettest_sctp.h"
 #endif
 
- /* this file contains the main for the netperf program. all the other */
- /* routines can be found in the file netsh.c */
+ /* this file contains the main for the netperf program. all the other
+    routines can be found in the file netsh.c */
 
 
 int _cdecl
@@ -276,9 +271,10 @@
   }
 #endif
   else {
-    printf("The test you requested is unknown to this netperf.\n");
-    printf("Please verify that you have the correct test name, \n");
-    printf("and that test family has been compiled into this netperf.\n");
+    printf("The test you requested (%s) is unknown to this netperf.\n"
+	   "Please verify that you have the correct test name, \n"
+	   "and that test family has been compiled into this netperf.\n",
+	   test_name);
     exit(1);
   }
   

Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c	2011-11-08 19:08:29 UTC (rev 497)
+++ trunk/src/netsh.c	2011-11-08 19:48:28 UTC (rev 498)
@@ -22,9 +22,9 @@
 
 #ifndef WIN32
 #include <unistd.h>
-#if !defined(__VMS) && !defined(MSDOS)
+#if !defined(__VMS)
 #include <sys/ipc.h>
-#endif /* __VMS/MSDOS */
+#endif /* __VMS */
 #include <errno.h>
 #include <signal.h>
 #include <sys/time.h>
@@ -99,18 +99,21 @@
 /************************************************************************/
 
 /* some names and such */
-char	*program;		/* program invocation name */
-char    *command_line;          /* a copy of the entire command line */
+char *program;		/* program invocation name */
+char *command_line;     /* a copy of the entire command line */
 
 /* stuff to say where this test is going */
-char	host_name[HOSTNAMESIZE] = "";	/* remote host name or ip addr */
-char    local_host_name[HOSTNAMESIZE] = "";  /* local hostname or ip */
-char    test_name[BUFSIZ] = "TCP_STREAM"; /* which test to run 		*/
-char	test_port[PORTBUFSIZE] = "12865"; /* where is the test waiting */
-char    local_test_port[PORTBUFSIZE] = "0"; /* from whence we should start */
-int     address_family = AF_UNSPEC;     /* which address family remote */
-int     local_address_family = AF_UNSPEC; /* which address family local */
+char
+  host_name[HOSTNAMESIZE] = "",	      /* remote host name or ip addr */
+  local_host_name[HOSTNAMESIZE] = "", /* local hostname or ip */
+  test_name[BUFSIZ] = "TCP_STREAM",   /* which test to run */
+  test_port[PORTBUFSIZE] = "12865",   /* where is the test waiting */
+  local_test_port[PORTBUFSIZE] = "0"; /* from whence we should start */
 
+int
+  address_family = AF_UNSPEC,       /* which address family remote */
+  local_address_family = AF_UNSPEC; /* which address family local */
+
 /* the source of data for filling the buffers */
 char    fill_file[BUFSIZ] = "";
 
@@ -140,14 +143,15 @@
 int
   shell_num_cpus=1;
 
-/* the end-test conditions for the tests - either transactions, bytes, */
-/* or time. different vars used for clarity - space is cheap ;-) */
+/* the end-test conditions for the tests - either transactions, bytes,
+   or time. different vars used for clarity - space is cheap ;-) */
+
 int	
-  test_time = 10,	/* test ends by time */
-  test_len_ticks,       /* how many times will the timer go off before */
-			/* the test is over? */
-  test_bytes = 0,	/* test ends on byte count */
-  test_trans = 0;	/* test ends on tran count */
+  test_time = 10, /* test ends by time */
+  test_len_ticks, /* how many times will the timer go off before the
+		     test is over? */
+  test_bytes = 0, /* test ends on byte count */
+  test_trans = 0; /* test ends on tran count */
 
 /* the alignment conditions for the tests */
 int
@@ -672,9 +676,6 @@
       break;
     case 'd':
       debug++;
-#ifdef MSDOS
-      dbug_init();
-#endif
       break;
     case 'D':
 #if (defined WANT_DEMO)

Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c	2011-11-08 19:08:29 UTC (rev 497)
+++ trunk/src/nettest_bsd.c	2011-11-08 19:48:28 UTC (rev 498)
@@ -98,9 +98,9 @@
 
 
 #ifndef WIN32
-#if !defined(__VMS) && !defined(MSDOS)
+#if !defined(__VMS)
 #include <sys/ipc.h>
-#endif /* !__VMS && !MSDOS */
+#endif /* !__VMS */
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>



More information about the netperf-dev mailing list