[netperf-dev] netperf2 commit notice r111 - trunk/src
raj at netperf.org
raj at netperf.org
Wed Apr 25 14:53:21 PDT 2007
Author: raj
Date: 2007-04-25 14:53:20 -0700 (Wed, 25 Apr 2007)
New Revision: 111
Modified:
trunk/src/nettest_sdp.c
Log:
make burst work for SDP_RR
Modified: trunk/src/nettest_sdp.c
===================================================================
--- trunk/src/nettest_sdp.c 2007-04-25 20:42:12 UTC (rev 110)
+++ trunk/src/nettest_sdp.c 2007-04-25 21:53:20 UTC (rev 111)
@@ -79,7 +79,7 @@
#endif /* WANT_HISTOGRAM */
#ifdef WANT_FIRST_BURST
-int first_burst_size=0;
+extern int first_burst_size;
#endif /* WANT_FIRST_BURST */
@@ -139,13 +139,28 @@
/* called outside of the timing loop */
static
void
-get_sdp_info(socket, mss)
- int socket;
- int *mss;
+get_sdp_info(int socket, int * mss)
{
- int sock_opt_len;
+#ifdef TCP_MAXSEG
+ netperf_socklen_t sock_opt_len;
+ sock_opt_len = sizeof(netperf_socklen_t);
+ if (getsockopt(socket,
+ getprotobyname("tcp")->p_proto,
+ TCP_MAXSEG,
+ (char *)mss,
+ &sock_opt_len) == SOCKET_ERROR) {
+ fprintf(where,
+ "netperf: get_sdp_info: getsockopt TCP_MAXSEG: errno %d\n",
+ errno);
+ fflush(where);
+ *mss = -1;
+ }
+#else
+ *mss = -1;
+#endif /* TCP_MAXSEG */
+
}
void
@@ -3356,7 +3371,7 @@
{
-#define SOCKETS_ARGS "DhH:I:L:m:M:P:r:s:S:V46"
+#define SOCKETS_ARGS "b:DhH:I:L:m:M:P:r:s:S:V46"
extern char *optarg; /* pointer to option string */
More information about the netperf-dev
mailing list