Re: Clarification on behaviour of Iperf's -w option [PATCH]
Further to the discussions last week, I've created a patch against the
iperf 2.0.2 source distribution and a supporting readme that I believe
addresses the issues raised in my initial email.
In a nutshell, the patch changes Iperf's behaviour such that the "-w"
switch modifies the size of the TCP socket's receive buffer. It also
adds a new command line switch, "-e", which allows the user to
manipulate the TCP socket's send buffer (which was being manipulated by
the "-w" switch in the base distribution). Both command line switches
also work correctly when running in UDP mode as well.
I'd like to submit this patch for review, and ask users to try the patch
out and provide any feedback. All detail necessary to test the patch out
is included in the attached README text file.
I've tested the patch on both FreeBSD 6.2 and Debian Linux running a
2.6.21 kernel, and it functions correctly.
Once any issues with the patch have been addressed, it can hopefully
find it's way into the official distribution.
Cheers,
Lawrence
http://caia.swin.edu.au/
Lawrence Stewart wrote:
Hi all,
I'm a new user of Iperf and I've been using v2.0.2 on FreeBSD 6.2 for
some TCP research I'm involved with. I was hoping you could help clarify
some confusion I'm having with Iperf's "-w" (TCP window size) option.
Using a new tool we developed named SIFTR
(http://caia.swin.edu.au/urp/newtcp/tools.html), we are able to
investigate the internal state of TCP connections on our testbed,
getting details like congestion window, send window and receive window.
We have been using Iperf to test SIFTR.
We ran an Iperf server on one FreeBSD 6.2 machine, connected to an
identical FreeBSD 6.2 machine via a cross over cable which ran as the
Iperf client.
When we run "iperf -s" on the server, we see the message printed to
screen: "TCP window size: 64.0 KByte (default)"
Having read through the source code, the keyword default indicates that
we have not overridden the system default window size. In FreeBSD, the 2
default socket buffer sizes are controlled by the sysctl variables
"net.inet.tcp.recvspace" and "net.inet.tcp.sendspace". The advertised
window should equate to the size of our receive buffer
(net.inet.tcp.recvspace), which in FreeBSD is 65536 bytes. The Iperf
server tells us the window is 64.0k, 65536/1024 = 64.0 kbytes, so this
is as we would expect i.e. it is correctly reporting the use of the
system's default receive socket buffer size as the advertised window.
However, when we run the Iperf client using the command "iperf -c
10.0.0.3" (where 10.0.0.3 is the IP address of the machine we ran the
iperf server on), we see the message printed to screen: "TCP window
size: 32.5 KByte (default)".
The value of 32.5k is slightly above the default value of FreeBSD's
net.inet.tcp.sendspace sysctl variable, the value of
which is 32768 bytes. I don't know the reason for this value not being
exactly equal to the sendspace variable... but I do know that in client
mode, Iperf reports the size of the buffer _after_ a connection to the
server has been established. By some mechanism unknown to me within the
kernel, the buffer is sized to be as close to the default as possible,
but is a slightly different size. The comments in the source code of
tcp_window_size.c seem to validate my thoughts, stating that the buffer
size is not validated until a connection has been established i.e the
buffer size printed by iperf in server mode would also be slightly
different to 64.0K if we printed the size when a client connected,
rather than once on startup.
Reporting the value of 32.5k, being based on the send buffer, means we
are _apparently_ advertising the value of our send space buffer as our
TCP window, rather than our receive space buffer.
Attempting to manually override the window on the client using the "-w"
option to Iperf does indeed modify the value reported as the TCP window
by Iperf e.g. running "iperf -c 136.186.229.192 -w 100K" will report
"TCP window size: 100 KByte (WARNING: requested 100 KByte)"
However, further investigation using the SIFTR tool to show what the
kernel thought was going on revealed that the client is _actually_
advertising 64.0 KByte as the window regardless of whether the "-w"
option is set or not i.e. the network stack is still happily advertising
the size of the receive buffer as the initial window, completely
independent to the value Iperf is reporting as the TCP window. We found
that the server side is behaving as expected though and is actually
advertising the size of its receive buffer correctly.
To put this discussion into context, the iperf man page and help output
describe the "-w" option as "TCP window size (socket buffer size)".
Delving into the Iperf code, we found that in tcp_window_size.c, there
is an if/else statement that goes something like this (in pseudo code):
if ( !inSend )
{
set the socket's receive buffer to the value specified by the user
}
else
{
set the socket's send buffer to the value specified by the user
}
inSend is false if Iperf is being run as a server, and true if Iperf is
being run as a client.
The net result of this code is that the "-w" option on an iperf client
modifies the size of the send space buffer, which actually has no effect
on the window advertised by the client to the server.
Based on all of this, it would seem that the "-w" option is behaving in
an unexpected manner, considering the description of the option in the
literature is that it adjusts the TCP window size. One could also argue
that the Iperf client reporting the size of the send buffer and claiming
it to be the TCP window size is also unexpected behaviour.
Can anyone shed some light on this behaviour? Would it be worth creating
and submitting a patch to modify this behaviour such that the -w option
always adjusts the socket's receive buffer which will in turn cause the
advertised window to be equal to the value specified in the -w option?
Perhaps there should be a new command line switch added that allows the
user to manipulate both the send and receive buffer size used for the
Iperf socket?
Thanks for your help!
Cheers,
Lawrence
http://caia.swin.edu.au/
James Healy and Lawrence Stewart
Centre for Advanced Internet Architectures,
Swinburne University of Technology,
Melbourne, Australia
CRICOS number 00111D
16th July, 2007
-----------------------
OVERVIEW
-----------------------
The "caia_iperf.patch" patch file contained in this directory is for
iperf v2.0.2. It addresses an oddity in iperf that results in the send socket
buffer size being manipulated when the "-w" command line switch is used.
This switch is supposed to change the TCP window size, but by modifying the
send buffer, there is no actual affect on the TCP window.
This patch modifies Iperf's behaviour such that the "-w" switch actually
modifies the socket's receive buffer space, and a new "-e" switch modifies
the send buffer space independent of the receive buffer. This allows the
user to have finer grained control over the TCP socket buffers. It also
changes the message printed on startup to show the size of both the send
and receive socket buffers.
-----------------------
LICENCE
-----------------------
The patch is released under a BSD licence.
Refer to licence header in the patch file for further details.
-----------------------
USAGE
-----------------------
1. untar the iperf 2.0.2 source code
2. Copy the "caia_iperf.patch" patch file into the iperf 2.0.2 source code
directory
3. cd into the iperf 2.0.2 source code directory and run
"patch -p0 < caia_iperf.patch"
4. Run "./configure" followed by "make"
5. Copy the "src/iperf" binary wherever you like
-----------------------
RELATED READING
-----------------------
This software was developed as part of the NewTCP research project at
Swinburne University's Centre for Advanced Internet Architectures.
More information on the project is available at:
http://caia.swin.edu.au/urp/newtcp/
For anyone using Iperf on FreeBSD, we wrote a small technical report related
to tuning and testing TCP under FreeBSD that may also be of interest.
The report is titled:
"Tuning and Testing the FreeBSD 6 TCP Stack"
It has been released as CAIA technical report 070716A and is available for
download from:
http://caia.swin.edu.au/urp/newtcp/papers.html
--- Copyright (c) 2007, Centre for Advanced Internet Architectures
--- Swinburne University of Technology, Melbourne, Australia
--- (CRICOS number 00111D).
---
--- This software was developed by James Healy <jhealy --at-- swin.edu.au>
--- and Lawrence Stewart <lastewart --at-- swin.edu.au>
---
--- All rights reserved.
---
--- Redistribution and use in source and binary forms, with or without
--- modification, are permitted provided that the following conditions
--- are met:
--- 1. Redistributions of source code must retain the above copyright
--- notice, this list of conditions and the following disclaimer.
--- 2. Redistributions in binary form must reproduce the above copyright
--- notice, this list of conditions and the following disclaimer in the
--- documentation and/or other materials provided with the distribution.
--- 3. The names of the authors, the "Centre for Advanced Internet Architectures"
--- and "Swinburne University of Technology" may not be used to endorse
--- or promote products derived from this software without specific
--- prior written permission.
---
--- THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND
--- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
--- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
--- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
--- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
--- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
--- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
--- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
--- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
--- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
--- SUCH DAMAGE.
---
--- include/Settings.hpp.orig Tue May 3 06:09:26 2005
+++ include/Settings.hpp Mon Jul 16 12:02:55 2007
@@ -124,6 +124,7 @@
int Extractor_size;
int mBufLen; // -l
int mMSS; // -M
+ int mTCPSndBuf; // -e
int mTCPWin; // -w
/* flags is a BitMask of old bools
bool mBufLenSet; // -l
@@ -326,12 +327,14 @@
int32_t mPort;
int32_t bufferlen;
int32_t mWinBand;
+ int32_t mSndBand;
int32_t mAmount;
#else
signed int flags : 32;
signed int numThreads : 32;
signed int mPort : 32;
signed int bufferlen : 32;
+ signed int mSndBand : 32;
signed int mWinBand : 32;
signed int mAmount : 32;
#endif
--- include/util.h.orig Tue May 3 06:09:26 2005
+++ include/util.h Mon Jul 16 11:26:08 2007
@@ -65,8 +65,8 @@
* set/getsockopt wrappers for SO_RCVBUF and SO_SNDBUF; TCP_MAXSEG
* socket.c
* ------------------------------------------------------------------- */
-int setsock_tcp_windowsize( int inSock, int inTCPWin, int inSend );
-int getsock_tcp_windowsize( int inSock, int inSend );
+int setsock_buffer_size( int inSock, int inBufSize, int inWhichBuf );
+int getsock_buffer_size( int inSock, int inWhichBuf );
void setsock_tcp_mss( int inSock, int inTCPWin );
int getsock_tcp_mss( int inSock );
--- include/Locale.h.orig Tue May 3 06:09:26 2005
+++ include/Locale.h Thu Jul 12 16:29:22 2007
@@ -92,9 +92,13 @@
extern const char server_datagram_size[];
-extern const char tcp_window_size[];
+extern const char tcp_sendspace_size[];
-extern const char udp_buffer_size[];
+extern const char tcp_recvspace_size[];
+
+extern const char udp_sendspace_size[];
+
+extern const char udp_recvspace_size[];
extern const char window_default[];
--- src/Locale.c.orig Tue May 3 06:09:27 2005
+++ src/Locale.c Mon Jul 16 11:34:05 2007
@@ -77,6 +77,7 @@
iperf [-h|--help] [-v|--version]\n\
\n\
Client/Server:\n\
+ -e, --sendbuf #[KM] TCP socket send buffer size\n\
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes\n\
-i, --interval # seconds between periodic bandwidth reports\n\
-l, --len #[KM] length of buffer to read or write (default 8 KB)\n\
@@ -84,7 +85,7 @@
-o, --output <filename> output the report or error message to this specified file\n\
-p, --port # server port to listen on/connect to\n\
-u, --udp use UDP rather than TCP\n\
- -w, --window #[KM] TCP window size (socket buffer size)\n\
+ -w, --window #[KM] TCP window size (recv socket buffer size)\n\
-B, --bind <host> bind to <host>, an interface or multicast address\n\
-C, --compatibility for use with older versions does not sent extra msgs\n\
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)\n\
@@ -131,13 +132,14 @@
iperf [-h|--help] [-v|--version]\n\
\n\
Client/Server:\n\
+ -e, --sendbuf #[KM] TCP socket send buffer size\n\
-f, --format [kmKM] format to report: Kbits, Mbits, KBytes, MBytes\n\
-i, --interval # seconds between periodic bandwidth reports\n\
-l, --len #[KM] length of buffer to read or write (default 8 KB)\n\
-m, --print_mss print TCP maximum segment size (MTU - TCP/IP header)\n\
-p, --port # server port to listen on/connect to\n\
-u, --udp use UDP rather than TCP\n\
- -w, --window #[KM] TCP window size (socket buffer size)\n\
+ -w, --window #[KM] TCP window size (recv socket buffer size)\n\
-B, --bind <host> bind to <host>, an interface or multicast address\n\
-C, --compatibility for use with older versions does not sent extra msgs\n\
-M, --mss # set TCP maximum segment size (MTU - 40 bytes)\n\
@@ -216,11 +218,17 @@
const char server_datagram_size[] =
"Receiving %d byte datagrams\n";
-const char tcp_window_size[] =
-"TCP window size";
+const char tcp_sendspace_size[] =
+"TCP snd buf size";
-const char udp_buffer_size[] =
-"UDP buffer size";
+const char tcp_recvspace_size[] =
+"TCP rcv buf size (max advertised window)";
+
+const char udp_sendspace_size[] =
+"UDP snd buffer size";
+
+const char udp_recvspace_size[] =
+"UDP rcv buffer size";
const char window_default[] =
"(default)";
--- src/PerfSocket.cpp.orig Tue May 3 06:09:27 2005
+++ src/PerfSocket.cpp Mon Jul 16 11:24:38 2007
@@ -87,8 +87,9 @@
// set the TCP window size (socket buffer sizes)
// also the UDP buffer size
// must occur before call to accept() for large window sizes
- setsock_tcp_windowsize( inSettings->mSock, inSettings->mTCPWin,
- (inSettings->mThreadMode == kMode_Client ? 1 : 0) );
+ setsock_buffer_size( inSettings->mSock, inSettings->mTCPWin, SO_RCVBUF);
+
+ setsock_buffer_size( inSettings->mSock, inSettings->mTCPSndBuf, SO_SNDBUF);
// check if we're sending multicast, and set TTL
if ( isMulticast( inSettings ) && ( inSettings->mTTL > 0 ) ) {
--- src/ReportDefault.c.orig Tue May 3 06:09:27 2005
+++ src/ReportDefault.c Mon Jul 16 12:05:48 2007
@@ -144,11 +144,12 @@
* Report the client or listener Settings in default style
*/
void reporter_reportsettings( ReporterData *data ) {
- int win, win_requested;
+ int sendspace, recvspace, win_requested, sndbuf_requested;
- win = getsock_tcp_windowsize( data->info.transferID,
- (data->mThreadMode == kMode_Listener ? 0 : 1) );
+ sendspace = getsock_buffer_size( data->info.transferID, SO_SNDBUF);
+ recvspace = getsock_buffer_size( data->info.transferID, SO_RCVBUF);
win_requested = data->mTCPWin;
+ sndbuf_requested = data->mTCPSndBuf;
printf( seperator_line );
if ( data->mThreadMode == kMode_Listener ) {
@@ -176,14 +177,28 @@
printf( multicast_ttl, data->info.mTTL);
}
}
- byte_snprintf( buffer, sizeof(buffer), win,
+ byte_snprintf( buffer, sizeof(buffer), sendspace,
toupper( data->info.mFormat));
printf( "%s: %s", (isUDP( data ) ?
- udp_buffer_size : tcp_window_size), buffer );
+ udp_sendspace_size : tcp_sendspace_size), buffer );
+
+ if ( sndbuf_requested == 0 ) {
+ printf( " %s", window_default );
+ } else if ( sendspace != sndbuf_requested ) {
+ byte_snprintf( buffer, sizeof(buffer), sndbuf_requested,
+ toupper( data->info.mFormat));
+ printf( warn_window_requested, buffer );
+ }
+ printf( "\n" );
+
+ byte_snprintf( buffer, sizeof(buffer), recvspace,
+ toupper( data->info.mFormat));
+ printf( "%s: %s", (isUDP( data ) ?
+ udp_recvspace_size : tcp_recvspace_size), buffer );
if ( win_requested == 0 ) {
printf( " %s", window_default );
- } else if ( win != win_requested ) {
+ } else if ( recvspace != win_requested ) {
byte_snprintf( buffer, sizeof(buffer), win_requested,
toupper( data->info.mFormat));
printf( warn_window_requested, buffer );
--- src/Reporter.c.orig Tue May 3 06:09:27 2005
+++ src/Reporter.c Mon Jul 16 12:04:50 2007
@@ -155,6 +155,7 @@
data->mLocalhost = agent->mLocalhost;
data->mBufLen = agent->mBufLen;
data->mMSS = agent->mMSS;
+ data->mTCPSndBuf = agent->mTCPSndBuf;
data->mTCPWin = agent->mTCPWin;
data->flags = agent->flags;
data->mThreadMode = agent->mThreadMode;
@@ -236,6 +237,7 @@
data->mLocalhost = agent->mLocalhost;
data->mBufLen = agent->mBufLen;
data->mMSS = agent->mMSS;
+ data->mTCPSndBuf = agent->mTCPSndBuf;
data->mTCPWin = agent->mTCPWin;
data->flags = agent->flags;
data->mThreadMode = agent->mThreadMode;
@@ -441,6 +443,7 @@
data->type = SETTINGS_REPORT;
data->mBufLen = agent->mBufLen;
data->mMSS = agent->mMSS;
+ data->mTCPSndBuf = agent->mTCPSndBuf;
data->mTCPWin = agent->mTCPWin;
data->flags = agent->flags;
data->mThreadMode = agent->mThreadMode;
--- src/Settings.cpp.orig Tue May 3 06:09:27 2005
+++ src/Settings.cpp Mon Jul 16 12:00:02 2007
@@ -87,6 +87,7 @@
{"bandwidth", required_argument, NULL, 'b'},
{"client", required_argument, NULL, 'c'},
{"dualtest", no_argument, NULL, 'd'},
+{"sendbuf", required_argument, NULL, 'e'},
{"format", required_argument, NULL, 'f'},
{"help", no_argument, NULL, 'h'},
{"interval", required_argument, NULL, 'i'},
@@ -131,6 +132,7 @@
{"IPERF_BANDWIDTH", required_argument, NULL, 'b'},
{"IPERF_CLIENT", required_argument, NULL, 'c'},
{"IPERF_DUALTEST", no_argument, NULL, 'd'},
+{"TCP_SENDBUF_SIZE", required_argument, NULL, 'e'},
{"IPERF_FORMAT", required_argument, NULL, 'f'},
// skip help
{"IPERF_INTERVAL", required_argument, NULL, 'i'},
@@ -167,7 +169,7 @@
#define SHORT_OPTIONS()
-const char short_options[] = "1b:c:df:hi:l:mn:o:p:rst:uvw:x:y:B:CDF:IL:M:NP:RS:T:UVW";
+const char short_options[] = "1b:c:de:f:hi:l:mn:o:p:rst:uvw:x:y:B:CDF:IL:M:NP:RS:T:UVW";
/* -------------------------------------------------------------------
* defaults
@@ -368,6 +370,15 @@
#endif
break;
+ case 'e': // TCP sendbuf size (socket send buffer size)
+ Settings_GetUpperCaseArg(optarg,outarg);
+ mExtSettings->mTCPSndBuf = byte_atoi(outarg);
+
+ if ( mExtSettings->mTCPSndBuf < 2048 ) {
+ fprintf( stderr, warn_window_small, mExtSettings->mTCPSndBuf );
+ }
+ break;
+
case 'f': // format to print in
mExtSettings->mFormat = (*optarg);
break;
@@ -756,6 +767,7 @@
(*client)->mUDPRate = ntohl(hdr->mWinBand);
} else {
(*client)->mTCPWin = ntohl(hdr->mWinBand);
+ (*client)->mTCPSndBuf = ntohl(hdr->mSndBand);
}
}
(*client)->mAmount = ntohl(hdr->mAmount);
@@ -816,6 +828,7 @@
hdr->mWinBand = htonl(client->mUDPRate);
} else {
hdr->mWinBand = htonl(client->mTCPWin);
+ hdr->mSndBand = htonl(client->mTCPSndBuf);
}
if ( client->mListenPort != 0 ) {
hdr->mPort = htonl(client->mListenPort);
--- src/tcp_window_size.c.orig Tue May 3 06:09:27 2005
+++ src/tcp_window_size.c Mon Jul 16 11:22:23 2007
@@ -70,21 +70,21 @@
* returns -1 on error, 0 on no error.
* ------------------------------------------------------------------- */
-int setsock_tcp_windowsize( int inSock, int inTCPWin, int inSend ) {
-#ifdef SO_SNDBUF
+int setsock_buffer_size( int inSock, int inBufSize, int inWhichBuf ) {
+#ifdef SO_SNDBUF && SO_RCVBUF
int rc;
- int newTCPWin;
+ int newBufSize;
assert( inSock >= 0 );
- if ( inTCPWin > 0 ) {
+ if ( inBufSize > 0 ) {
#ifdef TCP_WINSHIFT
/* UNICOS requires setting the winshift explicitly */
- if ( inTCPWin > 65535 ) {
+ if ( inBufSize > 65535 ) {
int winShift = 0;
- int scaledWin = inTCPWin >> 16;
+ int scaledWin = inBufSize >> 16;
while ( scaledWin > 0 ) {
scaledWin >>= 1;
winShift++;
@@ -106,7 +106,7 @@
/* On AIX, RFC 1323 extensions can be set system-wide,
* using the 'no' network options command. But we can also set them
* per-socket, so let's try just in case. */
- if ( inTCPWin > 65535 ) {
+ if ( inBufSize > 65535 ) {
/* enable RFC 1323 */
int on = 1;
rc = setsockopt( inSock, IPPROTO_TCP, TCP_RFC1323,
@@ -117,59 +117,62 @@
}
#endif /* TCP_RFC1323 */
- if ( !inSend ) {
+ if ( inWhichBuf == SO_RCVBUF ) {
/* receive buffer -- set
* note: results are verified after connect() or listen(),
* since some OS's don't show the corrected value until then. */
- newTCPWin = inTCPWin;
+ newBufSize = inBufSize;
rc = setsockopt( inSock, SOL_SOCKET, SO_RCVBUF,
- (char*) &newTCPWin, sizeof( newTCPWin ));
- } else {
+ (char*) &newBufSize, sizeof( newBufSize ));
+ } else if ( inWhichBuf == SO_SNDBUF ) {
/* send buffer -- set
* note: results are verified after connect() or listen(),
* since some OS's don't show the corrected value until then. */
- newTCPWin = inTCPWin;
+ newBufSize = inBufSize;
rc = setsockopt( inSock, SOL_SOCKET, SO_SNDBUF,
- (char*) &newTCPWin, sizeof( newTCPWin ));
+ (char*) &newBufSize, sizeof( newBufSize ));
}
if ( rc < 0 ) {
return rc;
}
}
-#endif /* SO_SNDBUF */
+#endif /* SO_SNDBUF && SO_RCVBUF */
return 0;
-} /* end setsock_tcp_windowsize */
+} /* end setsock_buffer_size */
/* -------------------------------------------------------------------
* returns the TCP window size (on the sending buffer, SO_SNDBUF),
* or -1 on error.
* ------------------------------------------------------------------- */
-int getsock_tcp_windowsize( int inSock, int inSend ) {
- int theTCPWin = 0;
+int getsock_buffer_size( int inSock, int inWhichBuf ) {
+ int bufsize = 0;
+
-#ifdef SO_SNDBUF
int rc;
- Socklen_t len;
+ Socklen_t len = sizeof(bufsize);
- /* send buffer -- query for buffer size */
- len = sizeof( theTCPWin );
- if ( inSend ) {
+#ifdef SO_SNDBUF
+ if ( inWhichBuf == SO_SNDBUF ) {
rc = getsockopt( inSock, SOL_SOCKET, SO_SNDBUF,
- (char*) &theTCPWin, &len );
- } else {
+ (char*) &bufsize, &len );
+#endif
+#ifdef SO_RCVBUF
+ } else if(inWhichBuf == SO_RCVBUF) {
rc = getsockopt( inSock, SOL_SOCKET, SO_RCVBUF,
- (char*) &theTCPWin, &len );
+ (char*) &bufsize, &len );
}
+#endif
if ( rc < 0 ) {
return rc;
}
-#endif
- return theTCPWin;
-} /* end getsock_tcp_windowsize */
+
+ return bufsize;
+} /* end getsock_buffer_size */
+
#ifdef __cplusplus
} /* end extern "C" */
--- include/Reporter.h.orig Tue May 3 06:09:26 2005
+++ include/Reporter.h Mon Jul 16 11:42:01 2007
@@ -129,6 +129,7 @@
int PacketID;
int mBufLen; // -l
int mMSS; // -M
+ int mTCPSndBuf; // -e
int mTCPWin; // -w
/* flags is a BitMask of old bools
bool mBufLenSet; // -l