[netperf-dev] netperf2 commit notice r224 - in trunk: . doc doc/examples src src/missing src/missing/m4
raj at netperf.org
raj at netperf.org
Mon Feb 11 18:29:26 PST 2008
Author: raj
Date: 2008-02-11 18:29:25 -0800 (Mon, 11 Feb 2008)
New Revision: 224
Modified:
trunk/Makefile.in
trunk/config.h.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:
teach netperf how to retrieve interface names
Modified: trunk/Makefile.in
===================================================================
--- trunk/Makefile.in 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/Makefile.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -70,6 +70,7 @@
NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@
NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@
NETCPU_SOURCE = @NETCPU_SOURCE@
+NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Modified: trunk/config.h.in
===================================================================
--- trunk/config.h.in 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/config.h.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -286,6 +286,12 @@
/* Use HP-UX's pstat interface to measure CPU util. */
#undef USE_PSTAT
+/* Use routing socket interface to determine egress interface. */
+#undef USE_RTMGET
+
+/* Use Linux's rtnetlink interface to determine egress interface. */
+#undef USE_RTNETLINK
+
/* Use FreeBSD's sysctl interface to measure CPU util. */
#undef USE_SYSCTL
Modified: trunk/configure
===================================================================
--- trunk/configure 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/configure 2008-02-12 02:29:25 UTC (rev 224)
@@ -705,6 +705,7 @@
NEED_LIBCOMPAT_TRUE
NEED_LIBCOMPAT_FALSE
NETCPU_SOURCE
+NETRTLKUP_SOURCE
LTLIBOBJS'
ac_subst_files=''
ac_precious_vars='build_alias
@@ -1319,6 +1320,8 @@
may affect result
--enable-cpuutil include code to measure CPU utilization using
specified mechanism
+ --enable-rtlookup include code to find the probable egress interface
+ using specified mechanism
Some influential environment variables:
CC C compiler command
@@ -9472,7 +9475,7 @@
*)
{ { echo "$as_me:$LINENO: error: --enable-cpuutil takes kstat" >&5
echo "$as_me: error: --enable-cpuutil takes kstat" >&2;}
- { (exit pstat); exit pstat; }; }
+ { (exit kstat10); exit kstat10; }; }
;;
esac
@@ -9481,6 +9484,103 @@
+# time to see about route lookup utilization measurements
+
+{ echo "$as_me:$LINENO: checking which route lookup type to use" >&5
+echo $ECHO_N "checking which route lookup type to use... $ECHO_C" >&6; }
+
+# Check whether --enable-rtlookup was given.
+if test "${enable_rtlookup+set}" = set; then
+ enableval=$enable_rtlookup;
+fi
+
+
+NETRTLKUP_SOURCE="$enable_rtlookup"
+case "$enable_rtlookup" in
+ rtmget)
+ use_rtlookup=true
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_RTMGET
+_ACEOF
+
+ ;;
+
+ rtnetlink)
+ use_rtlookup=true
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_RTNETLINK
+_ACEOF
+
+ ;;
+ '')
+# ia64-hp-hpux11.23
+# i386-pc-solaris2.10
+# guess it automagically in a nice big case statement
+ case $target in
+ *-*-linux*)
+ use_rtlookup=true
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_RTNETLINK
+_ACEOF
+
+ enable_rtlookup="rtnetlink - auto"
+ NETRTLKUP_SOURCE="rtnetlink"
+ ;;
+ *-*-hpux11.31)
+ use_rtlookup=true
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_RTMGET
+_ACEOF
+
+ enable_rtlookup="rtmget - auto"
+ NETRTLKUP_SOURCE="rtmget"
+ ;;
+ *-*-freebsd4.* | *-*-freebsd5.* | *-*-freebsd6.* | *-*-freebsd7.* )
+ use_rtlookup=true
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_RTMGET
+_ACEOF
+
+ enable_rtlookup="rtmget - auto"
+ NETRTLKUP_SOURCE="rtmget"
+ ;;
+ *-*-darwin*)
+ use_rtlookup=true
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_RTMGET
+_ACEOF
+
+ enable_rtlookup="rtmget - auto"
+ NETRTLKUP_SOURCE="rtmget"
+ ;;
+ *)
+ use_rtlookup=false
+ NETRTLKUP_SOURCE="none"
+ enable_rtlookup="none. Consider teaching configure about your platform."
+ ;;
+ esac
+ ;;
+ none)
+ use_rtlookup=false
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: --enable-rtlookup takes rtmget" >&5
+echo "$as_me: error: --enable-rtlookup takes rtmget" >&2;}
+ { (exit rtnetlink or none]); exit rtnetlink or none]; }; }
+ ;;
+esac
+
+ { echo "$as_me:$LINENO: result: \"$enable_rtlookup\"" >&5
+echo "${ECHO_T}\"$enable_rtlookup\"" >&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"
@@ -10231,10 +10331,11 @@
NEED_LIBCOMPAT_TRUE!$NEED_LIBCOMPAT_TRUE$ac_delim
NEED_LIBCOMPAT_FALSE!$NEED_LIBCOMPAT_FALSE$ac_delim
NETCPU_SOURCE!$NETCPU_SOURCE$ac_delim
+NETRTLKUP_SOURCE!$NETRTLKUP_SOURCE$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 93; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/configure.ac 2008-02-12 02:29:25 UTC (rev 224)
@@ -713,7 +713,7 @@
use_cpuutil=false
;;
*)
- AC_MSG_ERROR(--enable-cpuutil takes kstat, pstat, looper, procstat or none])
+ AC_MSG_ERROR(--enable-cpuutil takes kstat, kstat10, looper, osx, perfstat, procstat, pstat, pstatnew, sysctl or none])
;;
esac
@@ -721,6 +721,72 @@
AC_SUBST(NETCPU_SOURCE)
+# time to see about route lookup utilization measurements
+
+AC_MSG_CHECKING([which route lookup type to use])
+
+AC_ARG_ENABLE(rtlookup,
+ [AS_HELP_STRING([--enable-rtlookup],[include code to find the probable egress interface using specified mechanism])])
+
+NETRTLKUP_SOURCE="$enable_rtlookup"
+case "$enable_rtlookup" in
+ rtmget)
+ use_rtlookup=true
+ AC_DEFINE([USE_RTMGET],,[Use RTM_GET on a routing socket to get egress interface.])
+ ;;
+
+ rtnetlink)
+ use_rtlookup=true
+ AC_DEFINE([USE_RTNETLINK],,[Use Linux's rtnetlink interface to dettermine egress interface.])
+ ;;
+ '')
+# ia64-hp-hpux11.23
+# i386-pc-solaris2.10
+# guess it automagically in a nice big case statement
+ case $target in
+ *-*-linux*)
+ use_rtlookup=true
+ AC_DEFINE([USE_RTNETLINK],,[Use Linux's rtnetlink interface to determine egress interface.])
+ enable_rtlookup="rtnetlink - auto"
+ NETRTLKUP_SOURCE="rtnetlink"
+ ;;
+ *-*-hpux11.31)
+ use_rtlookup=true
+ AC_DEFINE([USE_RTMGET],,[Use routing sockets to determine egress interface.])
+ enable_rtlookup="rtmget - auto"
+ NETRTLKUP_SOURCE="rtmget"
+ ;;
+ *-*-freebsd4.* | *-*-freebsd5.* | *-*-freebsd6.* | *-*-freebsd7.* )
+ use_rtlookup=true
+ AC_DEFINE([USE_RTMGET],,[Use routing socket interface to determine egress interface.])
+ enable_rtlookup="rtmget - auto"
+ NETRTLKUP_SOURCE="rtmget"
+ ;;
+ *-*-darwin*)
+ use_rtlookup=true
+ AC_DEFINE([USE_RTMGET],,[Use routing socket interface to determine egress interface.])
+ enable_rtlookup="rtmget - auto"
+ NETRTLKUP_SOURCE="rtmget"
+ ;;
+ *)
+ use_rtlookup=false
+ NETRTLKUP_SOURCE="none"
+ enable_rtlookup="none. Consider teaching configure about your platform."
+ ;;
+ esac
+ ;;
+ none)
+ use_rtlookup=false
+ ;;
+ *)
+ AC_MSG_ERROR(--enable-rtlookup takes rtmget, rtnetlink or none])
+ ;;
+esac
+
+ AC_MSG_RESULT("$enable_rtlookup")
+
+AC_SUBST(NETRTLKUP_SOURCE)
+
# now spit it all out
AC_CONFIG_FILES([Makefile
src/netperf_version.h
Modified: trunk/doc/Makefile.in
===================================================================
--- trunk/doc/Makefile.in 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/doc/Makefile.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -74,6 +74,7 @@
NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@
NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@
NETCPU_SOURCE = @NETCPU_SOURCE@
+NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Modified: trunk/doc/examples/Makefile.in
===================================================================
--- trunk/doc/examples/Makefile.in 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/doc/examples/Makefile.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -70,6 +70,7 @@
NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@
NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@
NETCPU_SOURCE = @NETCPU_SOURCE@
+NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/Makefile.am 2008-02-12 02:29:25 UTC (rev 224)
@@ -7,13 +7,14 @@
AM_CFLAGS = $(NETPERF_CFLAGS)
USE_CPU_SOURCE=netcpu_ at NETCPU_SOURCE@.c
+USE_RT_SOURCE=netrt_ at NETRTLKUP_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
+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
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)
-netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE)
+netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE)
+netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_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-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/Makefile.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -70,6 +70,7 @@
NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@
NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@
NETCPU_SOURCE = @NETCPU_SOURCE@
+NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
@@ -136,13 +137,14 @@
AM_CFLAGS = $(NETPERF_CFLAGS)
USE_CPU_SOURCE = netcpu_ at NETCPU_SOURCE@.c
+USE_RT_SOURCE = netrt_ at NETRTLKUP_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
+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
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)
-netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE)
+netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE)
+netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE)
# if there are any "missing" routines, the libobjs should cover it
@NEED_LIBCOMPAT_TRUE at netperf_LDADD = missing/libcompat.a
@@ -160,13 +162,15 @@
nettest_xti.$(OBJEXT) nettest_sctp.$(OBJEXT) \
nettest_sdp.$(OBJEXT) nettest_omni.$(OBJEXT)
am__objects_2 = netcpu_ at NETCPU_SOURCE@.$(OBJEXT)
-am_netperf_OBJECTS = netperf.$(OBJEXT) $(am__objects_1) $(am__objects_2)
+am__objects_3 = netrt_ at NETRTLKUP_SOURCE@.$(OBJEXT)
+am_netperf_OBJECTS = netperf.$(OBJEXT) $(am__objects_1) $(am__objects_2) \
+ $(am__objects_3)
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_2) $(am__objects_3)
netserver_OBJECTS = $(am_netserver_OBJECTS)
@NEED_LIBCOMPAT_TRUE at netserver_DEPENDENCIES = missing/libcompat.a
@NEED_LIBCOMPAT_FALSE at netserver_DEPENDENCIES =
@@ -177,6 +181,7 @@
am__depfiles_maybe = depfiles
@AMDEP_TRUE at DEP_FILES = ./$(DEPDIR)/netcpu_ at NETCPU_SOURCE@.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/netlib.Po ./$(DEPDIR)/netperf.Po \
+ at AMDEP_TRUE@ ./$(DEPDIR)/netrt_ at NETRTLKUP_SOURCE@.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/netserver.Po ./$(DEPDIR)/netsh.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/nettest_bsd.Po \
@AMDEP_TRUE@ ./$(DEPDIR)/nettest_dlpi.Po \
@@ -251,6 +256,7 @@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netcpu_ at NETCPU_SOURCE@.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netlib.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netperf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/netrt_ at NETRTLKUP_SOURCE@.Po at am__quote@
@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)/nettest_bsd.Po at am__quote@
Modified: trunk/src/missing/Makefile.in
===================================================================
--- trunk/src/missing/Makefile.in 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/missing/Makefile.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -70,6 +70,7 @@
NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@
NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@
NETCPU_SOURCE = @NETCPU_SOURCE@
+NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Modified: trunk/src/missing/m4/Makefile.in
===================================================================
--- trunk/src/missing/m4/Makefile.in 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/missing/m4/Makefile.in 2008-02-12 02:29:25 UTC (rev 224)
@@ -70,6 +70,7 @@
NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@
NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@
NETCPU_SOURCE = @NETCPU_SOURCE@
+NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
Modified: trunk/src/netlib.h
===================================================================
--- trunk/src/netlib.h 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/netlib.h 2008-02-12 02:29:25 UTC (rev 224)
@@ -534,6 +534,7 @@
extern float calibrate_remote_cpu();
extern void bind_to_specific_processor(int processor_affinity,int use_cpu_map);
extern int set_nonblock (SOCKET sock);
+extern char *find_egress_interface(struct sockaddr *source, struct sockaddr *dest);
#ifndef WIN32
Modified: trunk/src/nettest_bsd.h
===================================================================
--- trunk/src/nettest_bsd.h 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/nettest_bsd.h 2008-02-12 02:29:25 UTC (rev 224)
@@ -110,6 +110,7 @@
int32_t peak_cpu_id; /* ID of the most utilized CPU */
float peak_cpu_util; /* its individual utilization */
+ char ifname[16]; /* the probable egress interface */
};
#endif /* WANT_OMNI */
Modified: trunk/src/nettest_omni.c
===================================================================
--- trunk/src/nettest_omni.c 2008-02-09 01:03:09 UTC (rev 223)
+++ trunk/src/nettest_omni.c 2008-02-12 02:29:25 UTC (rev 224)
@@ -4,7 +4,7 @@
#ifdef WANT_OMNI
char nettest_omni_id[]="\
-@(#)nettest_dlpi.c (c) Copyright 2008 Hewlett-Packard Co. Version 2.5.0pre";
+@(#)nettest_omni.c (c) Copyright 2008 Hewlett-Packard Co. Version 2.5.0pre";
#include <stdio.h>
#if HAVE_SYS_TYPES_H
@@ -294,7 +294,9 @@
double remote_service_demand_double;
double transaction_rate = 1.0;
double rtt_latency = -1.0;
-int32_t transport_mss = -1;
+int32_t transport_mss = -1;
+char *local_interface_name=NULL;
+char *remote_interface_name=NULL;
int printing_initialized = 0;
@@ -444,6 +446,8 @@
REMOTE_RELEASE,
REMOTE_VERSION,
REMOTE_MACHINE,
+ LOCAL_INTERFACE_NAME,
+ REMOTE_INTERFACE_NAME,
OUTPUT_END,
NETPERF_OUTPUT_MAX
};
@@ -781,6 +785,10 @@
return "REMOTE_NODELAY";
case REMOTE_CORK:
return "REMOTE_CORK";
+ case LOCAL_INTERFACE_NAME:
+ return "LOCAL_INTERFACE_NAME";
+ case REMOTE_INTERFACE_NAME:
+ return "REMOTE_INTERFACE_NAME";
case REMOTE_SYSNAME:
return "REMOTE_SYSNAME";
case REMOTE_MACHINE:
@@ -1142,6 +1150,8 @@
output_csv_list[i++] = REMOTE_RELEASE;
output_csv_list[i++] = REMOTE_VERSION;
output_csv_list[i++] = REMOTE_MACHINE;
+ output_csv_list[i++] = LOCAL_INTERFACE_NAME;
+ output_csv_list[i++] = REMOTE_INTERFACE_NAME;
output_csv_list[i++] = RESULT_BRAND;
output_csv_list[i++] = COMMAND_LINE;
@@ -2314,6 +2324,30 @@
netperf_output_source[REMOTE_CORK].tot_line_len =
NETPERF_LINE_TOT(REMOTE_CORK);
+ netperf_output_source[LOCAL_INTERFACE_NAME].output_name = LOCAL_INTERFACE_NAME;
+ netperf_output_source[LOCAL_INTERFACE_NAME].line[0] = "Local";
+ netperf_output_source[LOCAL_INTERFACE_NAME].line[1] = "Interface";
+ netperf_output_source[LOCAL_INTERFACE_NAME].line[2] = "NAME";
+ netperf_output_source[LOCAL_INTERFACE_NAME].line[3] = "";
+ netperf_output_source[LOCAL_INTERFACE_NAME].format = "%s";
+ netperf_output_source[LOCAL_INTERFACE_NAME].display_value = local_interface_name;
+ netperf_output_source[LOCAL_INTERFACE_NAME].max_line_len =
+ NETPERF_LINE_MAX(LOCAL_INTERFACE_NAME);
+ netperf_output_source[LOCAL_INTERFACE_NAME].tot_line_len =
+ NETPERF_LINE_TOT(LOCAL_INTERFACE_NAME);
+
+ netperf_output_source[REMOTE_INTERFACE_NAME].output_name = REMOTE_INTERFACE_NAME;
+ netperf_output_source[REMOTE_INTERFACE_NAME].line[0] = "Remote";
+ netperf_output_source[REMOTE_INTERFACE_NAME].line[1] = "Interface";
+ netperf_output_source[REMOTE_INTERFACE_NAME].line[2] = "NAME";
+ netperf_output_source[REMOTE_INTERFACE_NAME].line[3] = "";
+ netperf_output_source[REMOTE_INTERFACE_NAME].format = "%s";
+ netperf_output_source[REMOTE_INTERFACE_NAME].display_value = remote_interface_name;
+ netperf_output_source[REMOTE_INTERFACE_NAME].max_line_len =
+ NETPERF_LINE_MAX(REMOTE_INTERFACE_NAME);
+ netperf_output_source[REMOTE_INTERFACE_NAME].tot_line_len =
+ NETPERF_LINE_TOT(REMOTE_INTERFACE_NAME);
+
netperf_output_source[REMOTE_MACHINE].output_name = REMOTE_MACHINE;
netperf_output_source[REMOTE_MACHINE].line[0] = "Remote";
netperf_output_source[REMOTE_MACHINE].line[1] = "Machine";
@@ -3855,6 +3889,10 @@
lsr_size_end = lsr_size;
lss_size_end = lss_size;
}
+
+ local_interface_name =
+ find_egress_interface(local_res->ai_addr,remote_res->ai_addr);
+
/* this call will always give us the elapsed time for the test, and
will also store-away the necessaries for cpu utilization */
@@ -3883,7 +3921,7 @@
calculated service demand and all those interesting things. If
it wasn't supposed to care, it will return obvious values. */
- recv_response();
+ recv_response_n(17);
if (!netperf_response.content.serv_errno) {
if (debug)
fprintf(where,"remote results obtained\n");
@@ -3915,6 +3953,8 @@
(double) omni_result->send_calls;
else
remote_bytes_per_send = 0.0;
+ omni_result->ifname[15] = 0; /* belt and suspenders */
+ remote_interface_name = strdup(omni_result->ifname);
}
else {
Set_errno(netperf_response.content.serv_errno);
@@ -4391,7 +4431,8 @@
local_receive_calls = 0;
addrlen = sizeof(peeraddr_in);
-
+ memset(&peeraddr_in,0,sizeof(peeraddr_in));
+
/* Now it's time to start receiving data on the connection. We will */
/* first grab the apropriate counters and then start grabbing. */
@@ -4716,14 +4757,17 @@
}
omni_results->peak_cpu_util = (float)lib_local_peak_cpu_util;
omni_results->peak_cpu_id = lib_local_peak_cpu_id;
-
+ local_interface_name =
+ find_egress_interface(local_res->ai_addr,(struct sockaddr *)&peeraddr_in);
+ strncpy(omni_results->ifname,local_interface_name,16);
+ omni_results->ifname[15] = 0;
if (debug) {
fprintf(where,
"recv_omni: test complete, sending results.\n");
fflush(where);
}
- send_response();
+ send_response_n(17);
/* when we implement this, it will look a little strange, but we do
it to avoid certain overheads when running aggregates and using
More information about the netperf-dev
mailing list