2008-03-12 Jon Dugan <jdugan@x1024.net>
* Added -Wall to CXXFLAGS and CFLAGS. This generated a lot of noise in the autotools generated files. * Added initial AUTHORS file. This is incomplete, but it's a start. 2008-03-12 Andrew Gallatin <gallatin@gmail.com> * Rework threading. This is done by having a condition variable for the reporting thread rather than using sched_yield and/or usleep. * Address performance issues on non Linux systems by avoiding system calls which are expensive on platforms other than Linux. * Fixes from FreeBSD ports: max_size_t is now 64 bits and not Iperf does not exit on ENOBUFS.
This commit is contained in:
parent
c230011976
commit
1efd8f8c50
28
AUTHORS
Normal file
28
AUTHORS
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Mark Gates
|
||||||
|
Alex Warshavsky
|
||||||
|
|
||||||
|
* original authors
|
||||||
|
|
||||||
|
Ajay Tirumala
|
||||||
|
|
||||||
|
* general improvements
|
||||||
|
|
||||||
|
Jim Ferguson <ferguson@ncsa.uiuc.edu>
|
||||||
|
|
||||||
|
* Project management
|
||||||
|
|
||||||
|
Jon Dugan <jdugan@x1024.net>
|
||||||
|
|
||||||
|
* Project maintainer and release coordinator
|
||||||
|
* various patches and autoconf fixes, general maintenance
|
||||||
|
|
||||||
|
Feng Qin
|
||||||
|
Kevin Gibbs
|
||||||
|
|
||||||
|
* windows porting work
|
||||||
|
|
||||||
|
John Estabrook <jestabro@ncsa.uiuc.edu>
|
||||||
|
|
||||||
|
Andrew Gallatin <gallatin@gmail.com>
|
||||||
|
* threading fix and non Linux performance improvements
|
||||||
|
|
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
|||||||
|
2008-03-12 Jon Dugan <jdugan@x1024.net>
|
||||||
|
|
||||||
|
* Added -Wall to CXXFLAGS and CFLAGS. This generated a lot of noise in the
|
||||||
|
autotools generated files.
|
||||||
|
|
||||||
|
* Added initial AUTHORS file. This is incomplete, but it's a start.
|
||||||
|
|
||||||
|
2008-03-12 Andrew Gallatin <gallatin@gmail.com>
|
||||||
|
|
||||||
|
* Rework threading. This is done by having a condition variable for the reporting
|
||||||
|
thread rather than using sched_yield and/or usleep.
|
||||||
|
|
||||||
|
* Address performance issues on non Linux systems by avoiding system calls
|
||||||
|
which are expensive on platforms other than Linux.
|
||||||
|
|
||||||
|
* Fixes from FreeBSD ports: max_size_t is now 64 bits and not Iperf does not
|
||||||
|
exit on ENOBUFS.
|
||||||
|
|
||||||
2007-10-01 JSE <jestabro@ncsa.uiuc.edu>
|
2007-10-01 JSE <jestabro@ncsa.uiuc.edu>
|
||||||
|
|
||||||
|
@ -5,3 +5,5 @@ AM_CPPFLAGS = @STRIP_BEGIN@ \
|
|||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
@STRIP_END@
|
@STRIP_END@
|
||||||
|
|
||||||
|
AM_CXXFLAGS = -Wall
|
||||||
|
AM_FLAGS = -Wall
|
||||||
|
18
Makefile.in
18
Makefile.in
@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
@ -37,8 +37,8 @@ build_triplet = @build@
|
|||||||
host_triplet = @host@
|
host_triplet = @host@
|
||||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||||
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
|
||||||
$(top_srcdir)/configure INSTALL config.guess config.sub \
|
$(top_srcdir)/configure AUTHORS ChangeLog INSTALL config.guess \
|
||||||
depcomp install-sh missing
|
config.sub depcomp install-sh missing
|
||||||
subdir = .
|
subdir = .
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
|
am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
|
||||||
@ -97,6 +97,7 @@ ECHO_N = @ECHO_N@
|
|||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
GREP = @GREP@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
@ -130,8 +131,6 @@ WEB100_CONFIG = @WEB100_CONFIG@
|
|||||||
WEB100_LIBS = @WEB100_LIBS@
|
WEB100_LIBS = @WEB100_LIBS@
|
||||||
ac_ct_CC = @ac_ct_CC@
|
ac_ct_CC = @ac_ct_CC@
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
|
||||||
ac_ct_STRIP = @ac_ct_STRIP@
|
|
||||||
acx_pthread_config = @acx_pthread_config@
|
acx_pthread_config = @acx_pthread_config@
|
||||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
@ -149,23 +148,30 @@ build_cpu = @build_cpu@
|
|||||||
build_os = @build_os@
|
build_os = @build_os@
|
||||||
build_vendor = @build_vendor@
|
build_vendor = @build_vendor@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_cpu = @host_cpu@
|
host_cpu = @host_cpu@
|
||||||
host_os = @host_os@
|
host_os = @host_os@
|
||||||
host_vendor = @host_vendor@
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
localstatedir = @localstatedir@
|
localstatedir = @localstatedir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
mkdir_p = @mkdir_p@
|
mkdir_p = @mkdir_p@
|
||||||
oldincludedir = @oldincludedir@
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
@ -176,6 +182,8 @@ AM_CPPFLAGS = @STRIP_BEGIN@ \
|
|||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
@STRIP_END@
|
@STRIP_END@
|
||||||
|
|
||||||
|
AM_CXXFLAGS = -Wall
|
||||||
|
AM_FLAGS = -Wall
|
||||||
all: config.h
|
all: config.h
|
||||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||||
|
|
||||||
|
4
aclocal.m4
vendored
4
aclocal.m4
vendored
@ -1,4 +1,4 @@
|
|||||||
# generated automatically by aclocal 1.9.5 -*- Autoconf -*-
|
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||||
|
|
||||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||||
# 2005 Free Software Foundation, Inc.
|
# 2005 Free Software Foundation, Inc.
|
||||||
@ -28,7 +28,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
|||||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||||
[AM_AUTOMAKE_VERSION([1.9.5])])
|
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||||
|
|
||||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||||
|
|
||||||
|
@ -5,6 +5,9 @@ AM_CPPFLAGS = @STRIP_BEGIN@ \
|
|||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
@STRIP_END@
|
@STRIP_END@
|
||||||
|
|
||||||
|
AM_CXXFLAGS = -Wall
|
||||||
|
AM_CFLAGS = -Wall
|
||||||
|
|
||||||
libcompat_a_SOURCES = \
|
libcompat_a_SOURCES = \
|
||||||
Thread.c \
|
Thread.c \
|
||||||
error.c \
|
error.c \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
SOURCES = $(libcompat_a_SOURCES)
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
@ -100,6 +98,7 @@ ECHO_N = @ECHO_N@
|
|||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
GREP = @GREP@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
@ -133,8 +132,6 @@ WEB100_CONFIG = @WEB100_CONFIG@
|
|||||||
WEB100_LIBS = @WEB100_LIBS@
|
WEB100_LIBS = @WEB100_LIBS@
|
||||||
ac_ct_CC = @ac_ct_CC@
|
ac_ct_CC = @ac_ct_CC@
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
|
||||||
ac_ct_STRIP = @ac_ct_STRIP@
|
|
||||||
acx_pthread_config = @acx_pthread_config@
|
acx_pthread_config = @acx_pthread_config@
|
||||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
@ -152,23 +149,30 @@ build_cpu = @build_cpu@
|
|||||||
build_os = @build_os@
|
build_os = @build_os@
|
||||||
build_vendor = @build_vendor@
|
build_vendor = @build_vendor@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_cpu = @host_cpu@
|
host_cpu = @host_cpu@
|
||||||
host_os = @host_os@
|
host_os = @host_os@
|
||||||
host_vendor = @host_vendor@
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
localstatedir = @localstatedir@
|
localstatedir = @localstatedir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
mkdir_p = @mkdir_p@
|
mkdir_p = @mkdir_p@
|
||||||
oldincludedir = @oldincludedir@
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
@ -179,6 +183,8 @@ AM_CPPFLAGS = @STRIP_BEGIN@ \
|
|||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
@STRIP_END@
|
@STRIP_END@
|
||||||
|
|
||||||
|
AM_CXXFLAGS = -Wall
|
||||||
|
AM_CFLAGS = -Wall
|
||||||
libcompat_a_SOURCES = \
|
libcompat_a_SOURCES = \
|
||||||
Thread.c \
|
Thread.c \
|
||||||
error.c \
|
error.c \
|
||||||
|
14
config.h.in
14
config.h.in
@ -213,22 +213,22 @@
|
|||||||
/* Define to the type of arg 5 for `select'. */
|
/* Define to the type of arg 5 for `select'. */
|
||||||
#undef SELECT_TYPE_ARG5
|
#undef SELECT_TYPE_ARG5
|
||||||
|
|
||||||
/* The size of a `bool', as computed by sizeof. */
|
/* The size of `bool', as computed by sizeof. */
|
||||||
#undef SIZEOF_BOOL
|
#undef SIZEOF_BOOL
|
||||||
|
|
||||||
/* The size of a `char', as computed by sizeof. */
|
/* The size of `char', as computed by sizeof. */
|
||||||
#undef SIZEOF_CHAR
|
#undef SIZEOF_CHAR
|
||||||
|
|
||||||
/* The size of a `int', as computed by sizeof. */
|
/* The size of `int', as computed by sizeof. */
|
||||||
#undef SIZEOF_INT
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
/* The size of a `long', as computed by sizeof. */
|
/* The size of `long', as computed by sizeof. */
|
||||||
#undef SIZEOF_LONG
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
/* The size of a `short', as computed by sizeof. */
|
/* The size of `short', as computed by sizeof. */
|
||||||
#undef SIZEOF_SHORT
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
/* The size of a `void*', as computed by sizeof. */
|
/* The size of `void*', as computed by sizeof. */
|
||||||
#undef SIZEOF_VOIDP
|
#undef SIZEOF_VOIDP
|
||||||
|
|
||||||
/* Define to 1 if you have the ANSI C header files. */
|
/* Define to 1 if you have the ANSI C header files. */
|
||||||
@ -268,7 +268,7 @@
|
|||||||
/* Define to `int' if <sys/types.h> does not define. */
|
/* Define to `int' if <sys/types.h> does not define. */
|
||||||
#undef pid_t
|
#undef pid_t
|
||||||
|
|
||||||
/* Define to `unsigned' if <sys/types.h> does not define. */
|
/* Define to `unsigned int' if <sys/types.h> does not define. */
|
||||||
#undef size_t
|
#undef size_t
|
||||||
|
|
||||||
/* Define to "int" if <sys/types.h> does not define. */
|
/* Define to "int" if <sys/types.h> does not define. */
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
@ -73,6 +73,7 @@ ECHO_N = @ECHO_N@
|
|||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
GREP = @GREP@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
@ -106,8 +107,6 @@ WEB100_CONFIG = @WEB100_CONFIG@
|
|||||||
WEB100_LIBS = @WEB100_LIBS@
|
WEB100_LIBS = @WEB100_LIBS@
|
||||||
ac_ct_CC = @ac_ct_CC@
|
ac_ct_CC = @ac_ct_CC@
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
|
||||||
ac_ct_STRIP = @ac_ct_STRIP@
|
|
||||||
acx_pthread_config = @acx_pthread_config@
|
acx_pthread_config = @acx_pthread_config@
|
||||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
@ -125,23 +124,30 @@ build_cpu = @build_cpu@
|
|||||||
build_os = @build_os@
|
build_os = @build_os@
|
||||||
build_vendor = @build_vendor@
|
build_vendor = @build_vendor@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_cpu = @host_cpu@
|
host_cpu = @host_cpu@
|
||||||
host_os = @host_os@
|
host_os = @host_os@
|
||||||
host_vendor = @host_vendor@
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
localstatedir = @localstatedir@
|
localstatedir = @localstatedir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
mkdir_p = @mkdir_p@
|
mkdir_p = @mkdir_p@
|
||||||
oldincludedir = @oldincludedir@
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
|
@ -69,6 +69,9 @@ public:
|
|||||||
// connects and sends data
|
// connects and sends data
|
||||||
void Run( void );
|
void Run( void );
|
||||||
|
|
||||||
|
// TCP specific version of above
|
||||||
|
void RunTCP( void );
|
||||||
|
|
||||||
void InitiateServer();
|
void InitiateServer();
|
||||||
|
|
||||||
// UDP / TCP
|
// UDP / TCP
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
@ -73,6 +73,7 @@ ECHO_N = @ECHO_N@
|
|||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
GREP = @GREP@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
@ -106,8 +107,6 @@ WEB100_CONFIG = @WEB100_CONFIG@
|
|||||||
WEB100_LIBS = @WEB100_LIBS@
|
WEB100_LIBS = @WEB100_LIBS@
|
||||||
ac_ct_CC = @ac_ct_CC@
|
ac_ct_CC = @ac_ct_CC@
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
|
||||||
ac_ct_STRIP = @ac_ct_STRIP@
|
|
||||||
acx_pthread_config = @acx_pthread_config@
|
acx_pthread_config = @acx_pthread_config@
|
||||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
@ -125,23 +124,30 @@ build_cpu = @build_cpu@
|
|||||||
build_os = @build_os@
|
build_os = @build_os@
|
||||||
build_vendor = @build_vendor@
|
build_vendor = @build_vendor@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_cpu = @host_cpu@
|
host_cpu = @host_cpu@
|
||||||
host_os = @host_os@
|
host_os = @host_os@
|
||||||
host_vendor = @host_vendor@
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
localstatedir = @localstatedir@
|
localstatedir = @localstatedir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
mkdir_p = @mkdir_p@
|
mkdir_p = @mkdir_p@
|
||||||
oldincludedir = @oldincludedir@
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
|
@ -74,7 +74,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
typedef struct ReportStruct {
|
typedef struct ReportStruct {
|
||||||
int packetID;
|
int packetID;
|
||||||
int packetLen;
|
max_size_t packetLen;
|
||||||
struct timeval packetTime;
|
struct timeval packetTime;
|
||||||
struct timeval sentTime;
|
struct timeval sentTime;
|
||||||
} ReportStruct;
|
} ReportStruct;
|
||||||
|
@ -180,7 +180,7 @@ typedef struct sockaddr_in iperf_sockaddr;
|
|||||||
// from the gnu archive
|
// from the gnu archive
|
||||||
|
|
||||||
#include <iperf-int.h>
|
#include <iperf-int.h>
|
||||||
typedef uintmax_t max_size_t;
|
typedef uint64_t max_size_t;
|
||||||
|
|
||||||
/* in case the OS doesn't have these, we provide our own implementations */
|
/* in case the OS doesn't have these, we provide our own implementations */
|
||||||
#include "gettimeofday.h"
|
#include "gettimeofday.h"
|
||||||
|
@ -115,6 +115,71 @@ Client::~Client() {
|
|||||||
const double kSecs_to_usecs = 1e6;
|
const double kSecs_to_usecs = 1e6;
|
||||||
const int kBytes_to_Bits = 8;
|
const int kBytes_to_Bits = 8;
|
||||||
|
|
||||||
|
void Client::RunTCP( void ) {
|
||||||
|
long currLen = 0;
|
||||||
|
struct itimerval it;
|
||||||
|
max_size_t totLen = 0;
|
||||||
|
|
||||||
|
int err;
|
||||||
|
|
||||||
|
char* readAt = mBuf;
|
||||||
|
|
||||||
|
// Indicates if the stream is readable
|
||||||
|
bool canRead = true, mMode_Time = isModeTime( mSettings );
|
||||||
|
|
||||||
|
ReportStruct *reportstruct = NULL;
|
||||||
|
|
||||||
|
// InitReport handles Barrier for multiple Streams
|
||||||
|
mSettings->reporthdr = InitReport( mSettings );
|
||||||
|
reportstruct = new ReportStruct;
|
||||||
|
reportstruct->packetID = 0;
|
||||||
|
|
||||||
|
lastPacketTime.setnow();
|
||||||
|
if ( mMode_Time ) {
|
||||||
|
memset (&it, 0, sizeof (it));
|
||||||
|
it.it_value.tv_sec = (int) (mSettings->mAmount / 100.0);
|
||||||
|
it.it_value.tv_usec = (int) 10000 * (mSettings->mAmount -
|
||||||
|
it.it_value.tv_sec * 100.0);
|
||||||
|
err = setitimer( ITIMER_REAL, &it, NULL );
|
||||||
|
if ( err != 0 ) {
|
||||||
|
perror("setitimer");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
do {
|
||||||
|
// Read the next data block from
|
||||||
|
// the file if it's file input
|
||||||
|
if ( isFileInput( mSettings ) ) {
|
||||||
|
Extractor_getNextDataBlock( readAt, mSettings );
|
||||||
|
canRead = Extractor_canRead( mSettings ) != 0;
|
||||||
|
} else
|
||||||
|
canRead = true;
|
||||||
|
|
||||||
|
// perform write
|
||||||
|
currLen = write( mSettings->mSock, mBuf, mSettings->mBufLen );
|
||||||
|
if ( currLen < 0 ) {
|
||||||
|
WARN_errno( currLen < 0, "write2" );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
totLen += currLen;
|
||||||
|
|
||||||
|
if ( !mMode_Time ) {
|
||||||
|
mSettings->mAmount -= currLen;
|
||||||
|
}
|
||||||
|
|
||||||
|
} while ( ! (sInterupted ||
|
||||||
|
(!mMode_Time && 0 >= mSettings->mAmount)) && canRead );
|
||||||
|
|
||||||
|
// stop timing
|
||||||
|
gettimeofday( &(reportstruct->packetTime), NULL );
|
||||||
|
reportstruct->packetLen = totLen;
|
||||||
|
ReportPacket( mSettings->reporthdr, reportstruct );
|
||||||
|
CloseReport( mSettings->reporthdr, reportstruct );
|
||||||
|
|
||||||
|
DELETE_PTR( reportstruct );
|
||||||
|
EndReport( mSettings->reporthdr );
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------------------------------
|
/* -------------------------------------------------------------------
|
||||||
* Send data using the connected UDP/TCP socket,
|
* Send data using the connected UDP/TCP socket,
|
||||||
* until a termination flag is reached.
|
* until a termination flag is reached.
|
||||||
@ -131,6 +196,13 @@ void Client::Run( void ) {
|
|||||||
|
|
||||||
char* readAt = mBuf;
|
char* readAt = mBuf;
|
||||||
|
|
||||||
|
#if HAVE_THREAD
|
||||||
|
if ( !isUDP( mSettings ) ) {
|
||||||
|
RunTCP();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Indicates if the stream is readable
|
// Indicates if the stream is readable
|
||||||
bool canRead = true, mMode_Time = isModeTime( mSettings );
|
bool canRead = true, mMode_Time = isModeTime( mSettings );
|
||||||
|
|
||||||
@ -215,7 +287,7 @@ void Client::Run( void ) {
|
|||||||
|
|
||||||
// perform write
|
// perform write
|
||||||
currLen = write( mSettings->mSock, mBuf, mSettings->mBufLen );
|
currLen = write( mSettings->mSock, mBuf, mSettings->mBufLen );
|
||||||
if ( currLen < 0 ) {
|
if ( currLen < 0 && errno != ENOBUFS ) {
|
||||||
WARN_errno( currLen < 0, "write2" );
|
WARN_errno( currLen < 0, "write2" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,9 @@ AM_CPPFLAGS = @STRIP_BEGIN@ \
|
|||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
@STRIP_END@
|
@STRIP_END@
|
||||||
|
|
||||||
|
AM_CXXFLAGS = -Wall
|
||||||
|
AM_CFLAGS = -Wall
|
||||||
|
|
||||||
iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@
|
iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@
|
||||||
|
|
||||||
iperf_SOURCES = \
|
iperf_SOURCES = \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated by automake 1.9.5 from Makefile.am.
|
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||||
# @configure_input@
|
# @configure_input@
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
@ -14,8 +14,6 @@
|
|||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
SOURCES = $(iperf_SOURCES)
|
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
@ -104,6 +102,7 @@ ECHO_N = @ECHO_N@
|
|||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
EGREP = @EGREP@
|
EGREP = @EGREP@
|
||||||
EXEEXT = @EXEEXT@
|
EXEEXT = @EXEEXT@
|
||||||
|
GREP = @GREP@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
@ -137,8 +136,6 @@ WEB100_CONFIG = @WEB100_CONFIG@
|
|||||||
WEB100_LIBS = @WEB100_LIBS@
|
WEB100_LIBS = @WEB100_LIBS@
|
||||||
ac_ct_CC = @ac_ct_CC@
|
ac_ct_CC = @ac_ct_CC@
|
||||||
ac_ct_CXX = @ac_ct_CXX@
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
ac_ct_RANLIB = @ac_ct_RANLIB@
|
|
||||||
ac_ct_STRIP = @ac_ct_STRIP@
|
|
||||||
acx_pthread_config = @acx_pthread_config@
|
acx_pthread_config = @acx_pthread_config@
|
||||||
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
|
||||||
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
|
||||||
@ -156,23 +153,30 @@ build_cpu = @build_cpu@
|
|||||||
build_os = @build_os@
|
build_os = @build_os@
|
||||||
build_vendor = @build_vendor@
|
build_vendor = @build_vendor@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
host = @host@
|
host = @host@
|
||||||
host_alias = @host_alias@
|
host_alias = @host_alias@
|
||||||
host_cpu = @host_cpu@
|
host_cpu = @host_cpu@
|
||||||
host_os = @host_os@
|
host_os = @host_os@
|
||||||
host_vendor = @host_vendor@
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
includedir = @includedir@
|
includedir = @includedir@
|
||||||
infodir = @infodir@
|
infodir = @infodir@
|
||||||
install_sh = @install_sh@
|
install_sh = @install_sh@
|
||||||
libdir = @libdir@
|
libdir = @libdir@
|
||||||
libexecdir = @libexecdir@
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
localstatedir = @localstatedir@
|
localstatedir = @localstatedir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
mkdir_p = @mkdir_p@
|
mkdir_p = @mkdir_p@
|
||||||
oldincludedir = @oldincludedir@
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
program_transform_name = @program_transform_name@
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
sbindir = @sbindir@
|
sbindir = @sbindir@
|
||||||
sharedstatedir = @sharedstatedir@
|
sharedstatedir = @sharedstatedir@
|
||||||
sysconfdir = @sysconfdir@
|
sysconfdir = @sysconfdir@
|
||||||
@ -186,6 +190,8 @@ AM_CPPFLAGS = @STRIP_BEGIN@ \
|
|||||||
-I$(top_builddir)/include \
|
-I$(top_builddir)/include \
|
||||||
@STRIP_END@
|
@STRIP_END@
|
||||||
|
|
||||||
|
AM_CXXFLAGS = -Wall
|
||||||
|
AM_CFLAGS = -Wall
|
||||||
iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@
|
iperf_LDFLAGS = @CFLAGS@ @PTHREAD_CFLAGS@ @WEB100_CFLAGS@ @DEFS@
|
||||||
iperf_SOURCES = \
|
iperf_SOURCES = \
|
||||||
Client.cpp \
|
Client.cpp \
|
||||||
|
@ -110,6 +110,8 @@ report_statistics multiple_reports[kReport_MAXIMUM] = {
|
|||||||
|
|
||||||
char buffer[64]; // Buffer for printing
|
char buffer[64]; // Buffer for printing
|
||||||
ReportHeader *ReportRoot = NULL;
|
ReportHeader *ReportRoot = NULL;
|
||||||
|
int threadWait = 0;
|
||||||
|
int threadSleeping = 0;
|
||||||
extern Condition ReportCond;
|
extern Condition ReportCond;
|
||||||
int reporter_process_report ( ReportHeader *report );
|
int reporter_process_report ( ReportHeader *report );
|
||||||
void process_report ( ReportHeader *report );
|
void process_report ( ReportHeader *report );
|
||||||
@ -349,6 +351,8 @@ void ReportPacket( ReportHeader* agent, ReportStruct *packet ) {
|
|||||||
thread_rest();
|
thread_rest();
|
||||||
index = agent->reporterindex;
|
index = agent->reporterindex;
|
||||||
}
|
}
|
||||||
|
if (threadSleeping)
|
||||||
|
Condition_Signal( &ReportCond );
|
||||||
|
|
||||||
// Put the information there
|
// Put the information there
|
||||||
memcpy( agent->data + agent->agentindex, packet, sizeof(ReportStruct) );
|
memcpy( agent->data + agent->agentindex, packet, sizeof(ReportStruct) );
|
||||||
@ -378,6 +382,9 @@ void CloseReport( ReportHeader *agent, ReportStruct *packet ) {
|
|||||||
packet->packetLen = 0;
|
packet->packetLen = 0;
|
||||||
ReportPacket( agent, packet );
|
ReportPacket( agent, packet );
|
||||||
packet->packetID = agent->report.cntDatagrams;
|
packet->packetID = agent->report.cntDatagrams;
|
||||||
|
if (threadSleeping)
|
||||||
|
Condition_Signal( &ReportCond );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -389,6 +396,9 @@ void CloseReport( ReportHeader *agent, ReportStruct *packet ) {
|
|||||||
void EndReport( ReportHeader *agent ) {
|
void EndReport( ReportHeader *agent ) {
|
||||||
if ( agent != NULL ) {
|
if ( agent != NULL ) {
|
||||||
int index = agent->reporterindex;
|
int index = agent->reporterindex;
|
||||||
|
if (threadSleeping)
|
||||||
|
Condition_Signal( &ReportCond );
|
||||||
|
|
||||||
while ( index != -1 ) {
|
while ( index != -1 ) {
|
||||||
thread_rest();
|
thread_rest();
|
||||||
index = agent->reporterindex;
|
index = agent->reporterindex;
|
||||||
@ -457,6 +467,10 @@ void ReportSettings( thread_Settings *agent ) {
|
|||||||
* Update the ReportRoot to include this report.
|
* Update the ReportRoot to include this report.
|
||||||
*/
|
*/
|
||||||
Condition_Lock( ReportCond );
|
Condition_Lock( ReportCond );
|
||||||
|
if ( isUDP(agent) )
|
||||||
|
threadWait = 0;
|
||||||
|
else
|
||||||
|
threadWait = 1;
|
||||||
reporthdr->next = ReportRoot;
|
reporthdr->next = ReportRoot;
|
||||||
ReportRoot = reporthdr;
|
ReportRoot = reporthdr;
|
||||||
Condition_Signal( &ReportCond );
|
Condition_Signal( &ReportCond );
|
||||||
@ -577,7 +591,17 @@ void reporter_spawn( thread_Settings *thread ) {
|
|||||||
Condition_Unlock ( ReportCond );
|
Condition_Unlock ( ReportCond );
|
||||||
}
|
}
|
||||||
// yield control of CPU is another thread is waiting
|
// yield control of CPU is another thread is waiting
|
||||||
thread_rest();
|
// sleep on a condition variable, as it is much cheaper
|
||||||
|
// on most platforms than issuing schedyield or usleep
|
||||||
|
// syscalls
|
||||||
|
Condition_Lock ( ReportCond );
|
||||||
|
if ( threadWait && ReportRoot != NULL) {
|
||||||
|
threadSleeping = 1;
|
||||||
|
Condition_TimedWait (& ReportCond, 1 );
|
||||||
|
threadSleeping = 0;
|
||||||
|
}
|
||||||
|
Condition_Unlock ( ReportCond );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
//Condition_Unlock ( ReportCond );
|
//Condition_Unlock ( ReportCond );
|
||||||
}
|
}
|
||||||
|
@ -98,6 +98,7 @@ void Server::Sig_Int( int inSigno ) {
|
|||||||
* ------------------------------------------------------------------- */
|
* ------------------------------------------------------------------- */
|
||||||
void Server::Run( void ) {
|
void Server::Run( void ) {
|
||||||
long currLen;
|
long currLen;
|
||||||
|
max_size_t totLen = 0;
|
||||||
struct UDP_datagram* mBuf_UDP = (struct UDP_datagram*) mBuf;
|
struct UDP_datagram* mBuf_UDP = (struct UDP_datagram*) mBuf;
|
||||||
|
|
||||||
ReportStruct *reportstruct = NULL;
|
ReportStruct *reportstruct = NULL;
|
||||||
@ -115,10 +116,11 @@ void Server::Run( void ) {
|
|||||||
reportstruct->packetID = ntohl( mBuf_UDP->id );
|
reportstruct->packetID = ntohl( mBuf_UDP->id );
|
||||||
reportstruct->sentTime.tv_sec = ntohl( mBuf_UDP->tv_sec );
|
reportstruct->sentTime.tv_sec = ntohl( mBuf_UDP->tv_sec );
|
||||||
reportstruct->sentTime.tv_usec = ntohl( mBuf_UDP->tv_usec );
|
reportstruct->sentTime.tv_usec = ntohl( mBuf_UDP->tv_usec );
|
||||||
}
|
|
||||||
|
|
||||||
reportstruct->packetLen = currLen;
|
reportstruct->packetLen = currLen;
|
||||||
gettimeofday( &(reportstruct->packetTime), NULL );
|
gettimeofday( &(reportstruct->packetTime), NULL );
|
||||||
|
} else {
|
||||||
|
totLen += currLen;
|
||||||
|
}
|
||||||
|
|
||||||
// terminate when datagram begins with negative index
|
// terminate when datagram begins with negative index
|
||||||
// the datagram ID should be correct, just negated
|
// the datagram ID should be correct, just negated
|
||||||
@ -126,11 +128,16 @@ void Server::Run( void ) {
|
|||||||
reportstruct->packetID = -reportstruct->packetID;
|
reportstruct->packetID = -reportstruct->packetID;
|
||||||
currLen = -1;
|
currLen = -1;
|
||||||
}
|
}
|
||||||
|
if ( isUDP (mSettings))
|
||||||
ReportPacket( mSettings->reporthdr, reportstruct );
|
ReportPacket( mSettings->reporthdr, reportstruct );
|
||||||
} while ( currLen > 0 );
|
} while ( currLen > 0 );
|
||||||
|
|
||||||
// stop timing
|
// stop timing
|
||||||
gettimeofday( &(reportstruct->packetTime), NULL );
|
gettimeofday( &(reportstruct->packetTime), NULL );
|
||||||
|
if ( !isUDP (mSettings)) {
|
||||||
|
reportstruct->packetLen = totLen;
|
||||||
|
ReportPacket( mSettings->reporthdr, reportstruct );
|
||||||
|
}
|
||||||
CloseReport( mSettings->reporthdr, reportstruct );
|
CloseReport( mSettings->reporthdr, reportstruct );
|
||||||
|
|
||||||
// send a acknowledgement back only if we're NOT receiving multicast
|
// send a acknowledgement back only if we're NOT receiving multicast
|
||||||
|
@ -123,6 +123,7 @@ int main( int argc, char **argv ) {
|
|||||||
// Set SIGTERM and SIGINT to call our user interrupt function
|
// Set SIGTERM and SIGINT to call our user interrupt function
|
||||||
my_signal( SIGTERM, Sig_Interupt );
|
my_signal( SIGTERM, Sig_Interupt );
|
||||||
my_signal( SIGINT, Sig_Interupt );
|
my_signal( SIGINT, Sig_Interupt );
|
||||||
|
my_signal( SIGALRM, Sig_Interupt );
|
||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
// Ignore broken pipes
|
// Ignore broken pipes
|
||||||
|
Loading…
Reference in New Issue
Block a user