[netperf-dev] netperf2 commit notice r247 - in trunk: . doc doc/examples src src/missing src/missing/m4

raj at netperf.org raj at netperf.org
Fri Mar 7 12:03:30 PST 2008


Author: raj
Date: 2008-03-07 12:03:29 -0800 (Fri, 07 Mar 2008)
New Revision: 247

Modified:
   trunk/Makefile.in
   trunk/configure
   trunk/configure.ac
   trunk/doc/Makefile.in
   trunk/doc/examples/Makefile.in
   trunk/src/Makefile.am
   trunk/src/Makefile.in
   trunk/src/missing/Makefile.in
   trunk/src/missing/m4/Makefile.in
   trunk/src/netlib.h
   trunk/src/nettest_bsd.h
   trunk/src/nettest_omni.c
Log:
infrastructure flesh out for system info such as system model cpu model and cpu frequency

Modified: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/Makefile.in	2008-03-07 20:03:29 UTC (rev 247)
@@ -73,6 +73,7 @@
 NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@
 NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
 NETSLOTLKUP_SOURCE = @NETSLOTLKUP_SOURCE@
+NETSYSLKUP_SOURCE = @NETSYSLKUP_SOURCE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

Modified: trunk/configure
===================================================================
--- trunk/configure	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/configure	2008-03-07 20:03:29 UTC (rev 247)
@@ -708,6 +708,7 @@
 NETRTLKUP_SOURCE
 NETSLOTLKUP_SOURCE
 NETDRVLKUP_SOURCE
+NETSYSLKUP_SOURCE
 LTLIBOBJS'
 ac_subst_files=''
       ac_precious_vars='build_alias
@@ -1328,6 +1329,8 @@
                           using specified mechanism
   --enable-drvlookup      include code to find the probable egress interface
                           using specified mechanism
+  --enable-syslookup      include code to find the probable egress interface
+                          using specified mechanism
 
 Some influential environment variables:
   CC          C compiler command
@@ -9699,6 +9702,45 @@
 
 
 
+# time to see about system lookup mechanisms
+
+{ echo "$as_me:$LINENO: checking which system info lookup type to use" >&5
+echo $ECHO_N "checking which system info lookup type to use... $ECHO_C" >&6; }
+
+# Check whether --enable-syslookup was given.
+if test "${enable_syslookup+set}" = set; then
+  enableval=$enable_syslookup;
+fi
+
+
+NETSYSLKUP_SOURCE="$enable_syslookup"
+case "$enable_syslookup" in
+
+	'')
+# guess it automagically in a nice big case statement
+		case $target in
+		     *)
+			use_syslookup=false
+			NETSYSLKUP_SOURCE="none"
+			enable_syslookup="none. Consider teaching configure about your platform."
+			;;
+		esac
+		;;
+	none)
+		use_syslookup=false
+		;;
+	*)
+		{ { echo "$as_me:$LINENO: error: --enable-syslookup takes none" >&5
+echo "$as_me: error: --enable-syslookup takes none" >&2;}
+   { (exit 1); exit 1; }; }
+		;;
+esac
+
+	{ echo "$as_me:$LINENO: result: \"$enable_syslookup\"" >&5
+echo "${ECHO_T}\"$enable_syslookup\"" >&6; }
+
+
+
 # now spit it all out
 ac_config_files="$ac_config_files Makefile src/netperf_version.h src/Makefile src/missing/Makefile src/missing/m4/Makefile doc/Makefile doc/examples/Makefile netperf.spec"
 
@@ -10452,10 +10494,11 @@
 NETRTLKUP_SOURCE!$NETRTLKUP_SOURCE$ac_delim
 NETSLOTLKUP_SOURCE!$NETSLOTLKUP_SOURCE$ac_delim
 NETDRVLKUP_SOURCE!$NETDRVLKUP_SOURCE$ac_delim
+NETSYSLKUP_SOURCE!$NETSYSLKUP_SOURCE$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 95; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 96; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -10474,7 +10517,7 @@
 
 cat >>$CONFIG_STATUS <<_ACEOF
 cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
 _ACEOF
 sed '
 s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
@@ -10487,8 +10530,6 @@
 ' >>$CONFIG_STATUS <conf$$subs.sed
 rm -f conf$$subs.sed
 cat >>$CONFIG_STATUS <<_ACEOF
-:end
-s/|#_!!_#|//g
 CEOF$ac_eof
 _ACEOF
 
@@ -10736,7 +10777,7 @@
 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
 s&@INSTALL@&$ac_INSTALL&;t t
 $ac_datarootdir_hack
-" $ac_file_inputs | sed -f "$tmp/subs-1.sed" >$tmp/out
+" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed 's/|#_!!_#|//g' >$tmp/out
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/configure.ac	2008-03-07 20:03:29 UTC (rev 247)
@@ -869,6 +869,38 @@
 
 AC_SUBST(NETDRVLKUP_SOURCE)
 
+# time to see about system lookup mechanisms
+
+AC_MSG_CHECKING([which system info lookup type to use])
+
+AC_ARG_ENABLE(syslookup,
+	[AS_HELP_STRING([--enable-syslookup],[include code to find the probable egress interface using specified mechanism])])
+
+NETSYSLKUP_SOURCE="$enable_syslookup"
+case "$enable_syslookup" in
+
+	'')
+# guess it automagically in a nice big case statement
+		case $target in
+		     *)
+			use_syslookup=false
+			NETSYSLKUP_SOURCE="none"
+			enable_syslookup="none. Consider teaching configure about your platform."
+			;;
+		esac
+		;;
+	none)
+		use_syslookup=false
+		;;
+	*)
+		AC_MSG_ERROR([--enable-syslookup takes none])
+		;;
+esac
+
+	AC_MSG_RESULT("$enable_syslookup")
+
+AC_SUBST(NETSYSLKUP_SOURCE)
+
 # now spit it all out
 AC_CONFIG_FILES([Makefile
                  src/netperf_version.h

Modified: trunk/doc/Makefile.in
===================================================================
--- trunk/doc/Makefile.in	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/doc/Makefile.in	2008-03-07 20:03:29 UTC (rev 247)
@@ -77,6 +77,7 @@
 NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@
 NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
 NETSLOTLKUP_SOURCE = @NETSLOTLKUP_SOURCE@
+NETSYSLKUP_SOURCE = @NETSYSLKUP_SOURCE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

Modified: trunk/doc/examples/Makefile.in
===================================================================
--- trunk/doc/examples/Makefile.in	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/doc/examples/Makefile.in	2008-03-07 20:03:29 UTC (rev 247)
@@ -73,6 +73,7 @@
 NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@
 NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
 NETSLOTLKUP_SOURCE = @NETSLOTLKUP_SOURCE@
+NETSYSLKUP_SOURCE = @NETSYSLKUP_SOURCE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/Makefile.am	2008-03-07 20:03:29 UTC (rev 247)
@@ -10,13 +10,14 @@
 USE_RT_SOURCE=netrt_ at NETRTLKUP_SOURCE@.c
 USE_DRV_SOURCE=netdrv_ at NETDRVLKUP_SOURCE@.c
 USE_SLOT_SOURCE=netslot_ at NETSLOTLKUP_SOURCE@.c
+USE_SYS_SOURCE=netsys_ at NETSYSLKUP_SOURCE@.c
 
-EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c
+EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c
 
 COMMON_SRC = hist.h netlib.c netlib.h netcpu.h netsh.c netsh.h nettest_bsd.c nettest_bsd.h nettest_dlpi.c nettest_dlpi.h nettest_unix.c nettest_unix.h nettest_xti.c nettest_xti.h nettest_sctp.c nettest_sctp.h netperf_version.h nettest_sdp.c nettest_sdp.h nettest_omni.c
 
-netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE)
-netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE)
+netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE)
+netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE)
 
 # if there are any "missing" routines, the libobjs should cover it
 if NEED_LIBCOMPAT

Modified: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/Makefile.in	2008-03-07 20:03:29 UTC (rev 247)
@@ -73,6 +73,7 @@
 NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@
 NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
 NETSLOTLKUP_SOURCE = @NETSLOTLKUP_SOURCE@
+NETSYSLKUP_SOURCE = @NETSYSLKUP_SOURCE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -142,13 +143,14 @@
 USE_RT_SOURCE = netrt_ at NETRTLKUP_SOURCE@.c
 USE_DRV_SOURCE = netdrv_ at NETDRVLKUP_SOURCE@.c
 USE_SLOT_SOURCE = netslot_ at NETSLOTLKUP_SOURCE@.c
+USE_SYS_SOURCE = netsys_ at NETSYSLKUP_SOURCE@.c
 
-EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c
+EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c
 
 COMMON_SRC = hist.h netlib.c netlib.h netcpu.h netsh.c netsh.h nettest_bsd.c nettest_bsd.h nettest_dlpi.c nettest_dlpi.h nettest_unix.c nettest_unix.h nettest_xti.c nettest_xti.h nettest_sctp.c nettest_sctp.h netperf_version.h nettest_sdp.c nettest_sdp.h nettest_omni.c
 
-netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE)
-netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE)
+netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE)
+netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE)
 
 # if there are any "missing" routines, the libobjs should cover it
 @NEED_LIBCOMPAT_TRUE at netperf_LDADD = missing/libcompat.a
@@ -169,15 +171,17 @@
 am__objects_3 = netrt_ at NETRTLKUP_SOURCE@.$(OBJEXT)
 am__objects_4 = netdrv_ at NETDRVLKUP_SOURCE@.$(OBJEXT)
 am__objects_5 = netslot_ at NETSLOTLKUP_SOURCE@.$(OBJEXT)
+am__objects_6 = netsys_ at NETSYSLKUP_SOURCE@.$(OBJEXT)
 am_netperf_OBJECTS = netperf.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
-	$(am__objects_3) $(am__objects_4) $(am__objects_5)
+	$(am__objects_3) $(am__objects_4) $(am__objects_5) \
+	$(am__objects_6)
 netperf_OBJECTS = $(am_netperf_OBJECTS)
 @NEED_LIBCOMPAT_TRUE at netperf_DEPENDENCIES = missing/libcompat.a
 @NEED_LIBCOMPAT_FALSE at netperf_DEPENDENCIES =
 netperf_LDFLAGS =
 am_netserver_OBJECTS = netserver.$(OBJEXT) $(am__objects_1) \
 	$(am__objects_2) $(am__objects_3) $(am__objects_4) \
-	$(am__objects_5)
+	$(am__objects_5) $(am__objects_6)
 netserver_OBJECTS = $(am_netserver_OBJECTS)
 @NEED_LIBCOMPAT_TRUE at netserver_DEPENDENCIES = missing/libcompat.a
 @NEED_LIBCOMPAT_FALSE at netserver_DEPENDENCIES =
@@ -192,6 +196,7 @@
 @AMDEP_TRUE@	./$(DEPDIR)/netrt_ at NETRTLKUP_SOURCE@.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netserver.Po ./$(DEPDIR)/netsh.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/netslot_ at NETSLOTLKUP_SOURCE@.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/netsys_ at NETSYSLKUP_SOURCE@.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/nettest_bsd.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/nettest_dlpi.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/nettest_omni.Po \
@@ -270,6 +275,7 @@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netserver.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netsh.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netslot_ at NETSLOTLKUP_SOURCE@.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netsys_ at NETSYSLKUP_SOURCE@.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nettest_bsd.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nettest_dlpi.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nettest_omni.Po at am__quote@

Modified: trunk/src/missing/Makefile.in
===================================================================
--- trunk/src/missing/Makefile.in	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/missing/Makefile.in	2008-03-07 20:03:29 UTC (rev 247)
@@ -73,6 +73,7 @@
 NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@
 NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
 NETSLOTLKUP_SOURCE = @NETSLOTLKUP_SOURCE@
+NETSYSLKUP_SOURCE = @NETSYSLKUP_SOURCE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

Modified: trunk/src/missing/m4/Makefile.in
===================================================================
--- trunk/src/missing/m4/Makefile.in	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/missing/m4/Makefile.in	2008-03-07 20:03:29 UTC (rev 247)
@@ -73,6 +73,7 @@
 NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@
 NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
 NETSLOTLKUP_SOURCE = @NETSLOTLKUP_SOURCE@
+NETSYSLKUP_SOURCE = @NETSYSLKUP_SOURCE@
 OBJEXT = @OBJEXT@
 PACKAGE = @PACKAGE@
 PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@

Modified: trunk/src/netlib.h
===================================================================
--- trunk/src/netlib.h	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/netlib.h	2008-03-07 20:03:29 UTC (rev 247)
@@ -538,6 +538,7 @@
 extern char     *find_interface_slot(char *interface_name);
 extern void     find_interface_ids(char *interface_name, int *vendor, int *device, int *sub_vend, int *sub_dev);
 extern void     find_driver_info(char *ifname, char *driver, char *version, char *firmware, char *bus, int len);
+extern void     find_system_info(char **system_model, char **cpu_model, int *cpu_frequency);
 
 #ifndef WIN32
 

Modified: trunk/src/nettest_bsd.h
===================================================================
--- trunk/src/nettest_bsd.h	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/nettest_bsd.h	2008-03-07 20:03:29 UTC (rev 247)
@@ -96,7 +96,7 @@
   /* these are here because they can be checked before actual data
      connections are made, and the omni_results_struct is already
      full */
-  uint32_t   cpu_frequency;
+  uint32_t   cpu_frequency;  /* this should be megahertz */
   char       system_model[32];
   char       cpu_model[64];  /* seems like an awful lot doesn't it */
   /* 84 bytes left */

Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c	2008-03-07 00:43:42 UTC (rev 246)
+++ trunk/src/nettest_omni.c	2008-03-07 20:03:29 UTC (rev 247)
@@ -407,6 +407,12 @@
 int         local_interface_device;
 int         local_interface_subvendor;
 int         local_interface_subdevice;
+char        *local_system_model;
+char        *local_cpu_model;
+int         local_cpu_frequency;
+char        *remote_system_model;
+char        *remote_cpu_model;
+int         remote_cpu_frequency;
 
 int printing_initialized = 0;
 
@@ -503,10 +509,14 @@
   LOCAL_CPU_COUNT,
   LOCAL_CPU_PEAK_UTIL,
   LOCAL_CPU_PEAK_ID,
+  LOCAL_CPU_MODEL,
+  LOCAL_CPU_FREQUENCY,
   REMOTE_CPU_BIND,
   REMOTE_CPU_COUNT,
   REMOTE_CPU_PEAK_UTIL,
   REMOTE_CPU_PEAK_ID,
+  REMOTE_CPU_MODEL,
+  REMOTE_CPU_FREQUENCY,
   SOURCE_PORT,
   SOURCE_ADDR,
   SOURCE_FAMILY,
@@ -550,10 +560,12 @@
   REMOTE_NODELAY,
   REMOTE_CORK,
   LOCAL_SYSNAME,
+  LOCAL_SYSTEM_MODEL,
   LOCAL_RELEASE,
   LOCAL_VERSION,
   LOCAL_MACHINE,
   REMOTE_SYSNAME,
+  REMOTE_SYSTEM_MODEL,
   REMOTE_RELEASE,
   REMOTE_VERSION,
   REMOTE_MACHINE,
@@ -984,6 +996,18 @@
     return "LOCAL_VERSION";
   case LOCAL_RELEASE:
     return "LOCAL_RELEASE";
+  case REMOTE_CPU_MODEL:
+    return "REMOTE_CPU_MODEL";
+  case REMOTE_CPU_FREQUENCY:
+    return "REMOTE_CPU_FREQUENCY";
+  case REMOTE_SYSTEM_MODEL:
+    return "REMOTE_SYSTEM_MODEL";
+  case LOCAL_CPU_MODEL:
+    return "LOCAL_CPU_MODEL";
+  case LOCAL_CPU_FREQUENCY:
+    return "LOCAL_CPU_FREQUENCY";
+  case LOCAL_SYSTEM_MODEL:
+    return "LOCAL_SYSTEM_MODEL";
   case OUTPUT_END:
     return "OUTPUT_END";
   default:
@@ -2809,6 +2833,78 @@
   netperf_output_source[LOCAL_INTERVAL_BURST].tot_line_len = 
     NETPERF_LINE_TOT(LOCAL_INTERVAL_BURST);
 
+  netperf_output_source[REMOTE_SYSTEM_MODEL].output_name = REMOTE_SYSTEM_MODEL;
+  netperf_output_source[REMOTE_SYSTEM_MODEL].line[0] = "Remote";
+  netperf_output_source[REMOTE_SYSTEM_MODEL].line[1] = "System";
+  netperf_output_source[REMOTE_SYSTEM_MODEL].line[2] = "Model";
+  netperf_output_source[REMOTE_SYSTEM_MODEL].line[3] = "";
+  netperf_output_source[REMOTE_SYSTEM_MODEL].format = "%s";
+  netperf_output_source[REMOTE_SYSTEM_MODEL].display_value = remote_system_model;
+  netperf_output_source[REMOTE_SYSTEM_MODEL].max_line_len = 
+    NETPERF_LINE_MAX(REMOTE_SYSTEM_MODEL);
+  netperf_output_source[REMOTE_SYSTEM_MODEL].tot_line_len = 
+    NETPERF_LINE_TOT(REMOTE_SYSTEM_MODEL);
+
+  netperf_output_source[REMOTE_CPU_MODEL].output_name = REMOTE_CPU_MODEL;
+  netperf_output_source[REMOTE_CPU_MODEL].line[0] = "Remote";
+  netperf_output_source[REMOTE_CPU_MODEL].line[1] = "CPU";
+  netperf_output_source[REMOTE_CPU_MODEL].line[2] = "Model";
+  netperf_output_source[REMOTE_CPU_MODEL].line[3] = "";
+  netperf_output_source[REMOTE_CPU_MODEL].format = "%s";
+  netperf_output_source[REMOTE_CPU_MODEL].display_value = remote_cpu_model;
+  netperf_output_source[REMOTE_CPU_MODEL].max_line_len = 
+    NETPERF_LINE_MAX(REMOTE_CPU_MODEL);
+  netperf_output_source[REMOTE_CPU_MODEL].tot_line_len = 
+    NETPERF_LINE_TOT(REMOTE_CPU_MODEL);
+
+  netperf_output_source[REMOTE_CPU_FREQUENCY].output_name = REMOTE_CPU_FREQUENCY;
+  netperf_output_source[REMOTE_CPU_FREQUENCY].line[0] = "Remote";
+  netperf_output_source[REMOTE_CPU_FREQUENCY].line[1] = "CPU";
+  netperf_output_source[REMOTE_CPU_FREQUENCY].line[2] = "Frequency";
+  netperf_output_source[REMOTE_CPU_FREQUENCY].line[3] = "MHz";
+  netperf_output_source[REMOTE_CPU_FREQUENCY].format = "%d";
+  netperf_output_source[REMOTE_CPU_FREQUENCY].display_value = &remote_cpu_frequency;
+  netperf_output_source[REMOTE_CPU_FREQUENCY].max_line_len = 
+    NETPERF_LINE_MAX(REMOTE_CPU_FREQUENCY);
+  netperf_output_source[REMOTE_CPU_FREQUENCY].tot_line_len = 
+    NETPERF_LINE_TOT(REMOTE_CPU_FREQUENCY);
+
+  netperf_output_source[LOCAL_SYSTEM_MODEL].output_name = LOCAL_SYSTEM_MODEL;
+  netperf_output_source[LOCAL_SYSTEM_MODEL].line[0] = "Local";
+  netperf_output_source[LOCAL_SYSTEM_MODEL].line[1] = "System";
+  netperf_output_source[LOCAL_SYSTEM_MODEL].line[2] = "Model";
+  netperf_output_source[LOCAL_SYSTEM_MODEL].line[3] = "";
+  netperf_output_source[LOCAL_SYSTEM_MODEL].format = "%s";
+  netperf_output_source[LOCAL_SYSTEM_MODEL].display_value = local_system_model;
+  netperf_output_source[LOCAL_SYSTEM_MODEL].max_line_len = 
+    NETPERF_LINE_MAX(LOCAL_SYSTEM_MODEL);
+  netperf_output_source[LOCAL_SYSTEM_MODEL].tot_line_len = 
+    NETPERF_LINE_TOT(LOCAL_SYSTEM_MODEL);
+
+  netperf_output_source[LOCAL_CPU_MODEL].output_name = LOCAL_CPU_MODEL;
+  netperf_output_source[LOCAL_CPU_MODEL].line[0] = "Local";
+  netperf_output_source[LOCAL_CPU_MODEL].line[1] = "CPU";
+  netperf_output_source[LOCAL_CPU_MODEL].line[2] = "Model";
+  netperf_output_source[LOCAL_CPU_MODEL].line[3] = "";
+  netperf_output_source[LOCAL_CPU_MODEL].format = "%s";
+  netperf_output_source[LOCAL_CPU_MODEL].display_value = local_cpu_model;
+  netperf_output_source[LOCAL_CPU_MODEL].max_line_len = 
+    NETPERF_LINE_MAX(LOCAL_CPU_MODEL);
+  netperf_output_source[LOCAL_CPU_MODEL].tot_line_len = 
+    NETPERF_LINE_TOT(LOCAL_CPU_MODEL);
+
+  netperf_output_source[LOCAL_CPU_FREQUENCY].output_name = LOCAL_CPU_FREQUENCY;
+  netperf_output_source[LOCAL_CPU_FREQUENCY].line[0] = "Local";
+  netperf_output_source[LOCAL_CPU_FREQUENCY].line[1] = "CPU";
+  netperf_output_source[LOCAL_CPU_FREQUENCY].line[2] = "Frequency";
+  netperf_output_source[LOCAL_CPU_FREQUENCY].line[3] = "MHz";
+  netperf_output_source[LOCAL_CPU_FREQUENCY].format = "%d";
+  netperf_output_source[LOCAL_CPU_FREQUENCY].display_value = &local_cpu_frequency;
+  netperf_output_source[LOCAL_CPU_FREQUENCY].max_line_len = 
+    NETPERF_LINE_MAX(LOCAL_CPU_FREQUENCY);
+  netperf_output_source[LOCAL_CPU_FREQUENCY].tot_line_len = 
+    NETPERF_LINE_TOT(LOCAL_CPU_FREQUENCY);
+
   netperf_output_source[OUTPUT_END].output_name = OUTPUT_END;
   netperf_output_source[OUTPUT_END].line[0] = "This";
   netperf_output_source[OUTPUT_END].line[1] = "Is";
@@ -3835,7 +3931,7 @@
 	 so, we can shove them back into the relevant variables here
 	 and be on our way. */
 
-      recv_response();
+      recv_response_n(17); /* brittle, but functional */
   
       if (!netperf_response.content.serv_errno) {
 	rsr_size	 = omni_response->recv_buf_size;
@@ -3858,6 +3954,16 @@
 	  fprintf(where,"remote port is %u\n",get_port_number(remote_res));
 	  fflush(where);
 	}
+	/* just in case the remote didn't null terminate */
+	if (NULL == remote_system_model) {
+	  omni_response->system_model[sizeof(omni_response->system_model)-1] = 0;
+	  remote_system_model = strdup(omni_response->system_model);
+	}
+	if (NULL == remote_cpu_model) {
+	  omni_response->cpu_model[sizeof(omni_response->cpu_model) -1 ] = 0;
+	  remote_cpu_model = strdup(omni_response->cpu_model);
+	}
+	remote_cpu_frequency = omni_response->cpu_frequency;
       }
       else {
 	Set_errno(netperf_response.content.serv_errno);
@@ -3870,6 +3976,13 @@
       }
     
     }
+    else {
+      if (NULL == remote_system_model) 
+	remote_system_model = strdup("Unknown System Model");
+      if (NULL == remote_cpu_model)
+	remote_cpu_model = strdup("Unknown CPU Model");
+      remote_cpu_frequency = -1;
+    }
 
 #ifdef WANT_DEMO
     /* at some point we will have to be more clever about this, but
@@ -4325,6 +4438,10 @@
        will also store-away the necessaries for cpu utilization */
 
     cpu_stop(local_cpu_usage,&elapsed_time);
+    
+    find_system_info(&local_system_model,
+		     &local_cpu_model,
+		     &local_cpu_frequency);
 
     local_interface_name = 
       find_egress_interface(local_res->ai_addr,remote_res->ai_addr);
@@ -4890,8 +5007,15 @@
   omni_response->interval_usecs = interval_usecs;
   omni_response->interval_burst = interval_burst;
 
-  send_response();
+  find_system_info(&local_system_model,&local_cpu_model,&local_cpu_frequency);
+  strncpy(omni_response->system_model,local_system_model,sizeof(omni_response->system_model));
+  omni_response->system_model[sizeof(omni_response->system_model)-1] = 0;
+  strncpy(omni_response->cpu_model,local_cpu_model,sizeof(omni_response->cpu_model));
+  omni_response->cpu_model[sizeof(omni_response->cpu_model)-1] = 0;
+  omni_response->cpu_frequency = local_cpu_frequency;
 
+  send_response_n(17); /* brittle, but functional */
+
   local_send_calls = 0;
   local_receive_calls = 0;
 



More information about the netperf-dev mailing list