[netperf-dev] netperf4 commit notice r58 - in trunk: . src
raj at netperf.org
raj at netperf.org
Thu Feb 16 15:27:09 PST 2006
Author: raj
Date: 2006-02-16 15:27:04 -0800 (Thu, 16 Feb 2006)
New Revision: 58
Modified:
trunk/configure
trunk/configure.ac
trunk/src/Makefile.am
trunk/src/Makefile.in
trunk/src/netserver.c
trunk/src/netsysstats_common.c
Log:
Netserver changes to enable running as a child of inetd without fouling
the control connection. Does not include changes to find the DTD when
running as a child of inetd.
Modified: trunk/configure
===================================================================
--- trunk/configure 2006-02-03 21:38:09 UTC (rev 57)
+++ trunk/configure 2006-02-16 23:27:04 UTC (rev 58)
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for netperf 4.0.0alpha2.
+# Generated by GNU Autoconf 2.59 for netperf 4.0.0rc1.
#
# Copyright (C) 2003 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
@@ -421,8 +421,8 @@
# Identity of this package.
PACKAGE_NAME='netperf'
PACKAGE_TARNAME='netperf'
-PACKAGE_VERSION='4.0.0alpha2'
-PACKAGE_STRING='netperf 4.0.0alpha2'
+PACKAGE_VERSION='4.0.0rc1'
+PACKAGE_STRING='netperf 4.0.0rc1'
PACKAGE_BUGREPORT=''
# Factoring default headers for most tests.
@@ -952,7 +952,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures netperf 4.0.0alpha2 to adapt to many kinds of systems.
+\`configure' configures netperf 4.0.0rc1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1019,7 +1019,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of netperf 4.0.0alpha2:";;
+ short | recursive ) echo "Configuration of netperf 4.0.0rc1:";;
esac
cat <<\_ACEOF
@@ -1167,7 +1167,7 @@
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-netperf configure 4.0.0alpha2
+netperf configure 4.0.0rc1
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1181,7 +1181,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by netperf $as_me 4.0.0alpha2, which was
+It was created by netperf $as_me 4.0.0rc1, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@@ -1876,7 +1876,7 @@
# Define the identity of the package.
PACKAGE=netperf
- VERSION=4.0.0alpha2
+ VERSION=4.0.0rc1
cat >>confdefs.h <<_ACEOF
@@ -25871,7 +25871,7 @@
} >&5
cat >&5 <<_CSEOF
-This file was extended by netperf $as_me 4.0.0alpha2, which was
+This file was extended by netperf $as_me 4.0.0rc1, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -25934,7 +25934,7 @@
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
-netperf config.status 4.0.0alpha2
+netperf config.status 4.0.0rc1
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2006-02-03 21:38:09 UTC (rev 57)
+++ trunk/configure.ac 2006-02-16 23:27:04 UTC (rev 58)
@@ -3,15 +3,15 @@
# Process this file with autoconf to produce a configure script.
FULL-PACKAGE-NAME=netperf
-VERSION=4.0.0alpha2
+VERSION=4.0.0rc1
BUG-REPORT-ADDRESS=netperf-feedback at netperf.org
AC_PREREQ(2.59)
-AC_INIT(netperf, 4.0.0alpha2)
+AC_INIT(netperf, 4.0.0rc1)
# use the target version rather than host - one day we may want cross-compile
AC_CANONICAL_TARGET
# AC_CONFIG_SRCDIR([src/hist.h])
-AM_INIT_AUTOMAKE(netperf, 4.0.0alpha2)
+AM_INIT_AUTOMAKE(netperf, 4.0.0rc1)
AM_CONFIG_HEADER(config.h)
# AC_CONFIG_HEADER(config.h)
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2006-02-03 21:38:09 UTC (rev 57)
+++ trunk/src/Makefile.am 2006-02-16 23:27:04 UTC (rev 58)
@@ -19,6 +19,8 @@
netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
+#netperf_DATA = netperf_docs.dtd
+
# in theory this will cause these header files to be put in the
# installed headers location, where folks who want to make their own
# test libraries can find them
Modified: trunk/src/Makefile.in
===================================================================
--- trunk/src/Makefile.in 2006-02-03 21:38:09 UTC (rev 57)
+++ trunk/src/Makefile.in 2006-02-16 23:27:04 UTC (rev 58)
@@ -158,6 +158,8 @@
netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_NETLIB_SOURCE)
+#netperf_DATA = netperf_docs.dtd
+
# in theory this will cause these header files to be put in the
# installed headers location, where folks who want to make their own
# test libraries can find them
Modified: trunk/src/netserver.c
===================================================================
--- trunk/src/netserver.c 2006-02-03 21:38:09 UTC (rev 57)
+++ trunk/src/netserver.c 2006-02-16 23:27:04 UTC (rev 58)
@@ -114,7 +114,7 @@
/* Option flags and variables */
char *oname = "stdout"; /* --output */
-FILE *ofile;
+FILE *ofile = NULL;
int want_quiet; /* --quiet, --silent */
int want_brief; /* --brief */
int want_verbose; /* --verbose */
@@ -177,7 +177,6 @@
decode_command_line (int argc, char **argv)
{
int c;
- ofile = stdout;
while ((c = getopt_long (argc, argv,
"d" /* debug */
@@ -231,7 +230,7 @@
exit(1);
}
break;
- case 'p': /* --output */
+ case 'p':
/* we want to open a listen socket at a */
/* specified port number */
listen_port = strdup(optarg);
@@ -958,10 +957,50 @@
program_name = argv[0];
- where = stderr;
+ /* if netserver is invoked with any of the -L, -p or -f options it
+ will necessary to setup the listen endpoint. similarly, if
+ standard in is not a socket, it will be necessary to setup the
+ listen endpoint. otherwise, we assume we sprang-forth from inetd
+ or the like and should start processing requests. */
+ if (getsockname(0, &name, &namelen) == -1) {
+ /* we may not be a child of inetd */
+ if (CHECK_FOR_NOT_SOCKET) {
+ need_setup = 1;
+ }
+ }
+
decode_command_line(argc, argv);
+ if (ofile) {
+ /* send our stuff to wherever the user told us to */
+ where = ofile;
+ }
+ else {
+ /* figure-out where to send it */
+ if (need_setup) {
+ /* for now, we can spit stuff to stderr since we are not a child
+ of inetd */
+ where = stderr;
+ }
+ else {
+ /* we are a child of inetd, best move where someplace other than
+ stderr. this needs to be made a bit more clean one of these days */
+ char debugfile[PATH_MAX];
+ sprintf(debugfile,
+ "%s%s_%d%s",
+ NETPERF_DEBUG_LOG_DIR,
+ NETPERF_DEBUG_LOG_PREFIX,
+ getpid(),
+ NETPERF_DEBUG_LOG_SUFFIX);
+ where = fopen(debugfile,"w");
+ if (NULL == where) {
+ /* we need to put a warning _somewhere_ but where? */
+ exit(-1);
+ }
+ }
+ }
+
/* do the work */
xmlInitParser();
xmlKeepBlanksDefault(0);
Modified: trunk/src/netsysstats_common.c
===================================================================
--- trunk/src/netsysstats_common.c 2006-02-03 21:38:09 UTC (rev 57)
+++ trunk/src/netsysstats_common.c 2006-02-16 23:27:04 UTC (rev 58)
@@ -109,7 +109,6 @@
dtime->tv_usec = curr->tv_usec - prev->tv_usec;
dtime->tv_sec = curr->tv_sec - prev->tv_sec;
- printf("in update_sys_stats test is %p\n",test);
NETPERF_DEBUG_ENTRY(test->debug,test->where);
if (test->debug) {
More information about the netperf-dev
mailing list