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

raj at netperf.org raj at netperf.org
Thu Jul 7 15:07:17 PDT 2011


Author: raj
Date: 2011-07-07 15:07:17 -0700 (Thu, 07 Jul 2011)
New Revision: 417

Modified:
   trunk/src/netcpu_kstat10.c
   trunk/src/netcpu_osx.c
   trunk/src/netcpu_perfstat.c
   trunk/src/netcpu_procstat.c
   trunk/src/netcpu_pstatnew.c
   trunk/src/netlib.c
   trunk/src/netperf.c
   trunk/src/netserver.c
   trunk/src/netsh.c
   trunk/src/nettest_bsd.c
   trunk/src/nettest_omni.c
Log:
still more cleanups

Modified: trunk/src/netcpu_kstat10.c
===================================================================
--- trunk/src/netcpu_kstat10.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netcpu_kstat10.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,5 +1,5 @@
 char   netcpu_kstat10_id[]="\
-@(#)netcpu_kstat10.c (c) Copyright 2005-2007, Hewlett-Packard Company Version 2.4.3";
+@(#)netcpu_kstat10.c (c) Copyright 2005-2011, Hewlett-Packard Company Version 2.5.0";
 
 #if HAVE_CONFIG_H
 # include <config.h>
@@ -56,15 +56,17 @@
 static void
 print_cpu_time_counters(char *name, int instance, cpu_time_counters_t *counters) 
 {
-  fprintf(where,"%s[%d]:\n",name,instance);
   fprintf(where,
-	  "\t idle %llu\n",counters[instance].idle);
-  fprintf(where,
-	  "\t user %llu\n",counters[instance].user);
-  fprintf(where,
-	  "\t kernel %llu\n",counters[instance].kernel);
-  fprintf(where,
-	  "\t interrupt %llu\n",counters[instance].interrupt);
+	  "%s[%d]:\n"
+	  "\t idle %llu\n"
+	  "\t user %llu\n"
+	  "\t kernel %llu\n"
+	  "\t interrupt %llu\n",
+	  name,instance,
+	  counters[instance].idle,
+	  counters[instance].user,
+	  counters[instance].kernel,
+	  counters[instance].interrupt);
 }
 
 void
@@ -104,11 +106,10 @@
 
   if (MAXCPUS == i) {
     fprintf(where,
-            "Sorry, this system has more CPUs (%d) than netperf can handle (%d).\n",
+            "Sorry, this system has more CPUs (%d) than netperf can handle (%d).\n"
+            "Please alter MAXCPUS in netlib.h and recompile.\n",
             i,
             MAXCPUS);
-    fprintf(where,
-            "Please alter MAXCPUS in netlib.h and recompile.\n");
     fflush(where);
     exit(1);
   }
@@ -134,8 +135,7 @@
 {
   if (why) {
     fprintf(where,
-	    "WARNING! WARNING! WARNING! WARNING!\n");
-    fprintf(where,
+	    "WARNING! WARNING! WARNING! WARNING!\n"
 	    "%s found an unexpected %s statistic %.16s\n",
 	    who,
 	    why,
@@ -202,8 +202,7 @@
 
 	  /* might want to tell people about what we are skipping.
 	     however, only display other names debug >=2. raj
-	     2005-01-28
-	  */
+	     2005-01-28  */
 
 	  print_unexpected_statistic_warning("get_cpu_counters",
 					     knp->name,
@@ -374,11 +373,11 @@
 
   lib_local_cpu_util = (float)0.0;
 
-  /* It is possible that the library measured a time other than */
-  /* the one that the user want for the cpu utilization */
-  /* calculations - for example, tests that were ended by */
-  /* watchdog timers such as the udp stream test. We let these */
-  /* tests tell up what the elapsed time should be. */
+  /* It is possible that the library measured a time other than the
+     one that the user want for the cpu utilization calculations - for
+     example, tests that were ended by watchdog timers such as the udp
+     stream test. We let these tests tell up what the elapsed time
+     should be. */
   
   if (elapsed_time != 0.0) {
     correction_factor = (float) 1.0 + 
@@ -416,7 +415,7 @@
        more interrupt time than the sum of user, kernel and idle.
        that is a theoretical possibility I suppose, but for the
        time-being, one that we will blythly ignore, except perhaps for
-       a quick check. raj 2005-01-31 
+       a quick check. raj 2005-01-31
     */
     
     /* we ass-u-me that these counters will never wrap during a
@@ -450,19 +449,17 @@
 	 the best way to get our tails out of here so let us just
 	 punt. raj 2005-01-31 */
       fprintf(where,
-	      "WARNING! WARNING! WARNING! WARNING! WARNING! \n");
-      fprintf(where,
-	      "calc_cpu_util_internal: more interrupt time than others combined!\n");
-      fprintf(where,
-	      "\tso CPU util cannot be estimated\n");
-      fprintf(where,
-	      "\t delta[%d].interrupt %llu\n",i,delta_cpu_counters[i].interrupt);
-      fprintf(where,
-	      "\t delta[%d].idle %llu\n",i,delta_cpu_counters[i].idle);
-      fprintf(where,
-	      "\t delta[%d].user %llu\n",i,delta_cpu_counters[i].user);
-      fprintf(where,
-	      "\t delta[%d].kernel %llu\n",i,delta_cpu_counters[i].kernel);
+	      "WARNING! WARNING! WARNING! WARNING! WARNING! \n"
+	      "calc_cpu_util_internal: more interrupt time than others combined!\n"
+	      "\tso CPU util cannot be estimated\n"
+	      "\t delta[%d].interrupt %llu\n"
+	      "\t delta[%d].idle %llu\n"
+	      "\t delta[%d].user %llu\n"
+	      "\t delta[%d].kernel %llu\n",
+	      i,delta_cpu_counters[i].interrupt,
+	      i,delta_cpu_counters[i].idle,
+	      i,delta_cpu_counters[i].user,
+	      i,delta_cpu_counters[i].kernel);
       fflush(where);
       
       lib_local_cpu_util = -1.0;
@@ -497,14 +494,13 @@
 
     if (debug) {
       fprintf(where,
-	      "\tfraction_idle %llu interrupt_idle %llu\n",
+	      "\tfraction_idle %llu interrupt_idle %llu\n"
+	      "\tfraction_user %llu interrupt_user %llu\n"
+	      "\tfraction_kernel %llu interrupt_kernel %llu\n",
 	      fraction_idle,
-	      interrupt_idle);
-      fprintf(where,
-	      "\tfraction_user %llu interrupt_user %llu\n",
+	      interrupt_idle,
 	      fraction_user,
-	      interrupt_user);
-      fprintf(where,"\tfraction_kernel %llu interrupt_kernel %llu\n",
+	      interrupt_user,
 	      fraction_kernel,
 	      interrupt_kernel);
     }
@@ -526,9 +522,9 @@
 			      corrected_cpu_counters);
     }
 
-    /* I was going to checkfor going less than zero, but since all the
-       calculations are in unsigned quantities that would seem to be a
-       triffle silly... raj 2005-01-28 */
+    /* I was going to check for going less than zero, but since all
+       the calculations are in unsigned quantities that would seem to
+       be a triffle silly... raj 2005-01-28 */
 
     /* ok, now we sum the numbers again, this time including interrupt
        */

Modified: trunk/src/netcpu_osx.c
===================================================================
--- trunk/src/netcpu_osx.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netcpu_osx.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,5 +1,5 @@
 char   netcpu_sysctl_id[]="\
-@(#)netcpu_osx.c  Version 2.4.3";
+@(#)netcpu_osx.c  Version 2.5.0";
 
 #if HAVE_CONFIG_H
 # include <config.h>
@@ -112,11 +112,11 @@
   natural_t	userticks, systicks, idleticks, totalticks;
 
   lib_local_cpu_util = (float)0.0;
-  /* It is possible that the library measured a time other than */
-  /* the one that the user want for the cpu utilization */
-  /* calculations - for example, tests that were ended by */
-  /* watchdog timers such as the udp stream test. We let these */
-  /* tests tell up what the elapsed time should be. */
+  /* It is possible that the library measured a time other than the
+     one that the user want for the cpu utilization calculations - for
+     example, tests that were ended by watchdog timers such as the udp
+     stream test. We let these tests tell up what the elapsed time
+     should be. */
   
   if (elapsed_time != 0.0) {
     correction_factor = (float) 1.0 + 

Modified: trunk/src/netcpu_perfstat.c
===================================================================
--- trunk/src/netcpu_perfstat.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netcpu_perfstat.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,5 +1,5 @@
 char   netcpu_perfstat_id[]="\
-@(#)netcpu_perfstat.c Version 2.4.0";
+@(#)netcpu_perfstat.c Version 2.5.0";
 
 #if HAVE_CONFIG_H
 # include <config.h>
@@ -222,17 +222,21 @@
     per_cpu_pointer = perfstat_buffer;
     
     if(debug) {
-      fprintf(where, "Calibration for perfstat counter run: %d\n",i);
-      fprintf(where,"\tsec = %ld usec = %ld\n",sec,usec);
-      fprintf(where,"\telapsed time = %g\n",elapsed);
+      fprintf(where,
+	      "Calibration for perfstat counter run: %d\n"
+	      "\tsec = %ld usec = %ld\n"
+	      "\telapsed time = %g\n",
+	      i,
+	      sec,usec,
+	      elapsed);
     }
 
     for (j = 0; j < lib_num_loc_cpus; j++) {
       secondcnt[j] = per_cpu_pointer->idle;
       per_cpu_pointer++;
       if(debug) {
-        /* I know that there are situations where compilers know about */
-        /* long long, but the library functions do not... raj 4/95 */
+        /* I know that there are situations where compilers know about
+           long long, but the library functions do not... raj 4/95 */
         fprintf(where,
                 "\tfirstcnt[%d] = 0x%8.8lx%8.8lx secondcnt[%d] = 0x%8.8lx%8.8lx\n",
                 j,
@@ -242,8 +246,8 @@
                 secondcnt[j],
                 secondcnt[j]);
       }
-      /* we assume that it would wrap no more than once. we also */
-      /* assume that the result of subtracting will "fit" raj 4/95 */
+      /* we assume that it would wrap no more than once. we also
+	 assume that the result of subtracting will "fit" raj 4/95 */
       temp_rate = (secondcnt[j] >= firstcnt[j]) ?
         (float)(secondcnt[j] - firstcnt[j])/elapsed : 
           (float)(secondcnt[j]-firstcnt[j]+MAXLONG)/elapsed;
@@ -272,11 +276,11 @@
   float correction_factor;
 
   lib_local_cpu_util = (float)0.0;
-  /* It is possible that the library measured a time other than */
-  /* the one that the user want for the cpu utilization */
-  /* calculations - for example, tests that were ended by */
-  /* watchdog timers such as the udp stream test. We let these */
-  /* tests tell up what the elapsed time should be. */
+  /* It is possible that the library measured a time other than the
+     one that the user want for the cpu utilization calculations - for
+     example, tests that were ended by watchdog timers such as the udp
+     stream test. We let these tests tell up what the elapsed time
+     should be. */
 
   if (elapsed_time != 0.0) {
     correction_factor = (float) 1.0 +
@@ -286,14 +290,13 @@
     correction_factor = (float) 1.0;
   }
 
-  /* this looks just like the looper case. at least I think it */
-  /* should :) raj 4/95 */
+  /* this looks just like the looper case. at least I think it should
+     :) raj 4/95 */
   for (i = 0; i < lib_num_loc_cpus; i++) {
 
-    /* we assume that the two are not more than a long apart. I */
-    /* know that this is bad, but trying to go from long longs to */
-    /* a float (perhaps a double) is boggling my mind right now. */
-    /* raj 4/95 */
+    /* we assume that the two are not more than a long apart. I know
+       that this is bad, but trying to go from long longs to a float
+       (perhaps a double) is boggling my mind right now.  raj 4/95 */
 
     long long
       diff;

Modified: trunk/src/netcpu_procstat.c
===================================================================
--- trunk/src/netcpu_procstat.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netcpu_procstat.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,5 +1,5 @@
 char   netcpu_procstat_id[]="\
-@(#)netcpu_procstat.c (c) Copyright 2005-2007 Version 2.4.3";
+@(#)netcpu_procstat.c (c) Copyright 2005-2011 Version 2.5.0";
 
 /* netcpu_procstat.c
   
@@ -188,17 +188,18 @@
 	   (unsigned long long *)&res[i].steal,
 	   (unsigned long long *)&res[i].guest);
     if (debug) {
-      fprintf(where,"res[%d] is %llu %llu %llu %llu %llu %llu %llu %llu %llu\n",
-           i,
-	   (unsigned long long)res[i].user,
-	   (unsigned long long)res[i].nice,
-	   (unsigned long long)res[i].sys,
-	   (unsigned long long)res[i].idle,
-	   (unsigned long long)res[i].iowait,
-	   (unsigned long long)res[i].hard_irq,
-	   (unsigned long long)res[i].soft_irq,
-	   (unsigned long long)res[i].steal,
-	   (unsigned long long)res[i].guest);
+      fprintf(where,
+	      "res[%d] is %llu %llu %llu %llu %llu %llu %llu %llu %llu\n",
+	      i,
+	      (unsigned long long)res[i].user,
+	      (unsigned long long)res[i].nice,
+	      (unsigned long long)res[i].sys,
+	      (unsigned long long)res[i].idle,
+	      (unsigned long long)res[i].iowait,
+	      (unsigned long long)res[i].hard_irq,
+	      (unsigned long long)res[i].soft_irq,
+	      (unsigned long long)res[i].steal,
+	      (unsigned long long)res[i].guest);
       fflush(where);
     }
     p = strchr (p, '\n');
@@ -314,7 +315,8 @@
     lib_local_per_cpu_util[i] *= correction_factor;
     if (debug) {
       fprintf(where,
-              "calc_cpu_util: util on processor %d, diff = %llu %llu %llu %llu %llu %llu %llu %llu %llu util %f cf %f\n",
+              "calc_cpu_util: util on processor %d, diff = %llu %llu %llu "
+	      "%llu %llu %llu %llu %llu %llu util %f cf %f\n",
               i,
 	      (unsigned long long)diff.user,
 	      (unsigned long long)diff.nice,

Modified: trunk/src/netcpu_pstatnew.c
===================================================================
--- trunk/src/netcpu_pstatnew.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netcpu_pstatnew.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,5 +1,5 @@
 char   netcpu_pstatnew_id[]="\
-@(#)netcpu_pstatnew.c (c) Copyright 2005, Hewlett-Packard Company, Version 2.4.1";
+@(#)netcpu_pstatnew.c (c) Copyright 2005-2011 Hewlett-Packard Company, Version 2.5.0";
 
 /* since we "know" that this interface is available only on 11.23 and
    later, and that 11.23 and later are strictly 64-bit kernels, we can
@@ -191,15 +191,17 @@
 static void
 print_cpu_time_counters(char *name, int instance, cpu_time_counters_t *counters) 
 {
-  fprintf(where,"%s[%d]:\n",name,instance);
   fprintf(where,
-	  "\t idle %llu\n",counters[instance].idle);
-  fprintf(where,
-	  "\t user %llu\n",counters[instance].user);
-  fprintf(where,
-	  "\t kernel %llu\n",counters[instance].kernel);
-  fprintf(where,
-	  "\t interrupt %llu\n",counters[instance].interrupt);
+	  "%s[%d]:\n"
+	  "\t idle %llu\n"
+	  "\t user %llu\n"
+	  "\t kernel %llu\n"
+	  "\t interrupt %llu\n",
+	  name,instance,
+	  counters[instance].idle,
+	  counters[instance].user,
+	  counters[instance].kernel,
+	  counters[instance].interrupt);
 }
 
 float
@@ -309,7 +311,8 @@
 
     if (debug) {
       fprintf(where,
-	      "total_cpu_cycles %"PRIu64" sanity_cpu_cycles %"PRIu64" missing %"PRIu64"\n",
+	      "total_cpu_cycles %"PRIu64" sanity_cpu_cycles %"PRIu64
+	      " missing %"PRIu64"\n",
 	      total_cpu_cycles,
 	      sanity_cpu_cycles,
 	      sanity_cpu_cycles - total_cpu_cycles);
@@ -343,11 +346,16 @@
       (double)sanity_cpu_cycles;
 
     if (debug) {
-      fprintf(where,"\tfraction_idle %g\n",fraction_idle);
-      fprintf(where,"\tfraction_user %g\n",fraction_user);
-      fprintf(where,"\tfraction_kernel %g\n",fraction_kernel);
-      fprintf(where,"\tfraction_interrupt %g WARNING, possibly under-counted!\n",fraction_interrupt);
-      fprintf(where,"\testimated_fraction_interrupt %g\n",
+      fprintf(where,
+	      "\tfraction_idle %g\n"
+	      "\tfraction_user %g\n"
+	      "\tfraction_kernel %g\n"
+	      "\tfraction_interrupt %g WARNING, possibly under-counted!\n"
+	      "\testimated_fraction_interrupt %g\n",
+	      fraction_idle,
+	      fraction_user,
+	      fraction_kernel,
+	      fraction_interrupt,
 	      estimated_fraction_interrupt);
     }
 
@@ -387,11 +395,16 @@
        CALC_ACCURACY) / sanity_cpu_cycles;
 
     if (debug) {
-      fprintf(where,"\tfraction_idle %"PRIu64"\n",fraction_idle);
-      fprintf(where,"\tfraction_user %"PRIu64"\n",fraction_user);
-      fprintf(where,"\tfraction_kernel %"PRIu64"\n",fraction_kernel);
-      fprintf(where,"\tfraction_interrupt %"PRIu64"WARNING, possibly under-counted!\n",fraction_interrupt);
-      fprintf(where,"\testimated_fraction_interrupt %"PRIu64"\n",
+      fprintf(where,
+	      "\tfraction_idle %"PRIu64"\n"
+	      "\tfraction_user %"PRIu64"\n"
+	      "\tfraction_kernel %"PRIu64"\n"
+	      "\tfraction_interrupt %"PRIu64"WARNING, possibly under-counted!\n"
+	      "\testimated_fraction_interrupt %"PRIu64"\n",
+	      fraction_idle,
+	      fraction_user,
+	      fraction_kernel,
+	      fraction_interrupt,
 	      estimated_fraction_interrupt);
     }
 
@@ -414,7 +427,8 @@
 
   if (debug) {
     fprintf(where,
-	    "calc_cpu_util: returning %g\n",lib_local_cpu_util);
+	    "calc_cpu_util: returning %g\n",
+	    lib_local_cpu_util);
   }
 
   return lib_local_cpu_util;

Modified: trunk/src/netlib.c
===================================================================
--- trunk/src/netlib.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netlib.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,5 +1,5 @@
 char    netlib_id[]="\
-@(#)netlib.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3";
+@(#)netlib.c (c) Copyright 1993-2011 Hewlett-Packard Company. Version 2.5.0";
 
 
 /****************************************************************/
@@ -57,10 +57,11 @@
 #include <config.h>
 #endif
 
- /* It would seem that most of the includes being done here from */
- /* "sys/" actually have higher-level wrappers at just /usr/include. */
- /* This is based on a spot-check of a couple systems at my disposal. */
- /* If you have trouble compiling you may want to add "sys/" raj 10/95 */
+ /* It would seem that most of the includes being done here from
+    "sys/" actually have higher-level wrappers at just /usr/include.
+    This is based on a spot-check of a couple systems at my disposal.
+    If you have trouble compiling you may want to add "sys/" raj
+    10/95 */
 #include <limits.h>
 #include <signal.h>
 #ifdef HAVE_SYSCALL_H
@@ -82,10 +83,10 @@
 
 
 #ifndef WIN32
- /* at some point, I would like to get rid of all these "sys/" */
- /* includes where appropriate. if you have a system that requires */
- /* them, speak now, or your system may not compile later revisions of */
- /* netperf. raj 1/96 */
+ /* at some point, I would like to get rid of all these "sys/"
+    includes where appropriate. if you have a system that requires/
+    them, speak now, or your system may not compile later revisions of
+    netperf. raj 1/96 */
 #include <unistd.h>
 #include <sys/stat.h>
 #include <sys/times.h>
@@ -186,10 +187,10 @@
 #define LONG_LONG_MAX 9223372036854775807LL
 #endif /* LONG_LONG_MAX */
 
- /* older versions of netperf knew about the HP kernel IDLE counter. */
- /* this is now obsolete - in favor of either pstat(), times, or a */
- /* process-level looper process. we also now require support for the */
- /* "long" integer type. raj 4/95.  */
+ /* older versions of netperf knew about the HP kernel IDLE counter.
+    this is now obsolete - in favor of either pstat(), times, or a
+    process-level looper process. we also now require support for the
+    "long" integer type. raj 4/95.  */
 
 int 
   lib_num_loc_cpus,    /* the number of cpus in the system */
@@ -244,11 +245,11 @@
 int local_data_family=AF_UNSPEC;
 int remote_data_family=AF_UNSPEC;
 
- /* in the past, I was overlaying a structure on an array of ints. now */
- /* I am going to have a "real" structure, and point an array of ints */
- /* at it. the real structure will be forced to the same alignment as */
- /* the type "double." this change will mean that pre-2.1 netperfs */
- /* cannot be mixed with 2.1 and later. raj 11/95 */
+/* in the past, I was overlaying a structure on an array of ints. now
+   I am going to have a "real" structure, and point an array of ints
+   at it. the real structure will be forced to the same alignment as
+   the type "double." this change will mean that pre-2.1 netperfs
+   cannot be mixed with 2.1 and later. raj 11/95 */
 
 union   netperf_request_struct  netperf_request;
 union   netperf_response_struct netperf_response;
@@ -604,8 +605,8 @@
   unsigned char scratch;
   int i;
 
-  /* on those systems where ntohl is a no-op, we want to return the */
-  /* original value, unchanged */
+  /* on those systems where ntohl is a no-op, we want to return the
+     original value, unchanged */
 
   if (ntohl(1L) == 1L) {
     return(net_double);
@@ -613,9 +614,9 @@
 
   conv_rec.whole_thing = net_double;
 
-  /* we know that in the message passing routines that ntohl will have */
-  /* been called on the 32 bit quantities. we need to put those back */
-  /* the way they belong before we swap */
+  /* we know that in the message passing routines that ntohl will have
+     been called on the 32 bit quantities. we need to put those back
+     the way they belong before we swap */
   conv_rec.words[0] = htonl(conv_rec.words[0]);
   conv_rec.words[1] = htonl(conv_rec.words[1]);
   
@@ -653,8 +654,8 @@
   unsigned char scratch;
   int i;
 
-  /* on those systems where ntohl is a no-op, we want to return the */
-  /* original value, unchanged */
+  /* on those systems where ntohl is a no-op, we want to return the
+     original value, unchanged */
 
   if (ntohl(1L) == 1L) {
     return(host_double);
@@ -678,10 +679,9 @@
   }
 #endif
 
-  /* we know that in the message passing routines htonl will */
-  /* be called on the 32 bit quantities. we need to set things up so */
-  /* that when this happens, the proper order will go out on the */
-  /* network */
+  /* we know that in the message passing routines htonl will be called
+     on the 32 bit quantities. we need to set things up so that when
+     this happens, the proper order will go out on the network */
   conv_rec.words[0] = htonl(conv_rec.words[0]);
   conv_rec.words[1] = htonl(conv_rec.words[1]);
   
@@ -810,8 +810,8 @@
   
   temp_cpus = SystemInfo.dwNumberOfProcessors;
 #else
-  /* we need to know some other ways to do this, or just fall-back on */
-  /* a global command line option - raj 4/95 */
+  /* we need to know some other ways to do this, or just fall-back on
+     a global command line option - raj 4/95 */
   temp_cpus = shell_num_cpus;
 #endif  /* WIN32 */
 #endif /* _SC_NPROCESSORS_ONLN */
@@ -921,12 +921,12 @@
     else {
 #ifdef WANT_INTERVALS
 #ifdef __hpux
-      /* the test is not over yet and we must have been using the */
-      /* interval timer. if we were in SYS_SIGSUSPEND we want to */
-      /* re-start the system call. Otherwise, we want to get out of */
-      /* the sigsuspend call. I NEED TO KNOW HOW TO DO THIS FOR OTHER */
-      /* OPERATING SYSTEMS. If you know how, please let me know. rick */
-      /* jones <raj at cup.hp.com> */
+      /* the test is not over yet and we must have been using the
+	 interval timer. if we were in SYS_SIGSUSPEND we want to
+	 re-start the system call. Otherwise, we want to get out of
+	 the sigsuspend call. I NEED TO KNOW HOW TO DO THIS FOR OTHER
+	 OPERATING SYSTEMS. If you know how, please let me know. rick
+	 jones <rick.jones2 at hp.com> */
       if (scp->sc_syscall != SYS_SIGSUSPEND) {
         if (debug > 2) {
           fprintf(where,
@@ -1159,10 +1159,10 @@
 
 
 #ifdef WANT_INTERVALS
- /* this routine will enable the interval timer and set things up so */
- /* that for a timed test the test will end at the proper time. it */
- /* should detect the presence of POSIX.4 timer_* routines one of */
- /* these days */
+/* this routine will enable the interval timer and set things up so
+   that for a timed test the test will end at the proper time. it
+   should detect the presence of POSIX.4 timer_* routines one of these
+   days */
 void
 start_itimer(unsigned int interval_len_msec )
 {
@@ -1172,12 +1172,12 @@
   struct itimerval new_interval;
   struct itimerval old_interval;
 
-  /* if -DWANT_INTERVALS was used, we will use the ticking of the itimer to */
-  /* tell us when the test is over. while the user will be specifying */
-  /* some number of milliseconds, we know that the interval timer is */
-  /* really in units of 1/HZ. so, to prevent the test from running */
-  /* "long" it would be necessary to keep this in mind when calculating */
-  /* the number of itimer events */
+  /* if -DWANT_INTERVALS was used, we will use the ticking of the
+     itimer to tell us when the test is over. while the user will be
+     specifying some number of milliseconds, we know that the interval
+     timer is really in units of 1/HZ. so, to prevent the test from
+     running "long" it would be necessary to keep this in mind when
+     calculating the number of itimer events */
 
   ticks_per_itvl = ((interval_wate * sysconf(_SC_CLK_TCK) * 1000) / 
                     1000000);
@@ -1206,8 +1206,8 @@
     fflush(where);
   }
 
-  /* if this was not a timed test, then we really aught to enable the */
-  /* signal catcher raj 2/95 */
+  /* if this was not a timed test, then we really aught to enable the
+     signal catcher raj 2/95 */
 
   new_interval.it_interval.tv_sec = usec_per_itvl / 1000000;
   new_interval.it_interval.tv_usec = usec_per_itvl % 1000000;  
@@ -1340,12 +1340,11 @@
 
 }
 
- /* this routine will conver the string into an unsigned integer. it */
- /* is used primarily for the command-line options taking a number */
- /* (such as the socket size) which could be rather large. If someone */
- /* enters 32M, then the number will be converted to 32 * 1024 * 1024. */
- /* If they inter 32m, the number will be converted to 32 * 1000 * */
- /* 1000 */
+/* this routine will conver the string into an unsigned integer. it is
+   used primarily for the command-line options taking a number (such
+   as the socket size) which could be rather large. If someone enters
+   32M, then the number will be converted to 32 * 1024 * 1024.  If
+   they inter 32m, the number will be converted to 32 * 1000 * 1000 */
 unsigned int
 convert(char *string)
 
@@ -1406,13 +1405,13 @@
 }
 
 
- /* this routine will allocate a circular list of buffers for either */
- /* send or receive operations. each of these buffers will be aligned */
- /* and offset as per the users request. the circumference of this */
- /* ring will be controlled by the setting of send_width. the buffers */
- /* will be filled with data from the file specified in fill_file. if */
- /* fill_file is an empty string, the buffers will not be filled with */
- /* any particular data */
+/* this routine will allocate a circular list of buffers for either
+   send or receive operations. each of these buffers will be aligned
+   and offset as per the users request. the circumference of this ring
+   will be controlled by the setting of send_width. the buffers will
+   be filled with data from the file specified in fill_file. if
+   fill_file is an empty string, the buffers will not be filled with
+   any particular data */
 
 struct ring_elt *
 allocate_buffer_ring(int width, int buffer_size, int alignment, int offset)
@@ -1571,13 +1570,13 @@
 #include <sys/mman.h>
 #include <sys/exs.h>
 
- /* this routine will allocate a circular list of buffers for either */
- /* send or receive operations. each of these buffers will be aligned */
- /* and offset as per the users request. the circumference of this */
- /* ring will be controlled by the setting of send_width. the buffers */
- /* will be filled with data from the file specified in fill_file. if */
- /* fill_file is an empty string, the buffers will not be filled with */
- /* any particular data */
+/* this routine will allocate a circular list of buffers for either
+   send or receive operations. each of these buffers will be aligned
+   and offset as per the users request. the circumference of this ring
+   will be controlled by the setting of send_width. the buffers will
+   be filled with data from the file specified in fill_file. if
+   fill_file is an empty string, the buffers will not be filled with
+   any particular data */
 
 struct ring_elt *
 allocate_exs_buffer_ring (int width, int buffer_size, int alignment, int offset, exs_mhandle_t *mhandlep)
@@ -1824,9 +1823,9 @@
 
   prev_link = NULL;
   for (i = 1; i <= width; i++) {
-    /* get the ring element. we should probably make sure the malloc() 
-     was successful, but for now we'll just let the code bomb
-     mysteriously. 08/2000 */
+    /* get the ring element. we should probably make sure the malloc()
+       was successful, but for now we'll just let the code bomb
+       mysteriously. 08/2000 */
 
     temp_link = (struct sendfile_ring_elt *)
       malloc(sizeof(struct sendfile_ring_elt));
@@ -2109,21 +2108,21 @@
     exit(1);
   }
 
-  /* Now, we hang on a select waiting for the socket to become */
-  /* readable to receive the shutdown indication from the remote. this */
-  /* will be "just" like the recv_response() code */
+  /* Now, we hang on a select waiting for the socket to become
+     readable to receive the shutdown indication from the remote. this
+     will be "just" like the recv_response() code
 
-  /* we only select once. it is assumed that if the response is split */
-  /* (which should not be happening, that we will receive the whole */
-  /* thing and not have a problem ;-) */
+     we only select once. it is assumed that if the response is split
+     (which should not be happening, that we will receive the whole
+     thing and not have a problem ;-) */
 
   FD_ZERO(&readfds);
   FD_SET(netlib_control,&readfds);
   timeout.tv_sec  = 60; /* wait one minute then punt */
   timeout.tv_usec = 0;
 
-  /* select had better return one, or there was either a problem or a */
-  /* timeout... */
+  /* select had better return one, or there was either a problem or a
+     timeout... */
   if (select(FD_SETSIZE,
              &readfds,
              0,
@@ -2334,8 +2333,8 @@
     count = sizeof(netperf_request)/4;
   }
   
-  /* display the contents of the request if the debug level is high */
-  /* enough. otherwise, just send the darned thing ;-) */
+  /* display the contents of the request if the debug level is high
+     enough. otherwise, just send the darned thing ;-) */
   
   if (debug > 1) {
     fprintf(where,
@@ -2345,18 +2344,17 @@
   }
 
   /* pass the processor affinity request value to netserver this is a
-  kludge and I know it.  sgb 8/11/04. we keep this here to deal with
-  there being two paths to this place - direct and via
-  send_request()  */
+     kludge and I know it.  sgb 8/11/04. we keep this here to deal
+     with there being two paths to this place - direct and via
+     send_request()  */
 
   netperf_request.content.dummy = remote_proc_affinity;
 
-  /* put the entire request array into network order. We do this */
-  /* arbitrarily rather than trying to figure-out just how much */
-  /* of the request array contains real information. this should */
-  /* be simpler, and at any rate, the performance of sending */
-  /* control messages for this benchmark is not of any real */
-  /* concern. */ 
+  /* put the entire request array into network order. We do this
+     arbitrarily rather than trying to figure-out just how much of the
+     request array contains real information. this should be simpler,
+     and at any rate, the performance of sending control messages for
+     this benchmark is not of any real concern. */ 
   
   for (counter = 0;counter < count; counter++) {
     request_array[counter] = htonl(request_array[counter]);
@@ -2400,8 +2398,8 @@
 send_request()
 {
   
-  /* pass the processor affinity request value to netserver */
-  /* this is a kludge and I know it.  sgb 8/11/04           */
+  /* pass the processor affinity request value to netserver this is a
+     kludge and I know it.  sgb 8/11/04  */
 
   netperf_request.content.dummy = remote_proc_affinity;
 
@@ -2447,11 +2445,11 @@
     dump_response();
   }
 
-  /* put the entire response_array into network order. We do this */
-  /* arbitrarily rather than trying to figure-out just how much of the */
-  /* request array contains real information. this should be simpler, */
-  /* and at any rate, the performance of sending control messages for */
-  /* this benchmark is not of any real concern. */
+  /* put the entire response_array into network order. We do this
+     arbitrarily rather than trying to figure-out just how much of the
+     request array contains real information. this should be simpler,
+     and at any rate, the performance of sending control messages for
+     this benchmark is not of any real concern. */
   
   for (counter = 0; counter < count; counter++) {
     response_array[counter] = htonl(response_array[counter]);
@@ -2561,7 +2559,7 @@
   
   if (bytes_recvd == 0) {
     /* the remote has shutdown the control connection, we should shut
-       it  down as well and exit */
+       it down as well and exit */
     if (debug) {
       fprintf(where,
 	      "recv_request: remote requested shutdown of control\n");
@@ -2589,8 +2587,8 @@
     dump_request();
   } 
 
-  /* get the processor affinity request value from netperf */
-  /* this is a kludge and I know it.  sgb 8/11/04          */
+  /* get the processor affinity request value from netperf this is a
+     kludge and I know it.  sgb 8/11/04  */
   
   local_proc_affinity = netperf_request.content.dummy;
   
@@ -2660,9 +2658,9 @@
     response_array[counter] = 0;
   }
   
-  /* we only select once. it is assumed that if the response is split */
-  /* (which should not be happening, that we will receive the whole */
-  /* thing and not have a problem ;-) */
+  /* we only select once. it is assumed that if the response is split
+     (which should not be happening, that we will receive the whole
+     thing and not have a problem ;-) */
   
   FD_ZERO(&readfds);
   FD_SET(netlib_control,&readfds);
@@ -2728,31 +2726,32 @@
   }
 }
 
- /*
+/*
 
-      recv_response_timed()                                           
+  recv_response_timed()                                           
                                                                     
- receive the remote's response on the control socket. we will put the
- entire response into host order before giving it to the calling
- routine. hopefully, this will go most of the way to insuring
- intervendor interoperability. if there are any problems, we will just
- punt the entire situation.
+  receive the remote's response on the control socket. we will put the
+  entire response into host order before giving it to the calling
+  routine. hopefully, this will go most of the way to insuring
+  intervendor interoperability. if there are any problems, we will
+  just punt the entire situation.
                                                                     
- The call to select at the beginning is to get us out of hang
- situations where the remote gives-up but we don't find-out about
- it. This seems to happen only rarely, but it would be nice to be
- somewhat robust ;-)
+  The call to select at the beginning is to get us out of hang
+  situations where the remote gives-up but we don't find-out about
+  it. This seems to happen only rarely, but it would be nice to be
+  somewhat robust ;-)
 
- The "_timed" part is to allow the caller to add (or I suppose
- subtract) from the length of timeout on the select call. this was
- added since not all the CPU utilization mechanisms require a 40
- second calibration, and we used to have an aribtrary 40 second sleep
- in "calibrate_remote_cpu" - since we don't _always_ need that, we
- want to simply add 40 seconds to the select() timeout from that call,
- but don't want to change all the "recv_response" calls in the code
- right away.  sooo, we push the functionality of the old
- recv_response() into a new recv_response_timed(addl_timout) call, and
- have recv_response() call recv_response_timed(0).  raj 2005-05-16
+  The "_timed" part is to allow the caller to add (or I suppose
+  subtract) from the length of timeout on the select call. this was
+  added since not all the CPU utilization mechanisms require a 40
+  second calibration, and we used to have an aribtrary 40 second sleep
+  in "calibrate_remote_cpu" - since we don't _always_ need that, we
+  want to simply add 40 seconds to the select() timeout from that
+  call, but don't want to change all the "recv_response" calls in the
+  code right away.  sooo, we push the functionality of the old
+  recv_response() into a new recv_response_timed(addl_timout) call,
+  and have recv_response() call recv_response_timed(0).  raj
+  2005-05-16
 
  */
 
@@ -2832,8 +2831,8 @@
   } *overlay;
 
   overlay = (union overlay_u *)big_int;
-  /* on those systems which are byte swapped, we really wish to */
-  /* return words[1] - at least I think so - raj 4/95 */
+  /* on those systems which are byte swapped, we really wish to return
+     words[1] - at least I think so - raj 4/95 */
   if (htonl(1L) == 1L) {
     /* we are a "normal" :) machine */
     return(overlay->words[0]);
@@ -2853,8 +2852,8 @@
   } *overlay;
 
   overlay = (union overlay_u *)big_int;
-  /* on those systems which are byte swapped, we really wish to */
-  /* return words[0] - at least I think so - raj 4/95 */
+  /* on those systems which are byte swapped, we really wish to return
+     words[0] - at least I think so - raj 4/95 */
   if (htonl(1L) == 1L) {
     /* we are a "normal" :) machine */
     return(overlay->words[1]);
@@ -2912,7 +2911,7 @@
      tells the stack you wish to enable copy-avoidance. Knuth only
      knows what it will do on other stacks, but it might be
      interesting to find-out, so we won't bother #ifdef'ing the change
-     to allow asking for 0 bytes. Courtesy of SAF, 2007-05  raj
+     to allow asking for 0 bytes. Courtesy of SAF, 2007-05 raj
      2007-05-31 */
   if (requested_size >= 0) {
     if (setsockopt(sd, SOL_SOCKET, optname,
@@ -3051,25 +3050,25 @@
 /*
   establish_control()
 
-set-up the control connection between netperf and the netserver so we
-can actually run some tests. if we cannot establish the control
-connection, that may or may not be a good thing, so we will let the
-caller decide what to do.
+  set-up the control connection between netperf and the netserver so
+  we can actually run some tests. if we cannot establish the control
+  connection, that may or may not be a good thing, so we will let the
+  caller decide what to do.
 
-to assist with pesky end-to-end-unfriendly things like firewalls, we
-allow the caller to specify both the remote hostname and port, and the
-local addressing info.  i believe that in theory it is possible to
-have an IPv4 endpoint and an IPv6 endpoint communicate with one
-another, but for the time being, we are only going to take-in one
-requested address family parameter. this means that the only way
-(iirc) that we might get a mixed-mode connection would be if the
-address family is specified as AF_UNSPEC, and getaddrinfo() returns
-different families for the local and server names.
+  to assist with pesky end-to-end-unfriendly things like firewalls, we
+  allow the caller to specify both the remote hostname and port, and
+  the local addressing info.  i believe that in theory it is possible
+  to have an IPv4 endpoint and an IPv6 endpoint communicate with one
+  another, but for the time being, we are only going to take-in one
+  requested address family parameter. this means that the only way
+  (iirc) that we might get a mixed-mode connection would be if the
+  address family is specified as AF_UNSPEC, and getaddrinfo() returns
+  different families for the local and server names.
+  
+  the "names" can also be IP addresses in ASCII string form.
 
-the "names" can also be IP addresses in ASCII string form.
+  raj 2003-02-27 */
 
-raj 2003-02-27 */
-
 SOCKET
 establish_control_internal(char *hostname,
 			   char *port,
@@ -3113,14 +3112,15 @@
   /* we want to loop through all the possibilities. looping on the
      local addresses will be handled within the while loop.  I suppose
      these is some more "C-expert" way to code this, but it has not
-     lept to mind just yet :)  raj 2003-02024 */
+     lept to mind just yet :) raj 2003-02024 */
 
   while (remote_res_temp != NULL) {
 
     /* I am guessing that we should use the address family of the
        local endpoint, and we will not worry about mixed family types
        - presumeably the stack or other transition mechanisms will be
-       able to deal with that for us. famous last words :)  raj 2003-02-26 */
+       able to deal with that for us. famous last words :) raj
+       2003-02-26 */
     control_sock = socket(local_res_temp->ai_family,
                           SOCK_STREAM,
                           0);
@@ -3128,7 +3128,8 @@
       /* at some point we'll need a more generic "display error"
          message for when/if we use GUIs and the like. unlike a bind
          or connect failure, failure to allocate a socket is
-         "immediately fatal" and so we return to the caller. raj 2003-02-24 */
+         "immediately fatal" and so we return to the caller. raj
+         2003-02-24 */
       if (debug) {
         perror("establish_control: unable to allocate control socket");
       }
@@ -3582,16 +3583,16 @@
              (double) unit_divisor / 
              (double) elapsed_time);
 
-  /* on MP systems, it is necessary to multiply the service demand by */
-  /* the number of CPU's. at least, I believe that to be the case:) */
-  /* raj 10/95 */
+  /* on MP systems, it is necessary to multiply the service demand by
+     the number of CPU's. at least, I believe that to be the case:)
+     raj 10/95 */
 
-  /* thruput has a "per second" component. if we were using 100% ( */
-  /* 100.0) of the CPU in a second, that would be 1 second, or 1 */
-  /* millisecond, so we multiply cpu_utilization by 10 to go to */
-  /* milliseconds, or 10,000 to go to micro seconds. With revision */
-  /* 2.1, the service demand measure goes to microseconds per unit. */
-  /* raj 12/95 */ 
+  /* thruput has a "per second" component. if we were using 100% (
+     100.0) of the CPU in a second, that would be 1 second, or 1
+     millisecond, so we multiply cpu_utilization by 10 to go to
+     milliseconds, or 10,000 to go to micro seconds. With revision
+     2.1, the service demand measure goes to microseconds per unit.
+     raj 12/95 */ 
   service_demand = (cpu_utilization*10000.0/thruput) * 
     (float) num_cpus;
   
@@ -3664,17 +3665,17 @@
 #endif /* USE_LOOPER */
 
   if (local_cpu_rate > 0) {
-    /* The user think that he knows what the cpu rate is. We assume */
-    /* that all the processors of an MP system are essentially the */
-    /* same - for this reason we do not have a per processor maxrate. */
-    /* if the machine has processors which are different in */
-    /* performance, the CPU utilization will be skewed. raj 4/95 */
+    /* The user think that he knows what the cpu rate is. We assume
+       that all the processors of an MP system are essentially the
+       same - for this reason we do not have a per processor maxrate.
+       if the machine has processors which are different in
+       performance, the CPU utilization will be skewed. raj 4/95 */
     lib_local_maxrate = local_cpu_rate;
   }
   else {
-    /* if neither USE_LOOPER nor USE_PSTAT are defined, we return a */
-    /* 0.0 to indicate that times or getrusage should be used. raj */
-    /* 4/95 */
+    /* if neither USE_LOOPER nor USE_PSTAT are defined, we return a
+       0.0 to indicate that times or getrusage should be used. raj
+       4/95 */
     lib_local_maxrate = (float)0.0;
 #if defined(USE_PROC_STAT) || defined(USE_LOOPER) || defined(USE_PSTAT) || defined(USE_KSTAT) || defined(USE_PERFSTAT) || defined(USE_SYSCTL)
     lib_local_maxrate = calibrate_idle_rate(4,10);
@@ -3691,9 +3692,9 @@
 
   netperf_request.content.request_type = CPU_CALIBRATE;
   send_request();
-  /* we know that calibration will last at least 40 seconds, so go to */
-  /* sleep for that long so the 60 second select in recv_response will */
-  /* not pop. raj 7/95 */
+  /* we know that calibration will last at least 40 seconds, so go to
+     sleep for that long so the 60 second select in recv_response will
+     not pop. raj 7/95 */
 
   /* we know that CPU calibration may last as long as 40 seconds, so
      make sure we "select" for at least that long while looking for
@@ -3701,9 +3702,9 @@
   recv_response_timed(40);
 
   if (netperf_response.content.serv_errno) {
-    /* initially, silently ignore remote errors and pass */
-    /* back a zero to the caller this should allow us to */
-    /* mix rev 1.0 and rev 1.1 netperfs... */
+    /* initially, silently ignore remote errors and pass back a zero
+       to the caller this should allow us to mix rev 1.0 and rev 1.1
+       netperfs... */
     return((float)0.0);
   }
   else {
@@ -3722,9 +3723,9 @@
 
 
 #ifndef WIN32
-/* WIN32 requires that at least one of the file sets to select be non-null. */
-/* Since msec_sleep routine is only called by nettest_dlpi & nettest_unix,  */
-/* let's duck this issue. */
+/* WIN32 requires that at least one of the file sets to select be
+   non-null.  Since msec_sleep routine is only called by nettest_dlpi
+   & nettest_unix, let's duck this issue. */
 
 int
 msec_sleep( int msecs )
@@ -3766,7 +3767,7 @@
    > 100 secs
    
    This will allow any time to be recorded to within an accuracy of
-   10%, and provides a compact  representation for capturing the
+   10%, and provides a compact representation for capturing the
    distribution of a large number of time differences (e.g.
    request-response latencies).
    
@@ -4182,11 +4183,11 @@
 
 
 
- /* these routines for confidence intervals are courtesy of IBM. They */
- /* have been modified slightly for more general usage beyond TCP/UDP */
- /* tests. raj 11/94 I would suspect that this code carries an IBM */
- /* copyright that is much the same as that for the original HP */
- /* netperf code */
+/* these routines for confidence intervals are courtesy of IBM. They
+   have been modified slightly for more general usage beyond TCP/UDP
+   tests. raj 11/94 I would suspect that this code carries an IBM
+   copyright that is much the same as that for the original HP netperf
+   code */
 int     confidence_iterations; /* for iterations */
 
 double  
@@ -4276,9 +4277,9 @@
         confidence=-10.0;
 }
 
- /* this routine does a simple table lookup for some statistical */
- /* function that I would remember if I stayed awake in my probstats */
- /* class... raj 11/94 */
+/* this routine does a simple table lookup for some statistical
+   function that I would remember if I stayed awake in my probstats
+   class... raj 11/94 */
 double 
 confid(int level, int freedom)
 {
@@ -4519,9 +4520,9 @@
   return (double) (100.0 * (interval - rem_cpu_confid));
 }
 
- /* display_confidence() is called when we could not achieve the */
- /* desirec confidence in the results. it will print the achieved */
- /* confidence to "where" raj 11/94 */
+/* display_confidence() is called when we could not achieve the
+   desired confidence in the results. it will print the achieved
+   confidence to "where" raj 11/94 */
 void
 display_confidence()
 

Modified: trunk/src/netperf.c
===================================================================
--- trunk/src/netperf.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netperf.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,6 +1,6 @@
 /*
  
-	   Copyright (C) 1993-2007 Hewlett-Packard Company
+	   Copyright (C) 1993-2011 Hewlett-Packard Company
                          ALL RIGHTS RESERVED.
  
   The enclosed software and documentation includes copyrighted works
@@ -42,7 +42,7 @@
  
 */
 char	netperf_id[]="\
-@(#)netperf.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3";
+@(#)netperf.c (c) Copyright 1993-2011 Hewlett-Packard Company. Version 2.5.0";
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"

Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netserver.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,6 +1,6 @@
 /*
  
-	   Copyright (C) 1993-2007 Hewlett-Packard Company
+	   Copyright (C) 1993-2011 Hewlett-Packard Company
                          ALL RIGHTS RESERVED.
  
   The enclosed software and documentation includes copyrighted works
@@ -45,7 +45,7 @@
 #include "netperf_version.h"
 
 char	netserver_id[]="\
-@(#)netserver.c (c) Copyright 1993-2007 Hewlett-Packard Co. Version 2.4.5";
+@(#)netserver.c (c) Copyright 1993-2011 Hewlett-Packard Co. Version 2.5.0";
 
  /***********************************************************************/
  /*									*/

Modified: trunk/src/netsh.c
===================================================================
--- trunk/src/netsh.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/netsh.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,7 +1,7 @@
 #include "netperf_version.h"
 
 char	netsh_id[]="\
-@(#)netsh.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3pre";
+@(#)netsh.c (c) Copyright 1993-2011 Hewlett-Packard Company. Version 2.5.0";
 
 
 /****************************************************************/
@@ -97,9 +97,10 @@
 /*									*/
 /************************************************************************/
 
- /* Some of the args take optional parameters. Since we are using */
- /* getopt to parse the command line, we will tell getopt that they do */
- /* not take parms, and then look for them ourselves */
+/* Some of the args take optional parameters. Since we are using
+   getopt to parse the command line, we will tell getopt that they do
+   not take parms, and then look for them ourselves */
+
 #define GLOBAL_CMD_LINE_ARGS "A:a:b:B:CcdDf:F:H:hi:I:jk:K:l:L:n:NO:o:P:p:rSs:t:T:v:VW:w:46"
 
 /************************************************************************/
@@ -225,8 +226,8 @@
 
 double interval;
 
- /* stuff to control the "width" of the buffer rings for sending and */
- /* receiving data */
+ /* stuff to control the "width" of the buffer rings for sending and
+    receiving data */
 int	send_width;
 int     recv_width;
 
@@ -309,11 +310,11 @@
 comma-separated pair. This is to retain previous netperf behaviour.\n"; 
 
 
-/* This routine will return the two arguments to the calling routine. */
-/* If the second argument is not specified, and there is no comma, */
-/* then the value of the second argument will be the same as the */
-/* value of the first. If there is a comma, then the value of the */
-/* second argument will be the value of the second argument ;-) */
+/* This routine will return the two arguments to the calling routine.
+   If the second argument is not specified, and there is no comma,
+   then the value of the second argument will be the same as the value
+   of the first. If there is a comma, then the value of the second
+   argument will be the value of the second argument ;-) */
 void
 break_args(char *s, char *arg1, char *arg2)
 
@@ -555,40 +556,42 @@
 set_defaults()
 {
   
-  /* stuff to say where this test is going                              */
+  /* stuff to say where this test is going  */
   strcpy(host_name,"");	      /* remote host name or ip addr  */
   strcpy(local_host_name,""); /* we want it to be INADDR_ANY */
-  strcpy(test_name,"TCP_STREAM");	/* which test to run 		*/
-  strncpy(test_port,"12865",PORTBUFSIZE); /* where is the test waiting    */
+  strcpy(test_name,"TCP_STREAM");	/* which test to run  */
+  strncpy(test_port,"12865",PORTBUFSIZE); /* where is the test
+					     waiting  */
   strncpy(local_test_port,"0",PORTBUFSIZE);/* INPORT_ANY as it were */
   address_family = AF_UNSPEC;
   local_address_family = AF_UNSPEC;
 
-  /* output controlling variables                               */
-  debug			= 0;/* debugging level			*/
-  print_headers		= 1;/* do print test headers		*/
-  verbosity		= 1;/* verbosity level			*/
+  /* output controlling variables  */
+  debug			= 0;/* debugging  */
+  print_headers		= 1;/* do print test headers  */
+  verbosity		= 1;/* verbosity level  */
   keep_histogram        = 0;
   keep_statistics       = 0;
 
   /* cpu variables */
-  local_cpu_usage	= 0;/* measure local cpu		*/
-  remote_cpu_usage	= 0;/* what do you think ;-)		*/
+  local_cpu_usage	= 0;/* measure local cpu  */
+  remote_cpu_usage	= 0;/* what do you think ;-)  */
   
   local_cpu_rate	= (float)0.0;
   remote_cpu_rate	= (float)0.0;
   
-  /* the end-test conditions for the tests - either transactions, bytes,  */
-  /* or time. different vars used for clarity - space is cheap ;-)        */
-  test_time	= 10;	/* test ends by time			*/
-  test_bytes	= 0;	/* test ends on byte count		*/
-  test_trans	= 0;	/* test ends on tran count		*/
+  /* the end-test conditions for the tests - either transactions,
+     bytes, or time. different vars used for clarity - space is cheap
+     ;-)  */
+  test_time	= 10;	/* test ends by time  */
+  test_bytes	= 0;	/* test ends on byte count  */
+  test_trans	= 0;	/* test ends on tran count  */
   
-  /* the alignment conditions for the tests				*/
-  local_recv_align	= 8;	/* alignment for local receives	*/
-  local_send_align	= 8;	/* alignment for local sends	*/
+  /* the alignment conditions for the tests  */
+  local_recv_align	= 8;	/* alignment for local receives */
+  local_send_align	= 8;	/* alignment for local sends  */
   remote_recv_align	= 8;	/* alignment for remote receives*/
-  remote_send_align	= 8;	/* alignment for remote sends	*/
+  remote_send_align	= 8;	/* alignment for remote sends  */
   
   /* rate controlling stuff, taken out of the #ifdef for omni */
   interval_usecs  = 0;
@@ -700,11 +703,11 @@
   }
   *--p = 0;
 
-  /* Go through all the command line arguments and break them */
-  /* out. For those options that take two parms, specifying only */
-  /* the first will set both to that value. Specifying only the */
-  /* second will leave the first untouched. To change only the */
-  /* first, use the form first, (see the routine break_args.. */
+  /* Go through all the command line arguments and break them out. For
+     those options that take two parms, specifying only the first will
+     set both to that value. Specifying only the second will leave the
+     first untouched. To change only the first, use the form first,
+     (see the routine break_args.. */
   
   while ((c= getopt(argc, argv, GLOBAL_CMD_LINE_ARGS)) != EOF) {
     switch (c) {
@@ -731,9 +734,8 @@
 	remote_recv_align = convert(arg2);
       break;
     case 'c':
-      /* measure local cpu usage please. the user */
-      /* may have specified the cpu rate as an */
-      /* optional parm */
+      /* measure local cpu usage please. the user may have specified
+         the cpu rate as an optional parm */
       if (argv[optind] && isdigit((unsigned char)argv[optind][0])){
 	/* there was an optional parm */
 	local_cpu_rate = (float)atof(argv[optind]);
@@ -911,8 +913,8 @@
       convert_to_upper(test_name);
       break;
     case 'T':
-      /* We want to set the processor on which netserver or netperf */
-      /* will run */
+      /* We want to set the processor on which netserver or netperf
+         will run */
       break_args(optarg,arg1,arg2);
       if (arg1[0]) {
 	local_proc_affinity = convert(arg1);
@@ -924,8 +926,8 @@
       cpu_binding_requested = 1;
       break;
     case 'W':
-      /* set the "width" of the user space data buffer ring. This will */
-      /* be the number of send_size buffers malloc'd in the tests */  
+      /* set the "width" of the user space data buffer ring. This will
+	 be the number of send_size buffers malloc'd in the tests */  
       break_args(optarg,arg1,arg2);
       if (arg1[0]) 
 	send_width = convert(arg1);
@@ -980,10 +982,10 @@
       break;
     case 'w':
       /* We want to send requests at a certain wate.  Remember that
-      there are 1000000 usecs in a second, and that the packet rate is
-      expressed in packets per millisecond. shuffle the #ifdef around
-      a bit to deal with both netperf and netserver possibly doing
-      intervals with omni tests */
+         there are 1000000 usecs in a second, and that the packet rate
+         is expressed in packets per millisecond. shuffle the #ifdef
+         around a bit to deal with both netperf and netserver possibly
+         doing intervals with omni tests */
       break_args_explicit(optarg,arg1,arg2);
       if (arg1[0]) {
 #ifdef WANT_INTERVALS
@@ -1008,7 +1010,8 @@
       if (arg1[0]) {
 #ifdef WANT_INTERVALS
 	interval_burst = convert(arg1);
-	/* set a default in case the user does not include the -w option */
+	/* set a default in case the user does not include the -w
+	   option */
 	if (interval_usecs == 0) {
 	  interval_wate = 1;
 	  interval_usecs = 1000;
@@ -1102,7 +1105,8 @@
       exit(-1);
     }
   } else {
-    /* resolve the hostname and pull the address family from the addrinfo */
+    /* resolve the hostname and pull the address family from the
+       addrinfo */
     struct addrinfo *ai;
 
     ai = resolve_host(host_name, NULL, address_family);

Modified: trunk/src/nettest_bsd.c
===================================================================
--- trunk/src/nettest_bsd.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/nettest_bsd.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -1,6 +1,6 @@
 #ifndef lint
 char	nettest_id[]="\
-@(#)nettest_bsd.c (c) Copyright 1993-2008 Hewlett-Packard Co. Version 2.4.5";
+@(#)nettest_bsd.c (c) Copyright 1993-2011 Hewlett-Packard Co. Version 2.5.0";
 #endif /* lint */
 
 

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2011-07-07 21:14:39 UTC (rev 416)
+++ trunk/src/nettest_omni.c	2011-07-07 22:07:17 UTC (rev 417)
@@ -4,7 +4,7 @@
 
 #ifdef WANT_OMNI
 char nettest_omni_id[]="\
-@(#)nettest_omni.c (c) Copyright 2008 Hewlett-Packard Co. Version 2.5.0pre";
+@(#)nettest_omni.c (c) Copyright 2008-2011 Hewlett-Packard Co. Version 2.5.0";
 
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H



More information about the netperf-dev mailing list