ndt-dev - [ndt-dev] [ndt] r724 committed - Moved S2C, C2S, Mid tests to new files, renamed methods, and some vari...
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r724 committed - Moved S2C, C2S, Mid tests to new files, renamed methods, and some vari...
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r724 committed - Moved S2C, C2S, Mid tests to new files, renamed methods, and some vari...
- Date: Tue, 18 Oct 2011 16:01:49 +0000
Revision: 724
Author:
Date: Tue Oct 18 09:01:08 2011
Log: Moved S2C, C2S, Mid tests to new files, renamed methods, and some variable names to indicate throughput and link_speed indicators, more new constants
http://code.google.com/p/ndt/source/detail?r=724
Modified:
/branches/kkumar_code_organize/src/analyze.c
/branches/kkumar_code_organize/src/heuristics.c
/branches/kkumar_code_organize/src/heuristics.h
/branches/kkumar_code_organize/src/logging.c
/branches/kkumar_code_organize/src/logging.h
/branches/kkumar_code_organize/src/ndt_odbc.c
/branches/kkumar_code_organize/src/testoptions.c
/branches/kkumar_code_organize/src/testoptions.h
/branches/kkumar_code_organize/src/utils.h
/branches/kkumar_code_organize/src/web100-admin.c
/branches/kkumar_code_organize/src/web100srv.c
=======================================
--- /branches/kkumar_code_organize/src/analyze.c Mon Oct 17 06:43:25
2011
+++ /branches/kkumar_code_organize/src/analyze.c Tue Oct 18 09:01:08
2011
@@ -64,7 +64,7 @@
FILE *fp;
int indx, links[4][16], max, total;
float runave[4];
-int c2sdata, c2sack, s2cdata, s2cack;
+int c2s_linkspeed_data, c2s_linkspeed_ack, s2c_linkspeed_data, s2c_linkspeed_ack;
int j;
char spds[4][256], buff2[32];
char *str, tmpstr[32];
@@ -121,21 +121,23 @@
indx = -2;
switch (i) {
case 0:
- c2sdata = indx;
+ c2s_linkspeed_data = indx;
log_print(1, "Client --> Server data detects link =
");
break;
case 1:
- c2sack = indx;
+ c2s_linkspeed_ack = indx;
log_print(1, "Client <-- Server Ack's detect link =
");
break;
case 2:
- s2cdata = indx;
+ s2c_linkspeed_data = indx;
log_print(1, "Server --> Client data detects link =
");
break;
case 3:
- s2cack = indx;
+ s2c_linkspeed_ack = indx;
log_print(1, "Server <-- Client Ack's detect link =
");
}
+
+ /*
switch (indx) {
case -2:
log_println(1, "Insufficent Data");
@@ -177,8 +179,10 @@
log_println(1, "Retransmissions");
break;
}
- }
- switch (c2sdata) {
+ */
+ log_linkspeed(indx);
+ }
+ switch (c2s_linkspeed_data) {
case -2:
sprintf(btlneck, "Insufficent Data");
break;
@@ -196,7 +200,7 @@
&& (c2sspd > 1000))
sprintf(btlneck, "a 'T1' subnet");
else {
- if ((tail[3] > 1) || (s2cack == 3))
+ if ((tail[3] > 1) || (s2c_linkspeed_ack == 3))
sprintf(btlneck, "a 'Cable Modem'
connection");
else
sprintf(btlneck, "a 'DSL' connection");
@@ -386,10 +390,10 @@
}
printf("\tWeb100 says link = %d, speed-chk says link = %d\n", link,
- c2sdata);
+ c2s_linkspeed_data);
printf(
"\tSpeed-chk says {%d, %d, %d, %d}, Running average = {%0.1f, %0.1f, %0.1f, %0.1f}\n",
- c2sdata, c2sack, s2cdata, s2cack, runave[0],
runave[1], runave[2],
+ c2s_linkspeed_data, c2s_linkspeed_ack, s2c_linkspeed_data, s2c_linkspeed_ack, runave[0], runave[1], runave[2],
runave[3]);
if (c2sspd > 1000)
printf(
@@ -730,22 +734,22 @@
str += 1;
if (sscanf(str, "%[^,]s", tmpstr) < 1)
goto display;
- c2sdata = atoi(tmpstr);
+ c2s_linkspeed_data = atoi(tmpstr);
str = strchr(str, ',') + 1;
if (sscanf(str, "%[^,]s", tmpstr) < 1)
goto display;
- c2sack = atoi(tmpstr);
+ c2s_linkspeed_ack = atoi(tmpstr);
str = strchr(str, ',') + 1;
if (sscanf(str, "%[^,]s", tmpstr) < 1)
goto display;
- s2cdata = atoi(tmpstr);
+ s2c_linkspeed_data = atoi(tmpstr);
str = strchr(str, ',') + 1;
if (sscanf(str, "%[^,]s", tmpstr) < 1)
goto display;
- s2cack = atoi(tmpstr);
+ s2c_linkspeed_ack = atoi(tmpstr);
str = strchr(str, ',');
if (str == NULL) {
=======================================
--- /branches/kkumar_code_organize/src/heuristics.c Sun Oct 16 15:37:17
2011
+++ /branches/kkumar_code_organize/src/heuristics.c Tue Oct 18 09:01:08
2011
@@ -38,10 +38,10 @@
*
* @param spds speed string array used ad speeb counter bins
* @param spd_index speed index indicating indices of the speend bin array
- * @param c2sdata Data link speed as detected by server data
- * @param c2sack Data link speed(type) as detected by server acknowledgements
- * @param s2cdata Data link speed as detected by client data
- * @param s2cack Data link speed as detected by client acknowledgements
+ * @param c2s_linkspeed_data Data link speed as detected by server data
+ * @param c2s_linkspeed_ack Data link speed(type) as detected by server acknowledgements
+ * @param s2c_linkspeed_data Data link speed as detected by client data
+ * @param s2c_linkspeed_ack Data link speed as detected by client acknowledgements
* @param runave average run time?
* @param dec_cnt number of times window sizes have been decremented
* @param same_cnt number of times window sizes remained the same
@@ -51,8 +51,8 @@
* @param is_c2stest is this a C->S test?
*
* */
-void calc_linkspeed(char spds[4][256], int spd_index, int *c2sdata, int *c2sack,
- int* s2cdata, int *s2cack, float runave[4], u_int32_t
*dec_cnt,
+void calc_linkspeed(char spds[4][256], int spd_index, int *c2s_linkspeed_data, int *c2s_linkspeed_ack,
+ int* s2c_linkspeed_data, int *s2c_linkspeed_ack, float runave[4], u_int32_t *dec_cnt,
u_int32_t *same_cnt, u_int32_t *inc_cnt, int *timeout, int
*dupack,
int is_c2stest) {
@@ -95,80 +95,33 @@
index = -1;
// log
- fp = fopen(get_logfile(), "a");
- if (fp == NULL) {
- log_println(
- 0,
- "Unable to open log file '%s', continuing
on without logging",
- get_logfile());
- } else {
- // also print the percentage of the speed w.r.t total
speed bin counter
- fprintf(fp, "spds[%d] = '%s' max=%d [%0.2f%%]\n", n,
spds[n], max,
+ log_println(0, "spds[%d] = '%s' max=%d [%0.2f%%]\n", n,
spds[n], max,
(float) max * 100 / total);
- fclose(fp);
- }
// Assign values based on whether C2S or S2C test
// Note: spd[0] , [1] contains C->S test results
// spd[2] , spd [3] contains S->C test results
switch (n + (is_c2stest ? 0 : 2)) {
case 0:
- *c2sdata = index;
+ *c2s_linkspeed_data = index;
log_print(log_lvl_heur, "Client --> Server data detects
link = ");
break;
case 1:
- *c2sack = index;
+ *c2s_linkspeed_ack = index;
log_print(log_lvl_heur, "Client <-- Server Ack's detect
link = ");
break;
case 2:
- *s2cdata = index;
+ *s2c_linkspeed_data = index;
log_print(log_lvl_heur, "Server --> Client data detects
link = ");
break;
case 3:
- *s2cack = index;
+ *s2c_linkspeed_ack = index;
log_print(1, "Server <-- Client Ack's detect link =
");
break;
}
// classify link speed based on the max ifspeed seen
- switch (index) {
- case -1:
- log_println(1, "System Fault");
- break;
- case 0:
- log_println(1, "RTT");
- break;
- case 1:
- log_println(1, "Dial-up");
- break;
- case 2:
- log_println(1, "T1");
- break;
- case 3:
- log_println(1, "Ethernet");
- break;
- case 4:
- log_println(1, "T3");
- break;
- case 5:
- log_println(1, "FastEthernet");
- break;
- case 6:
- log_println(1, "OC-12");
- break;
- case 7:
- log_println(1, "Gigabit Ethernet");
- break;
- case 8:
- log_println(1, "OC-48");
- break;
- case 9:
- log_println(1, "10 Gigabit Enet");
- break;
- case 10:
- log_println(1, "Retransmissions");
- break;
- }
+ log_linkspeed(index);
} //end section to determine speed.
} //end method calc_linkspeed
@@ -203,7 +156,7 @@
* downward congestion window adjustments due to all
* forms of congestion signals
* @param pktsout total number Txed segments
- * @param c2sdatalinkspd Integer indicative of link speed, ad collected in the C->S test
+ * @param c2sdatalinkspd Integer indicative of link speed, as collected in the C->S test
* @return packet loss value
* */
double calc_packetloss(int congsnsignals, int pktsout, int c2sdatalinkspd) {
@@ -245,7 +198,7 @@
* @param packetloss Packet loss
* @return maximum theoretical bandwidth
* */
-double calc_max_theoretical_thruput(int currentMSS, double rttsec,
+double calc_max_theoretical_throughput(int currentMSS, double rttsec,
double packetloss) {
double maxthruput;
maxthruput = (currentMSS / (rttsec * sqrt(packetloss))) * BITS_8 / KILO_BITS
@@ -367,7 +320,7 @@
* @param totaltime Total test time in microseconds
* @return Actual throughput
*/
-double calc_real_thruput(int DataBytesOut, int totaltime) {
+double calc_real_throughput(int DataBytesOut, int totaltime) {
double realthruput = ((double) DataBytesOut / (double) totaltime) * BITS_8;
log_println(log_lvl_heur, "--Actual observed throughput: %f ", realthruput);
return realthruput;
@@ -395,7 +348,7 @@
* @param s2ctestresult throughput calculated by the s2c tests
* @return 1 (true) if midboxs2cspd > s2cspd, else 0.
*/
-int is_limited_cwnd_thruput_better(int midboxs2cspd, int s2cspd) {
+int is_limited_cwnd_throughput_better(int midboxs2cspd, int s2cspd) {
int thruputmismatch = 0;
if (midboxs2cspd > s2cspd)
thruputmismatch = 1;
@@ -412,7 +365,7 @@
* @param s2ctestresult throughput calculated by the c2s tests
* @return 1 (true) if c2stestresult > s2ctestresult, else 0.
*/
-int is_c2s_thruputbetter(int c2stestresult, int s2ctestresult) {
+int is_c2s_throughputbetter(int c2stestresult, int s2ctestresult) {
int c2sbetter_yes = 0;
if (c2stestresult > s2ctestresult)
c2sbetter_yes = 1;
@@ -462,7 +415,7 @@
&& (maxsstartthresh > 0) // max slow start threshold
> 0
&& (idleRTO > .01) // cumulative RTO time > 1% test duration
&& (link > 2) // not wireless link
- && is_limited_cwnd_thruput_better(midboxspd, s2cspd) //S->C throughput calculated
+ && is_limited_cwnd_throughput_better(midboxspd, s2cspd) //S->C throughput calculated
// by server < client value
&& isNotMultipleTestMode(multiple)) {
=======================================
--- /branches/kkumar_code_organize/src/heuristics.h Mon Oct 17 06:43:25
2011
+++ /branches/kkumar_code_organize/src/heuristics.h Tue Oct 18 09:01:08
2011
@@ -24,7 +24,7 @@
double calc_packets_outoforder(int dupackcount, int actualackcount);
// calculate theoretical maximum goodput in bits
-double calc_max_theoretical_thruput(int currentMSS, double rttsec,
+double calc_max_theoretical_throughput(int currentMSS, double rttsec,
double packetloss);
// finalize some window sizes
@@ -48,17 +48,17 @@
double calc_sendlimited_sndrfault(int SndLimTimeSender, int totaltime);
// Calculate actual throughput in Mbps
-double calc_real_thruput(int DataBytesOut, int totaltime);
+double calc_real_throughput(int DataBytesOut, int totaltime);
// Calculate total time spent waiting for packets to arrive
double cal_totalwaittime(int currentRTO, int timeoutcounters);
// Is throughput measured greater in value during the C->S than S->C test?
-int is_c2s_thruputbetter(int c2stestresult, int s2ctestresult);
+int is_c2s_throughputbetter(int c2stestresult, int s2ctestresult);
// Check if the S->C throughput computed with a limited
// cwnd value throughput test is better than that calculated by the S->C test.
-int is_limited_cwnd_thruput_better(int midboxs2cspd, int s2cspd);
+int is_limited_cwnd_throughput_better(int midboxs2cspd, int s2cspd);
// Is Multiple test mode enabled?
int isNotMultipleTestMode(int multiple);
=======================================
--- /branches/kkumar_code_organize/src/logging.c Mon Oct 17 06:43:25
2011
+++ /branches/kkumar_code_organize/src/logging.c Tue Oct 18 09:01:08
2011
@@ -22,6 +22,7 @@
#include "logging.h"
#include "testoptions.h"
#include "strlutils.h"
+#include "utils.h"
static int _debuglevel = 0;
static char* _programname = "";
@@ -1014,3 +1015,50 @@
I2AddrFree(sockAddr);
}
+
+/**
+ * Debug log link speed.
+ *
+ * @param index Integral link speed indicator
+ *
+ */
+void log_linkspeed(int index) {
+ switch (index) {
+ case DATA_RATE_SYSTEM_FAULT:
+ log_println(1, "System Fault");
+ break;
+ case DATA_RATE_RTT:
+ log_println(1, "RTT");
+ break;
+ case DATA_RATE_DIAL_UP:
+ log_println(1, "Dial-up");
+ break;
+ case DATA_RATE_T1:
+ log_println(1, "T1");
+ break;
+ case DATA_RATE_ETHERNET:
+ log_println(1, "Ethernet");
+ break;
+ case DATA_RATE_T3:
+ log_println(1, "T3");
+ break;
+ case DATA_RATE_FAST_ETHERNET:
+ log_println(1, "FastEthernet");
+ break;
+ case DATA_RATE_OC_12:
+ log_println(1, "OC-12");
+ break;
+ case DATA_RATE_GIGABIT_ETHERNET:
+ log_println(1, "Gigabit Ethernet");
+ break;
+ case DATA_RATE_OC_48:
+ log_println(1, "OC-48");
+ break;
+ case DATA_RATE_10G_ETHERNET:
+ log_println(1, "10 Gigabit Enet");
+ break;
+ case DATA_RATE_RETRANSMISSIONS:
+ log_println(1, "Retransmissions");
+ break;
+ }
+}
=======================================
--- /branches/kkumar_code_organize/src/logging.h Mon Oct 17 06:43:25
2011
+++ /branches/kkumar_code_organize/src/logging.h Tue Oct 18 09:01:08
2011
@@ -60,7 +60,7 @@
char c2s_ndttrace[FILENAME_SIZE]; // C->S NDT trace file name, changed to 256 to avoid truncation
char s2c_snaplog[FILENAME_SIZE]; // S->C test Snaplog file name, changed to 256 to avoid truncation
char s2c_ndttrace[FILENAME_SIZE]; // S->C NDT trace file name, changed to 256 to avoid truncation
- char CPU_time[64]; // CPU time file
+ char CPU_time[FILENAME_SIZE]; // CPU time file
char summary[256]; // Summary data
char date[32]; // Date and,
char time[16]; // time
@@ -69,7 +69,7 @@
char client_name[64]; // client's host-name
char client_os[32]; // client OS name
char client_browser[32]; // client's browser name
- int ctl_port; // ? todo map use
+ int ctl_port; // ctl port
char server_ip[64]; // server IP address
char server_name[64]; // server's host-name
char server_os[32]; // server os name
@@ -78,11 +78,9 @@
};
void set_protologdir(char* dirname);
-//void set_protologfile(char* ipaddress);
void set_protologfile(char* client_ip, char *protologfileparam);
char* get_protologfile();
char* get_protologdir();
-//char *createprotologfilename (char* textappendarg);
void enableprotocollogging();
char *createprotologfilename(char* client_ip, char* textappendarg);
void create_named_logdir(char *dirnamedestarg, int destnamearrsize,
@@ -90,6 +88,7 @@
void create_client_logdir(struct sockaddr *cliaddrarg, socklen_t clilenarg,
char *dirnamedestarg, int destnamearrsize, char *finalsuffix,
int finalsuffixsize);
+void log_linkspeed(int index);
void protolog_printgeneric(const char* key, const char* val);
void protolog_status(int pid, enum TEST_ID testid,
=======================================
--- /branches/kkumar_code_organize/src/ndt_odbc.c Mon Oct 17 06:43:25
2011
+++ /branches/kkumar_code_organize/src/ndt_odbc.c Tue Oct 18 09:01:08
2011
@@ -258,8 +258,8 @@
int DataBytesOut, int SndLimTransRwin, int SndLimTransCwnd,
int SndLimTransSender, int MaxSsthresh, int CurrentRTO,
int CurrentRwinRcvd, int link, int mismatch, int bad_cable,
- int half_duplex, int congestion, int c2sdata, int c2sack, int
s2cdata,
- int s2cack, int CongestionSignals, int PktsOut, int MinRTT,
+ int half_duplex, int congestion, int c2s_linkspeed_data, int c2s_linkspeed_ack, int s2c_linkspeed_data,
+ int s2c_linkspeed_ack, int CongestionSignals, int PktsOut,
int MinRTT,
int RcvWinScale, int autotune, int CongAvoid, int
CongestionOverCount,
int MaxRTT, int OtherReductions, int CurTimeoutCount,
int AbruptTimeouts, int SendStall, int SlowStart,
@@ -294,8 +294,8 @@
Sndbuf, MaxCwnd, SndLimTimeRwin, SndLimTimeCwnd,
SndLimTimeSender,
DataBytesOut, SndLimTransRwin, SndLimTransCwnd,
SndLimTransSender,
MaxSsthresh, CurrentRTO, CurrentRwinRcvd, link,
mismatch,
- bad_cable, half_duplex, congestion, c2sdata, c2sack,
s2cdata,
- s2cack, CongestionSignals, PktsOut, MinRTT,
RcvWinScale,
+ bad_cable, half_duplex, congestion, c2s_linkspeed_data, c2s_linkspeed_ack, s2c_linkspeed_data,
+ s2c_linkspeed_ack, CongestionSignals, PktsOut,
MinRTT, RcvWinScale,
autotune, CongAvoid, CongestionOverCount, MaxRTT,
OtherReductions,
CurTimeoutCount, AbruptTimeouts, SendStall, SlowStart,
SubsequentTimeouts, ThruBytesAcked, minPeak, maxPeak,
peaks
=======================================
--- /branches/kkumar_code_organize/src/testoptions.c Mon Oct 17 06:43:25 2011
+++ /branches/kkumar_code_organize/src/testoptions.c Tue Oct 18 09:01:08 2011
@@ -1,7 +1,7 @@
/**
* This file contains the functions needed to handle various tests.
*
- * Jakub S�awi�ski 2006-06-24
+ * Jakub S�awi�ski 2006-06-24
*
*/
@@ -20,15 +20,6 @@
#include "runningtest.h"
#include "strlutils.h"
-int mon_pipe1[2]; // used to store file descriptors of pipes created for ndttrace for C2S tests
-int mon_pipe2[2]; // used to store file descriptors of pipes created for ndttrace data in S2c test
-
-// Snap log characteristics
-typedef struct snapArgs {
- web100_snapshot* snap; // web_100 snapshot indicator
- web100_log* log; // web_100 log
- int delay; // periodicity, in ms, of collecting snap
-} SnapArgs;
// Worker thread characteristics used to record snaplog and Cwnd peaks
typedef struct workerArgs {
@@ -38,23 +29,13 @@
int writeSnap; // enable writing snaplog
} WorkerArgs;
-static int workerLoop = 0; // semaphore
-static pthread_mutex_t mainmutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_cond_t maincond = PTHREAD_COND_INITIALIZER;
+int workerLoop = 0;
+pthread_mutex_t mainmutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t maincond = PTHREAD_COND_INITIALIZER;
static int slowStart = 1;
static int prevCWNDval = -1;
static int decreasing = 0;
-// error codes used to indicate status of test runs
-static const int LISTENER_SOCKET_CREATE_FAILED = -1;
-static const int SOCKET_CONNECT_TIMEOUT = -100;
-static const int RETRY_EXCEEDED_WAITING_CONNECT = -101;
-static const int RETRY_EXCEEDED_WAITING_DATA = -102;
-static const int SOCKET_STATUS_FAILED = -1;
-
-//other constants
-static const int ETHERNET_MTU_SIZE = 1456;
-
/**
* Count the CWND peaks from a snapshot and record the minimal and maximum one.
* Also record the number of transitions between increasing or decreasing
@@ -181,7 +162,6 @@
} else {
memset(tmpbuff, 0, 16);
sprintf(tmpbuff, " %d", test_id);
- //strcat(buff, tmpbuff);
strlcat(buff, tmpbuff, 16); //setting buffsize= 16 as is initialized in main()
}
}
@@ -268,14 +248,15 @@
* @param web100_agent Agent
* @param snaplogenabled Is snap logging enabled?
* @param workerlooparg integer used to syncronize writing/reading from snaplog/web100 snapshot
- * @param wrkrthreadidarg Thread Id of worker
+ * @param wrkrthreadidarg Thread Id of workera
* @param metafilevariablename Which variable of the meta file gets assigned the snaplog name (unused now)
* @param metafilename value of metafile name
* @param web100_connection connection pointer
* @param web100_group group web100_group pointer
*/
void start_snap_worker(SnapArgs *snaparg, web100_agent *agentarg,
- char snaplogenabled, int *workerlooparg, pthread_t
*wrkrthreadidarg,
+ //char snaplogenabled, int *workerlooparg, pthread_t
*wrkrthreadidarg,
+ char snaplogenabled, pthread_t *wrkrthreadidarg, // newfile
change
char *metafilevariablename, char *metafilename,
web100_connection* conn,
web100_group* group) {
FILE *fplocal;
@@ -316,7 +297,7 @@
}
pthread_mutex_lock(&mainmutex);
- *workerlooparg = 1;
+ workerLoop= 1;
// obtain web100 snap into "snaparg.snap"
web100_snap(snaparg->snap);
if (snaplogenabled) {
@@ -415,7 +396,8 @@
int i;
for (i = 0; i < RETRY_COUNT; i++) {
- retval = write(mon_pipe1[1], "c", 1);
+ //retval = write(mon_pipe1[1], "c", 1);
+ retval = write(monpipe_arr[1], "c", 1);
if (retval == 1)
break;
if ((retval == -1) && (errno == EINTR))
@@ -480,1202 +462,3 @@
}
return recclog;
}
-
-/**
- * Perform the Middlebox test. This is a brief throughput test from the Server to the Client
- * with a limited CWND to check for a duplex mismatch condition.
- * This test also uses a pre-defined MSS value to check if any intermediate node
- * is modifying connection settings.
- *
- * @param ctlsockfd Client control socket descriptor
- * @param agent Web100 agent used to track the connection
- * @param options Test options
- * @param s2c_throughput_mid In-out parameter for S2C throughput results (evaluated by the MID TEST),
- * @param conn_options Connection options
- * @return 0 - success,
- * >0 - error code.
- * Error codes:
- * -1 - Listener socket creation failed
- * -3 - web100 connection data not obtained
- * -100 - timeout while waiting for client to connect to serverÕs ephemeral port
- * -errno- Other specific socket error numbers
- * -101 - Retries exceeded while waiting for
client to connect
- * -102 - Retries exceeded while waiting for
data from connected client
- * Other used return codes:
- * 1 - Message reception errors/inconsistencies
- * 2 - Unexpected message type received/no message received due to timeout
- * 3 Ð Received message is invalid
- *
- */
-
-int test_mid(int ctlsockfd, web100_agent* agent, TestOptions* options,
- int conn_options, double* s2c_throughput_mid) {
- int maxseg = ETHERNET_MTU_SIZE;
- /* int maxseg=1456, largewin=16*1024*1024; */
- /* int seg_size, win_size; */
- int midsfd; // socket file-descriptor, used in mid-box throughput test from S->C
- int j; // temporary integer store
- int msgretvalue; // return value from socket read/writes
- struct sockaddr_storage cli_addr;
- /* socklen_t optlen, clilen; */
- socklen_t clilen;
- char buff[BUFFSIZE + 1]; // buf used for message payload
-I2Addr midsrv_addr = NULL; // server address
- char listenmidport[10]; // listener socket for middlebox tests
- int msgType;
- int msgLen;
- web100_connection* conn;
- char tmpstr[256]; // temporary string storage
- struct timeval sel_tv; // time
- fd_set rfd; // receiver file descriptor
-
- // variables used for protocol validation logging
- enum TEST_ID thistestId = NONE;
- enum TEST_STATUS_INT teststatusnow = TEST_NOT_STARTED;
- enum PROCESS_STATUS_INT procstatusenum = PROCESS_STARTED;
- enum PROCESS_TYPE_INT proctypeenum = CONNECT_TYPE;
-
- assert(ctlsockfd != -1);
- assert(agent);
- assert(options);
- assert(s2c_throughput_mid);
-
- if (options->midopt) { // middlebox tests need to be run.
-
- // Start with readying up (initializing)
- setCurrentTest(TEST_MID);
- log_println(1, " <-- %d - Middlebox test -->",
options->child0);
-
- // protocol validation logs indicating start of tests
- printf(" <--- %d - Middlebox test --->", options->child0);
- thistestId = MIDDLEBOX;
- teststatusnow = TEST_STARTED;
- protolog_status(options->child0, thistestId, teststatusnow);
-
- // determine port to be used. Compute based on options set
earlier
- // by reading from config file, or use default port3 (3003),
- //strcpy(listenmidport, PORT3);
- strlcpy(listenmidport, PORT3, sizeof(listenmidport));
-
- if (options->midsockport) {
- sprintf(listenmidport, "%d", options->midsockport);
- } else if (options->mainport) {
- sprintf(listenmidport, "%d", options->mainport + 2);
- }
-
- if (options->multiple) {
- //strcpy(listenmidport, "0");
- strlcpy(listenmidport, "0", sizeof(listenmidport));
- }
-
- /* RAC debug */
- /*
- if (KillHung() == 0)
- log_println(5, "KillHung() returned 0, should have tried to kill off some LastAck process");
- else
- log_println(5, "KillHung(): returned non-0 response, nothing to kill or kill failed");
- */
-
- while (midsrv_addr == NULL) {
-
- // attempt to bind to a new port and obtain address structure with details of listening port
-
- midsrv_addr =
- CreateListenSocket(
- NULL,
- (options->multiple ?
-
mrange_next(listenmidport) : listenmidport), conn_options, 0)
- ;
- if (midsrv_addr == NULL) {
- /*
- log_println(5, " Calling KillHung() because midsrv_address failed to bind");
- if (KillHung() == 0)
- continue;
- */
- }
- if (strcmp(listenmidport, "0") == 0) {
- log_println(0, "WARNING: ephemeral port number was
bound");
- break;
- }
- if (options->multiple == 0) { // simultaneous tests from multiple clients not allowed, quit now
- break;
- }
- }
-
- if (midsrv_addr == NULL) {
- log_println(0,
- "Server (Middlebox test):
CreateListenSocket failed: %s",
- strerror(errno));
- sprintf(buff,
- "Server (Middlebox test):
CreateListenSocket failed: %s",
- strerror(errno));
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- return -1;
- }
-
- // get socket FD and the ephemeral port number that client will connect to
- options->midsockfd = I2AddrFD(midsrv_addr);
- options->midsockport = I2AddrPort(midsrv_addr);
- log_println(1, " -- port: %d", options->midsockport);
-
- // send this port number to client
- sprintf(buff, "%d", options->midsockport);
- if ((msgretvalue = send_msg(ctlsockfd, TEST_PREPARE, buff,
strlen(buff)))
- < 0)
- return msgretvalue;
-
- /* set mss to 1456 (strange value), and large snd/rcv buffers
- * should check to see if server supports window scale ?
- */
- setsockopt(options->midsockfd, SOL_TCP, TCP_MAXSEG, &maxseg,
- sizeof(maxseg));
-
- /* Post a listen on port 3003. Client will connect here to
run the
- * middlebox test. At this time it really only checks the
MSS value
- * and does NAT detection. More analysis functions (window
scale)
- * will be done in the future.
- */
- clilen = sizeof(cli_addr);
-
- // Wait on listening socket and read data once ready.
- // Choose a retry count of "5" to wait for activity on the
socket
- FD_ZERO(&rfd);
- FD_SET(options->midsockfd, &rfd);
- sel_tv.tv_sec = 5;
- sel_tv.tv_usec = 0;
- for (j = 0; j < RETRY_COUNT; j++) {
- msgretvalue = select((options->midsockfd) + 1, &rfd,
NULL, NULL,
- &sel_tv);
- if ((msgretvalue == -1) && (errno == EINTR)) // socket interruption. continue waiting for activity on socket
- continue;
- if (msgretvalue == 0) // timeout
- return SOCKET_CONNECT_TIMEOUT;
- if (msgretvalue < 0) // other socket errors, exit
- return -errno;
- if (j == 4) // retry exceeded. Quit
- return RETRY_EXCEEDED_WAITING_CONNECT;
-
- midfd:
- // if a valid connection request is received, client has connected. Proceed.
- // Note the new socket fd used in the throughput test
is this (midsfd)
- if ((midsfd = accept(options->midsockfd,
- (struct sockaddr *) &cli_addr, &clilen))
> 0) {
- // log protocol validation indicating client
connection
- procstatusenum = PROCESS_STARTED;
- proctypeenum = CONNECT_TYPE;
- protolog_procstatus(options->child0,
thistestId, proctypeenum,
- procstatusenum);
- break;
- }
-
- if ((midsfd == -1) && (errno == EINTR)) // socket interrupted, wait some more
- goto midfd;
-
- sprintf(
- tmpstr,
- "------- middlebox connection setup
returned because (%d)",
- errno);
- if (get_debuglvl() > 1)
- perror(tmpstr);
- if (midsfd < 0)
- return -errno;
- if (j == 4)
- return RETRY_EXCEEDED_WAITING_DATA;
- }
-
- // get meta test details copied into results
- memcpy(&meta.c_addr, &cli_addr, clilen);
- /* meta.c_addr = cli_addr; */
- meta.family = ((struct sockaddr *) &cli_addr)->sa_family;
-
- buff[0] = '\0';
- // get web100 connection data
- if ((conn = web100_connection_from_socket(agent, midsfd)) ==
NULL) {
- log_println(
- 0,
- "!!!!!!!!!!! test_mid() failed to get
web100 connection data, rc=%d",
- errno);
- /* exit(-1); */
- return -3;
- }
-
- // Perform S->C throughput test. Obtained results in "buff"
- web100_middlebox(midsfd, agent, conn, buff);
-
- // Transmit results in the form of a TEST_MSG message
- send_msg(ctlsockfd, TEST_MSG, buff, strlen(buff));
-
- // Expect client to send throughput as calculated at its end
-
- msgLen = sizeof(buff);
- if (recv_msg(ctlsockfd, &msgType, buff, &msgLen)) { // message reception error
- log_println(0, "Protocol error!");
- sprintf(
- buff,
- "Server (Middlebox test): Invalid CWND
limited throughput received");
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- return 1;
- }
- if (check_msg_type("Middlebox test", TEST_MSG, msgType, buff, msgLen)) { // only TEST_MSG type valid
- sprintf(
- buff,
- "Server (Middlebox test): Invalid CWND
limited throughput received");
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- return 2;
- }
- if (msgLen <= 0) { // received message's length has to be a
valid one
- log_println(0, "Improper message");
- sprintf(
- buff,
- "Server (Middlebox test): Invalid CWND
limited throughput received");
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- return 3;
- }
-
- // message payload from client == midbox S->c throughput
- buff[msgLen] = 0;
- *s2c_throughput_mid = atof(buff);
- log_println(4, "CWND limited throughput = %0.0f kbps (%s)",
- *s2c_throughput_mid, buff);
-
- // finalize the midbox test ; disabling socket used for throughput test and closing out both sockets
- shutdown(midsfd, SHUT_WR);
- close(midsfd);
- close(options->midsockfd);
- send_msg(ctlsockfd, TEST_FINALIZE, "", 0);
- log_println(1, " <--------- %d ----------->",
options->child0);
-
- printf(" <--- %d - Middlebox test --->", options->child0);
-
- // log end of test into protocol doc, just to delimit.
- teststatusnow = TEST_ENDED;
- //protolog_status(1, options->child0, thistestId,
teststatusnow);
- protolog_status(options->child0, thistestId, teststatusnow);
-
- setCurrentTest(TEST_NONE);
- /* I2AddrFree(midsrv_addr); */
- }
- /* I2AddrFree(midsrv_addr); */
- return 0;
-}
-
-/**
- * Perform the C2S Throughput test. This test intends to measure throughput
- * from the client to the server by performing a 10 seconds memory-to-memory data transfer.
- *
- * Protocol messages are exchanged between the Client and the Server using the same
- * connection and message format as the NDTP-Control protocol.Throughput packets are
- * sent on the new connection and do not follow the NDTP-Control protocol message format.
- *
- * When the Client stops streaming the test data (or the server test routine times out),
- * the Server sends the Client its calculated throughput value.
- *
- * @param ctlsockfd Client control socket descriptor
- * @param agent Web100 agent used to track the connection
- * @param testOptions Test options
- * @param conn_options connection options
- * @param c2sspd In-out parameter to store C2S throughput value
- * @param set_buff enable setting TCP send/recv buffer size to be used (seems unused in file)
- * @param window value of TCP send/rcv buffer size intended to be used.
- * @param autotune autotuning option. Deprecated.
- * @param device string devine name inout parameter
- * @param options Test Option variables
- * @param record_reverse integer indicating whether receiver-side statistics have to be logged
- * @param count_vars count of web100 variables
- * @param spds[] [] speed check array
- * @param spd_index index used for speed check array
- * @param conn_options Connection options
- * @return 0 - success,
- * >0 - error code
- * Error codes:
- * -1 - Listener socket creation failed
- * -100 - timeout while waiting for client to connect to serverÕs ephemeral port
- * -errno - Other specific socket error numbers
- * -101 - Retries exceeded while waiting for client to
connect
- * -102 - Retries exceeded while waiting for data from
connected client
- *
- */
-
-int test_c2s(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
- int conn_options, double* c2sspd, int set_buff, int window,
- int autotune, char* device, Options* options, int
record_reverse,
- int count_vars, char spds[4][256], int* spd_index) {
- int recvsfd; // receiver socket file descriptor
- pid_t c2s_childpid = 0; // child process pids
- int msgretvalue, tmpbytecount; // used during the "read"/"write"
process
- int i, j; // used as loop iterators
-
- struct sockaddr_storage cli_addr;
-
- socklen_t clilen;
- char tmpstr[256]; // string array used for all sorts of temp storage purposes
- double tmptime; // time indicator
- double bytes_read = 0; // number of bytes read during the throughput
tests
- struct timeval sel_tv; // time
- fd_set rfd; // receive file descriptor
- char buff[BUFFSIZE + 1]; // message "payload" buffer
-PortPair pair; // socket ports
- I2Addr c2ssrv_addr = NULL; // c2s test's server address
- //I2Addr src_addr=NULL; // c2s test source address
- char listenc2sport[10]; // listening port
- pthread_t workerThreadId;
-
- // web_100 related variables
- web100_group* group;
- web100_connection* conn;
-
- // snap related variables
- SnapArgs snapArgs;
- snapArgs.snap = NULL;
- snapArgs.log = NULL;
- snapArgs.delay = options->snapDelay;
- wait_sig = 0;
-
- // Test ID and status descriptors
- enum TEST_ID testids = C2S;
- enum TEST_STATUS_INT teststatuses = TEST_NOT_STARTED;
- enum PROCESS_STATUS_INT procstatusenum = UNKNOWN;
- enum PROCESS_TYPE_INT proctypeenum = CONNECT_TYPE;
- char namesuffix[256] = "c2s_snaplog";
-
- if (testOptions->c2sopt) {
- setCurrentTest(TEST_C2S);
- log_println(1, " <-- %d - C2S throughput test -->",
- testOptions->child0);
- strlcpy(listenc2sport, PORT2, sizeof(listenc2sport));
-
- //log protocol validation logs
- teststatuses = TEST_STARTED;
- protolog_status(testOptions->child0, testids, teststatuses);
-
- // Determine port to be used. Compute based on options set
earlier
- // by reading from config file, or use default port2 (3002).
- if (testOptions->c2ssockport) {
- sprintf(listenc2sport, "%d",
testOptions->c2ssockport);
- } else if (testOptions->mainport) {
- sprintf(listenc2sport, "%d", testOptions->mainport +
1);
- }
-
- if (testOptions->multiple) {
- strlcpy(listenc2sport, "0", sizeof(listenc2sport));
- }
-
- // attempt to bind to a new port and obtain address structure with details of listening port
- while (c2ssrv_addr == NULL) {
- c2ssrv_addr =
- CreateListenSocket(
- NULL,
-
(testOptions->multiple ?
-
mrange_next(listenc2sport) : listenc2sport), conn_options, 0)
- ;
- if (strcmp(listenc2sport, "0") == 0) {
- log_println(0, "WARNING: ephemeral port number was
bound");
- break;
- }
- if (testOptions->multiple == 0) {
- break;
- }
- }
- if (c2ssrv_addr == NULL) {
- log_println(
- 0,
- "Server (C2S throughput test):
CreateListenSocket failed: %s",
- strerror(errno));
- sprintf(
- buff,
- "Server (C2S throughput test):
CreateListenSocket failed: %s",
- strerror(errno));
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- return -1;
- }
-
- // get socket FD and the ephemeral port number that client will connect to run tests
- testOptions->c2ssockfd = I2AddrFD(c2ssrv_addr);
- testOptions->c2ssockport = I2AddrPort(c2ssrv_addr);
- log_println(1, " -- port: %d", testOptions->c2ssockport);
- pair.port1 = testOptions->c2ssockport;
- pair.port2 = -1;
-
- log_println(
- 1,
- "listening for Inet connection on
testOptions->c2ssockfd, fd=%d",
- testOptions->c2ssockfd);
-
- log_println(
- 1,
- "Sending 'GO' signal, to tell client %d to head
for the next test",
- testOptions->child0);
- sprintf(buff, "%d", testOptions->c2ssockport);
-
- // send TEST_PREPARE message with ephemeral port detail, indicating start of tests
- if ((msgretvalue = send_msg(ctlsockfd, TEST_PREPARE, buff,
strlen(buff)))
- < 0)
- return msgretvalue;
-
- // Wait on listening socket and read data once ready.
- // Retry 5 times, waiting for activity on the socket
- clilen = sizeof(cli_addr);
- log_println(6, "child %d - sent c2s prepare to client",
- testOptions->child0);
- FD_ZERO(&rfd);
- FD_SET(testOptions->c2ssockfd, &rfd);
- sel_tv.tv_sec = 5;
- sel_tv.tv_usec = 0;
-
- for (j = 0; j < RETRY_COUNT; j++) {
- msgretvalue = select((testOptions->c2ssockfd) + 1,
&rfd, NULL, NULL,
- &sel_tv);
- if ((msgretvalue == -1) && (errno == EINTR)) // socket interrupted. continue waiting for activity on socket
- continue;
- if (msgretvalue == 0) // timeout
- return -SOCKET_CONNECT_TIMEOUT;
- if (msgretvalue < 0) // other socket errors. exit
- return -errno;
- if (j == (RETRY_COUNT - 1)) // retry exceeded. exit
- return -RETRY_EXCEEDED_WAITING_CONNECT;
- recfd:
-
- // If a valid connection request is received, client has connected. Proceed.
- // Note the new socket fd - recvsfd- used in the
throughput test
- recvsfd = accept(testOptions->c2ssockfd,
- (struct sockaddr *) &cli_addr,
&clilen);
- if (recvsfd > 0) {
- log_println(6, "accept() for %d completed",
- testOptions->child0);
-
- // log protocol validation indicating client
accept
- procstatusenum = PROCESS_STARTED;
- proctypeenum = CONNECT_TYPE;
- protolog_procstatus(testOptions->child0,
testids, proctypeenum,
- procstatusenum);
- break;
- }
- if ((recvsfd == -1) && (errno == EINTR)) { // socket interrupted, wait some more
- log_println(
- 6,
- "Child %d interrupted while
waiting for accept() to complete",
- testOptions->child0);
- goto recfd;
- }
- log_println(
- 6,
- "------- C2S connection setup for %d
returned because (%d)",
- testOptions->child0, errno);
- if (recvsfd < 0) { // other socket errors, quit
- return -errno;
- }
- if (j == (RETRY_COUNT - 1)) { // retry exceeded, quit
- log_println(
- 6,
- "c2s child %d, uable to open
connection, return from test",
- testOptions->child0);
- return RETRY_EXCEEDED_WAITING_DATA;
- }
- }
-
- // Get address associated with the throughput test. Used for packet tracing
- log_println(6, "child %d - c2s ready for test with fd=%d",
- testOptions->child0, recvsfd);
-
- // commenting out below to move to init_pkttrace function
- // src_addr = I2AddrByLocalSockFD(get_errhandle(), recvsfd,
0);
-
- // Get web100 connection. Used to collect web100 variable
statistics
- conn = web100_connection_from_socket(agent, recvsfd);
-
- // set up packet tracing. Collected data is used for bottleneck link calculations
- if (getuid() == 0) {
-
- pipe(mon_pipe1);
- log_println(0, "C2S test calling pkt_trace_start() with
pd=%d",
- clilen);
- start_packet_trace(recvsfd, testOptions->c2ssockfd,
&c2s_childpid,
- mon_pipe1, (struct sockaddr *)
&cli_addr, clilen, device,
- &pair, "c2s", options->compress,
meta.c2s_ndttrace);
- log_println(3, "--tracefile after packet_trace %s",
- meta.c2s_ndttrace);
- }
-
- log_println(5, "C2S test Parent thinks pipe() returned fd0=%d,
fd1=%d",
- mon_pipe1[0], mon_pipe1[1]);
-
- // experimental code, delete when finished
- setCwndlimit(conn, group, agent, options);
-
- // Create C->S snaplog directories, and perform some initialization based on options
-
- create_client_logdir((struct sockaddr *) &cli_addr, clilen,
- options->c2s_logname,
sizeof(options->c2s_logname), namesuffix,
- sizeof(namesuffix));
-
- sleep(2);
-
- // send empty TEST_START indicating start of the test
- send_msg(ctlsockfd, TEST_START, "", 0);
- /* alarm(30); *//* reset alarm() again, this 10 sec test should finish before this signal
- * is generated. */
-
- // If snaplog recording is enabled, update meta file to
indicate the same
- // and proceed to get snapshot and log it. For the C2S test,
the
- // snapshot is not needed any further, and hence it is valid
to move the
- // obtaining of a snapshot based on options->snaplog!
- if (options->snaplog) {
- memcpy(meta.c2s_snaplog, namesuffix,
strlen(namesuffix));
- // somewhat a hack - meta file stores names without
the full directory
- // but fopen needs full path
- start_snap_worker(&snapArgs, agent, options->snaplog,
&workerLoop,
- &workerThreadId, meta.c2s_snaplog,
options->c2s_logname,
- conn, group);
- }
-
- // Wait on listening socket and read data once ready.
- tmptime = secs();
- sel_tv.tv_sec = 11; // time out after 11 seconds
- sel_tv.tv_usec = 0;
- FD_ZERO(&rfd);
- FD_SET(recvsfd, &rfd);
- for (;;) {
- msgretvalue = select(recvsfd + 1, &rfd, NULL, NULL,
&sel_tv);
- if ((msgretvalue == -1) && (errno == EINTR)) {
- // socket interrupted. Continue waiting for
activity on socket
- continue;
- }
- if (msgretvalue > 0) { // read from socket
- tmpbytecount = read(recvsfd, buff,
sizeof(buff));
- if ((tmpbytecount == -1) && (errno == EINTR)) // read interrupted,continue waiting
- continue;
- if (tmpbytecount == 0) // all data has been
read
- break;
- bytes_read += tmpbytecount; // data byte
count has to be increased
- continue;
- }
- break;
- }
-
- tmptime = secs() - tmptime;
- // throughput in kilo bits per sec = (transmitted_byte_count * 8) / (time_duration)*(1000)
- *c2sspd = (8.e-3 * bytes_read) / tmptime;
-
- // c->s throuput value calculated and assigned ! Release resources, conclude snap writing.
- stop_snap_worker(&workerThreadId, options->snaplog,
&snapArgs);
-
- // send the server calculated value of C->S throughput as result to client
- sprintf(buff, "%6.0f kbps outbound for child %d", *c2sspd,
- testOptions->child0);
- log_println(1, "%s", buff);
- sprintf(buff, "%0.0f", *c2sspd);
- send_msg(ctlsockfd, TEST_MSG, buff, strlen(buff));
-
- // get receiver side Web100 stats and write them to the log file. close sockets
- if (record_reverse == 1)
- web100_get_data_recv(recvsfd, agent, conn,
count_vars);
-
- close(recvsfd);
- close(testOptions->c2ssockfd);
-
- // Next, send speed-chk a flag to retrieve the data it
collected.
- // Skip this step if speed-chk isn't running.
-
- if (getuid() == 0) {
- log_println(1, "Signal USR1(%d) sent to child [%d]",
SIGUSR1,
- c2s_childpid);
- testOptions->child1 = c2s_childpid;
- kill(c2s_childpid, SIGUSR1);
- FD_ZERO(&rfd);
- FD_SET(mon_pipe1[0], &rfd);
- sel_tv.tv_sec = 1;
- sel_tv.tv_usec = 100000;
- i = 0;
-
- for (;;) {
- msgretvalue = select(mon_pipe1[0] + 1, &rfd,
NULL, NULL,
- &sel_tv);
- if ((msgretvalue == -1) && (errno == EINTR))
- continue;
- if (((msgretvalue == -1) && (errno != EINTR))
- || (msgretvalue == 0)) {
- log_println(
- 4,
- "Failed to read pkt-pair
data from C2S flow, retcode=%d, reason=%d",
- msgretvalue, errno);
- sprintf(
- spds[(*spd_index)++],
- " -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 0.0 0 0 0 0 0 -1");
- sprintf(
- spds[(*spd_index)++],
- " -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 0.0 0 0 0 0 0 -1");
- break;
- }
- /* There is something to read, so get it from the pktpair child. If an interrupt occurs,
- * just skip the read and go on
- * RAC 2/8/10
- */
- if (msgretvalue > 0) {
- if ((msgretvalue = read(mon_pipe1[0],
spds[*spd_index], 128))
- < 0)
- sprintf(
-
spds[*spd_index],
- " -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 -1 -1 0.0 0 0 0 0 0 -1");
- log_println(1, "%d bytes read '%s' from
C2S monitor pipe",
- msgretvalue,
spds[*spd_index]);
- (*spd_index)++;
- if (i++ == 1)
- break;
- sel_tv.tv_sec = 1;
- sel_tv.tv_usec = 100000;
- continue;
- }
-
- }
- }
-
- // An empty TEST_FINALIZE message is sent to conclude the test
- send_msg(ctlsockfd, TEST_FINALIZE, "", 0);
-
- // Close opened resources for packet capture
- if (getuid() == 0) {
- stop_packet_trace(mon_pipe1);
- }
-
- // log end of C->S test
- log_println(1, " <----------- %d -------------->",
testOptions->child0);
- //protocol logs
- teststatuses = TEST_ENDED;
- //protolog_status(0,testOptions->child0, testids,
teststatuses);
- protolog_status(testOptions->child0, testids, teststatuses);
-
- //set current test status and free address
- setCurrentTest(TEST_NONE);
-
- }
-
- return 0;
-}
-
-/**
- * Perform the S2C Throughput test. This throughput test tests the achievable
- * network bandwidth from the Server to the Client by performing a 10 seconds
- * memory-to-memory data transfer.
- *
- * The Server also collects web100 data variables, that are sent to the Client
- * at the end of the test session.
- *
- * Protocol messages exchanged between the Client and Server
- * are sent using the same connection and message format as the NDTP-Control protocol.
- * The throughput packets are sent on the new connection, though, and do not
- * follow the NDTP-Control protocol message format.
- *
- * @param ctlsockfd - the client control socket descriptor
- * @param agent - the Web100 agent used to track the connection
- * @param testOptions - the test options
- * @param conn_options - the connection options
- * @param testOptions Test options
- * @param s2cspd In-out parameter to store C2S throughput value
- * @param set_buff enable setting TCP send/recv buffer size to be used (seems unused in file)
- * @param window value of TCP send/rcv buffer size intended to be used.
- * @param autotune autotuning option. Deprecated.
- * @param device string devine name inout parameter
- * @param options Test Option variables
- * @param spds[][] speed check array
- * @param spd_index index used for speed check array
- * @param count_vars count of web100 variables
- * @param peaks Cwnd peaks structure pointer
- *
- * @return 0 - success,
- * >0 - error code.
- * Error codes:
- * -1 - Message reception errors/inconsistencies in clientÕs final message, or Listener socket creation failed or cannot write message header information while attempting to send
- * TEST_PREPARE message
- * -2 - Cannot write message data while
attempting to send
- * TEST_PREPARE message, or Unexpected message type
received
- * -3 - Received message is invalid
- * -100 - timeout while waiting for client to connect to serverÕs ephemeral port
- * -101 - Retries exceeded while waiting for
client to connect
- * -102 - Retries exceeded while waiting for data from connected client
- * -errno - Other specific socket error numbers
- */
-
-int test_s2c(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
- int conn_options, double* s2cspd, int set_buff, int window,
- int autotune, char* device, Options* options, char
spds[4][256],
- int* spd_index, int count_vars, CwndPeaks* peaks) {
-
- int ret; // ctrl protocol read/write return status
- int j, k, n;
- int xmitsfd; // transmit (i.e server) socket fd
- pid_t s2c_childpid = 0; // s2c_childpid
-
- char tmpstr[256]; // string array used for temp storage of many char*
- struct sockaddr_storage cli_addr;
-
- socklen_t clilen;
- double bytes_written; // bytes written in the throughput test
- double tx_duration; // total time for which data was txed
- double tmptime; // temporary time store
- double x2cspd; // s->c test throuhput
- struct timeval sel_tv; // time
- fd_set rfd; // receive file descriptor
- char buff[BUFFSIZE + 1]; // message payload buffer
-int bufctrlattempts = 0; // number of buffer control attempts
- int i; // temporary var used for iterators etc
- PortPair pair; // socket ports
- I2Addr s2csrv_addr = NULL;
- char listens2cport[10];
- int msgType;
- int msgLen;
- int sndqueue;
- struct sigaction new, old;
-
- /* experimental code to capture and log multiple copies of the
- * web100 variables using the web100_snap() & log() functions.
- */
- web100_snapshot* tsnap = NULL;
- web100_snapshot* rsnap = NULL;
- web100_group* group;
- web100_group* tgroup;
- web100_group* rgroup;
- web100_connection* conn;
- web100_var* var;
- pthread_t workerThreadId;
- int nextseqtosend = 0, lastunackedseq = 0;
- int drainingqueuecount = 0, bufctlrnewdata = 0; // sent data attempt queue, Draining Queue.
-
- // variables used for protocol validation logs
- enum TEST_STATUS_INT teststatuses = TEST_NOT_STARTED;
- enum TEST_ID testids = S2C;
- enum PROCESS_STATUS_INT procstatusenum = UNKNOWN;
- enum PROCESS_TYPE_INT proctypeenum = CONNECT_TYPE;
- char snaplogsuffix[256] = "s2c_snaplog";
-
- SnapArgs snapArgs;
- snapArgs.snap = NULL;
- snapArgs.log = NULL;
- snapArgs.delay = options->snapDelay;
- wait_sig = 0;
-
- // Determine port to be used. Compute based on options set earlier
- // by reading from config file, or use default port2 (3003)
- if (testOptions->s2copt) {
- setCurrentTest(TEST_S2C);
- log_println(1, " <-- %d - S2C throughput test -->",
- testOptions->child0);
-
- //protocol logs
- teststatuses = TEST_STARTED;
- protolog_status(testOptions->child0, testids, teststatuses);
-
- strlcpy(listens2cport, PORT4, sizeof(listens2cport));
-
- if (testOptions->s2csockport) {
- sprintf(listens2cport, "%d",
testOptions->s2csockport);
- } else if (testOptions->mainport) {
- sprintf(listens2cport, "%d", testOptions->mainport +
2);
- }
-
- if (testOptions->multiple) {
- strlcpy(listens2cport, "0", sizeof(listens2cport));
- }
-
- // attempt to bind to a new port and obtain address structure with details of listening port
- while (s2csrv_addr == NULL) {
- s2csrv_addr =
- CreateListenSocket(
- NULL,
-
(testOptions->multiple ?
-
mrange_next(listens2cport) : listens2cport), conn_options, 0)
- ;
- if (s2csrv_addr == NULL) {
- /*
- log_println(1, " Calling KillHung() because s2csrv_address failed to bind");
- if (KillHung() == 0)
- continue;
- */
- }
- if (strcmp(listens2cport, "0") == 0) {
- log_println(0, "WARNING: ephemeral port number was
bound");
- break;
- }
- if (testOptions->multiple == 0) {
- break;
- }
- }
- if (s2csrv_addr == NULL) {
- log_println(
- 0,
- "Server (S2C throughput test):
CreateListenSocket failed: %s",
- strerror(errno));
- sprintf(
- buff,
- "Server (S2C throughput test):
CreateListenSocket failed: %s",
- strerror(errno));
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- return -1;
- }
-
- // get socket FD and the ephemeral port number that client will connect to run tests
- testOptions->s2csockfd = I2AddrFD(s2csrv_addr);
- testOptions->s2csockport = I2AddrPort(s2csrv_addr);
- log_println(1, " -- s2c %d port: %d", testOptions->child0,
- testOptions->s2csockport);
- pair.port1 = -1;
- pair.port2 = testOptions->s2csockport;
-
- // Data received from speed-chk. Send TEST_PREPARE "GO" signal with port number
- sprintf(buff, "%d", testOptions->s2csockport);
- j = send_msg(ctlsockfd, TEST_PREPARE, buff, strlen(buff));
- if (j == -1) {
- log_println(6, "S2C %d Error!, Test start message not
sent!",
- testOptions->child0);
- return j;
- }
- if (j == -2) { // could not write message data
- log_println(6, "S2C %d Error!, server port [%s] not
sent!",
- testOptions->child0, buff);
- return j;
- }
-
- // ok, await for connect on 3rd port
- // This is the second throughput test, with data streaming
from
- // the server back to the client. Again stream data for 10
seconds.
-
- log_println(1, "%d waiting for data on
testOptions->s2csockfd",
- testOptions->child0);
-
- clilen = sizeof(cli_addr);
- FD_ZERO(&rfd);
- FD_SET(testOptions->c2ssockfd, &rfd);
- sel_tv.tv_sec = 5; // wait for 5 secs
- sel_tv.tv_usec = 0;
- for (j = 0; j < RETRY_COUNT; j++) {
- ret = select((testOptions->s2csockfd) + 1, &rfd,
NULL, NULL,
- &sel_tv);
- if ((ret == -1) && (errno == EINTR))
- continue;
- if (ret == 0)
- return SOCKET_CONNECT_TIMEOUT; // timeout
- if (ret < 0)
- return -errno; // other socket errors. exit
- if (j == 4)
- return RETRY_EXCEEDED_WAITING_CONNECT; //
retry exceeded. exit
-
- // If a valid connection request is received, client has connected. Proceed.
- // Note the new socket fd - xmitfd - used in the
throughput test
- ximfd: xmitsfd = accept(testOptions->s2csockfd,
- (struct sockaddr *) &cli_addr,
&clilen);
- if (xmitsfd > 0) {
- log_println(6, "accept() for %d completed",
- testOptions->child0);
- procstatusenum = PROCESS_STARTED;
- proctypeenum = CONNECT_TYPE;
- protolog_procstatus(testOptions->child0,
testids, proctypeenum,
- procstatusenum);
- break;
- }
- if ((xmitsfd == -1) && (errno == EINTR)) { // socket interrupted, wait some more
- log_println(
- 6,
- "Child %d interrupted while
waiting for accept() to complete",
- testOptions->child0);
- goto ximfd;
- }
***The diff for this file has been truncated for email.***
=======================================
--- /branches/kkumar_code_organize/src/testoptions.h Mon Oct 17 06:43:25 2011
+++ /branches/kkumar_code_organize/src/testoptions.h Tue Oct 18 09:01:08 2011
@@ -11,47 +11,55 @@
#include "web100srv.h"
+
+#define LISTENER_SOCKET_CREATE_FAILED -1
+#define SOCKET_CONNECT_TIMEOUT -100
+#define RETRY_EXCEEDED_WAITING_CONNECT -101
+#define RETRY_EXCEEDED_WAITING_DATA -102
+#define SOCKET_STATUS_FAILED -1
+
+
typedef struct testoptions {
- int multiple; // TODO field comments
- int mainport;
-
- int midopt;
- int midsockfd;
- int midsockport;
-
- int c2sopt;
- int c2ssockfd;
- int c2ssockport;
-
- int s2copt;
- int s2csockfd;
- int s2csockport;
-
+ int multiple; // multiples tests enabled
+ int mainport; // main port used for test
+
+ int midopt; // middlebox test to be perfomed?
+ int midsockfd; // socket file desc for middlebox test
+ int midsockport; // port used for middlebox test
+
+ int c2sopt; // C2S test to be perfomed?
+ int c2ssockfd; // socket fd for C2S test
+ int c2ssockport; // port used for C2S test
+
+ int s2copt; // S2C test to be perfomed?
+ int s2csockfd; // socket fd for S2C test
+ int s2csockport; // port used for S2C test
+
+ // child pids
pid_t child0;
pid_t child1;
pid_t child2;
- int sfwopt;
- int State;
-
- int metaopt;
+ int sfwopt; // Is firewall test to be performed?
+ int State; // seems unused currently
+
+ int metaopt; // meta test to be perfomed?
} TestOptions;
+// Snap log characteristics
+typedef struct snapArgs {
+ web100_snapshot* snap; // web_100 snapshot indicator
+ web100_log* log; // web_100 log
+ int delay; // periodicity, in ms, of collecting snap
+} SnapArgs;
+
int wait_sig;
int initialize_tests(int ctlsockfd, TestOptions* testOptions,
char * test_suite);
-int test_mid(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
- int conn_options, double* s2c2spd);
-int test_c2s(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
- int conn_options, double* c2sspd, int set_buff, int window,
- int autotune, char* device, Options* options, int
record_reverse,
- int count_vars, char spds[4][256], int* spd_index);
-int test_s2c(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
- int conn_options, double* s2cspd, int set_buff, int window,
- int autotune, char* device, Options* options, char
spds[4][256],
- int* spd_index, int count_vars, CwndPeaks* peaks);
+void catch_s2c_alrm(int signo);
+
int test_sfw_srv(int ctlsockfd, web100_agent* agent, TestOptions* options,
int conn_options);
int test_meta_srv(int ctlsockfd, web100_agent* agent, TestOptions* options,
=======================================
--- /branches/kkumar_code_organize/src/utils.h Mon Oct 17 06:43:25 2011
+++ /branches/kkumar_code_organize/src/utils.h Tue Oct 18 09:01:08 2011
@@ -59,12 +59,30 @@
// SFW Test default message length
#define SFW_TEST_DEFAULT_LEN 20
-// generic system wide retry counts
-#define RETRY_COUNT 5
+// generic system wide constants
+#define RETRY_COUNT 5 // retry counts
+//#define BUFFSIZE 8192 // Buffer size
// middlebox test default MSS
#define MIDDLEBOX_PREDEFINED_MSS 8192
-// MAX TCP window size in bytes
+// MAX TCP window size in kilo-bytes
#define MAX_TCP_WIN_BYTES 64
-
+#define ETHERNET_MTU_SIZE 1456
+
+// link speed indicators
+#define DATA_RATE_INSUFFICIENT_DATA -2
+#define DATA_RATE_SYSTEM_FAULT -1
+#define DATA_RATE_RTT 0
+#define DATA_RATE_DIAL_UP 1
+#define DATA_RATE_T1 2
+#define DATA_RATE_ETHERNET 3
+#define DATA_RATE_T3 4
+#define DATA_RATE_FAST_ETHERNET 5
+#define DATA_RATE_OC_12 6
+#define DATA_RATE_GIGABIT_ETHERNET 7
+#define DATA_RATE_OC_48 8
+#define DATA_RATE_10G_ETHERNET 9
+#define DATA_RATE_RETRANSMISSIONS 10
+
+
=======================================
--- /branches/kkumar_code_organize/src/web100-admin.c Mon Oct 17 06:43:25 2011
+++ /branches/kkumar_code_organize/src/web100-admin.c Tue Oct 18 09:01:08 2011
@@ -35,7 +35,7 @@
int PktsOut, int DupAcksIn, int AckPktsIn, int CurrentMSS,
int SndLimTimeRwin, int SndLimTimeCwnd, int SndLimTimeSender,
int MaxRwinRcvd, int CurrentCwnd, int Sndbuf, int
DataBytesOut,
- int mismatch, int bad_cable, int c2sspd, int s2cspd, int
c2sdata,
+ int mismatch, int bad_cable, int c2sspd, int s2cspd, int c2s_linkspeed_data,
int s2cack, int view_flag) {
int congestion2 = 0, i;
@@ -163,7 +163,7 @@
fclose(fp);
}
- switch (c2sdata) {
+ switch (c2s_linkspeed_data) {
case -2:
sprintf(btlneck, "Insufficent Data");
break;
@@ -275,7 +275,7 @@
"Initial counter Values Totalcnt = %d, Total Mismatch = %d, Total Bad Cables = %d",
totalcnt, totmismatch, totbad_cable);
totalcnt++;
- count[c2sdata + 1]++;
+ count[c2s_linkspeed_data + 1]++;
if (mismatch > 0)
totmismatch++;
if (bad_cable == 1)
@@ -527,7 +527,7 @@
int c2sspd = 0, s2cspd = 0;
char ip_addr2[64], buff[512], *str, tmpstr[32];
int link = 0, mismatch = 0, bad_cable = 0, half_duplex = 0, congestion = 0;
- int c2sdata = 0, c2sack, s2cdata, s2cack = 0;
+ int c2s_linkspeed_data = 0, c2s_linkspeed_ack, s2c_linkspeed_data, s2c_linkspeed_ack = 0;
int totalcnt = 0, view_flag = 0;
if ((fp = fopen(get_logfile(), "r")) == NULL)
@@ -671,19 +671,19 @@
}
str += 1;
sscanf(str, "%[^,]s", tmpstr);
- c2sdata = atoi(tmpstr);
+ c2s_linkspeed_data = atoi(tmpstr);
str = strchr(str, ',') + 1;
sscanf(str, "%[^,]s", tmpstr);
- c2sack = atoi(tmpstr);
+ c2s_linkspeed_ack = atoi(tmpstr);
str = strchr(str, ',') + 1;
sscanf(str, "%[^,]s", tmpstr);
- s2cdata = atoi(tmpstr);
+ s2c_linkspeed_data = atoi(tmpstr);
str = strchr(str, ',') + 1;
sscanf(str, "%[^,]s", tmpstr);
- s2cack = atoi(tmpstr);
+ s2c_linkspeed_ack = atoi(tmpstr);
str = strchr(str, ',');
if (str == NULL) {
@@ -712,7 +712,7 @@
PktsOut, DupAcksIn, AckPktsIn,
CurrentMSS, SndLimTimeRwin,
SndLimTimeCwnd, SndLimTimeSender,
MaxRwinRcvd, CurrentCwnd,
Sndbuf, DataBytesOut, mismatch,
bad_cable, c2sspd, s2cspd,
- c2sdata, s2cack, view_flag);
+ c2s_linkspeed_data,
s2c_linkspeed_ack, view_flag);
}
}
=======================================
--- /branches/kkumar_code_organize/src/web100srv.c Mon Oct 17 06:43:25
2011
+++ /branches/kkumar_code_organize/src/web100srv.c Tue Oct 18 09:01:08
2011
@@ -985,14 +985,14 @@
//int links[16]; // commented out -> calc_linkspeed
// int max; // commented out -> calc_linkspeed
// int total;// commented out -> calc_linkspeed
- int c2sdata = 0; // C->S data link speed indicator determined using results
- int c2sack = 0; //
- int s2cdata = 0; // S->C data link speed indicator determined using results
- int s2cack = 0;
+ int c2s_linkspeed_data = 0; // C->S data link speed indicator determined using results
+ int c2s_linkspeed_ack = 0; //
+ int s2c_linkspeed_data = 0; // S->C data link speed indicator determined using results
+ int s2c_linkspeed_ack = 0;
//int j; // commented out -> calc_linkspeed
int totalcnt;
int autotune;
- int dec_cnt, same_cnt, inc_cnt, timeout, dupack; // values collected from the sped tests
+ int dec_cnt, same_cnt, inc_cnt, timeout, dupack; // values collected from the speed tests
//int ifspeed;
time_t stime;
@@ -1129,7 +1129,7 @@
c2sspd / 1000, s2cspd / 1000);
// Determine link speed
- calc_linkspeed(spds, spd_index, &c2sdata, &c2sack, &s2cdata, &s2cack,
+ calc_linkspeed(spds, spd_index, &c2s_linkspeed_data, &c2s_linkspeed_ack, &s2c_linkspeed_data, &s2c_linkspeed_ack,
runave, &dec_cnt, &same_cnt, &inc_cnt, &timeout,
&dupack,
testopt->c2sopt);
// Get web100 vars
@@ -1162,13 +1162,13 @@
rttsec = calc_avg_rtt(SumRTT, CountRTT, &avgrtt);
// Calculate packet loss
- packetloss_s2c = calc_packetloss(CongestionSignals, PktsOut, c2sdata);
+ packetloss_s2c = calc_packetloss(CongestionSignals, PktsOut, c2s_linkspeed_data);
// Calculate ratio of packets arriving out of order
oo_order = calc_packets_outoforder(DupAcksIn, AckPktsIn);
// calculate theoretical maximum goodput in bits
- bw_theortcl = calc_max_theoretical_thruput(CurrentMSS, rttsec,
+ bw_theortcl = calc_max_theoretical_throughput(CurrentMSS, rttsec,
packetloss_s2c);
//get window sizes
@@ -1200,7 +1200,7 @@
dackratio = (double) DupAcksIn / (double) AckPktsIn;
// get actual throughput in Mbps (totaltime is in microseconds)
- realthruput = calc_real_thruput(DataBytesOut, totaltime);
+ realthruput = calc_real_throughput(DataBytesOut, totaltime);
// total time spent waiting
waitsec = cal_totalwaittime(CurrentRTO, Timeouts);
@@ -1209,7 +1209,7 @@
s2cspd);
// Is thruput measured with limited cwnd(midbox test) > as reported S->C test
- if (is_limited_cwnd_thruput_better(s2c2spd, s2cspd)
+ if (is_limited_cwnd_throughput_better(s2c2spd, s2cspd)
&& isNotMultipleTestMode(multiple))
log_println(
2,
@@ -1226,7 +1226,7 @@
if (old_mismatch == 1) {
if (detect_duplexmismatch(cwndtime, bw_theortcl, PktsRetrans,
timesec,
MaxSsthresh, RTOidle, link, s2cspd, s2c2spd,
multiple)) {
- if (is_c2s_thruputbetter(c2sspd, s2cspd)) { // also, S->C throughput is lesser than C->S throughput
+ if (is_c2s_throughputbetter(c2sspd, s2cspd)) { // also, S->C throughput is lesser than C->S throughput
mismatch = DUPLEX_OLD_ALGO_INDICATOR;
// possible duplex, from Old Duplex-Mismatch
logic
} else {
@@ -1292,8 +1292,8 @@
congestion = POSSIBLE_CONGESTION;
// Send results and variable values to clients
- sprintf(buff, "c2sData: %d\nc2sAck: %d\ns2cData: %d\ns2cAck: %d\n", c2sdata,
- c2sack, s2cdata, s2cack);
+ sprintf(buff, "c2sData: %d\nc2sAck: %d\ns2cData: %d\ns2cAck: %d\n", c2s_linkspeed_data,
+ c2s_linkspeed_ack, s2c_linkspeed_data,
s2c_linkspeed_ack);
send_msg(ctlsockfd, MSG_RESULTS, buff, strlen(buff));
sprintf(
@@ -1355,8 +1355,8 @@
strlcat(meta.summary, tmpstr, sizeof(meta.summary));
memset(tmpstr, 0, 255);
- sprintf(tmpstr, ",%d,%d,%d,%d,%d,%d,%d,%d,%d", c2sdata, c2sack,
s2cdata,
- s2cack, CongestionSignals, PktsOut, MinRTT,
RcvWinScale, autotune);
+ sprintf(tmpstr, ",%d,%d,%d,%d,%d,%d,%d,%d,%d", c2s_linkspeed_data, c2s_linkspeed_ack, s2c_linkspeed_data,
+ s2c_linkspeed_ack, CongestionSignals, PktsOut, MinRTT, RcvWinScale, autotune);
strlcat(meta.summary, tmpstr, sizeof(meta.summary));
memset(tmpstr, 0, 255);
@@ -1392,8 +1392,8 @@
CurrentRwinRcvd);
fprintf(fp, "%d,%d,%d,%d,%d", link, mismatch, bad_cable,
half_duplex,
congestion);
- fprintf(fp, ",%d,%d,%d,%d,%d,%d,%d,%d,%d", c2sdata, c2sack,
s2cdata,
- s2cack, CongestionSignals, PktsOut, MinRTT,
RcvWinScale,
+ fprintf(fp, ",%d,%d,%d,%d,%d,%d,%d,%d,%d", c2s_linkspeed_data, c2s_linkspeed_ack, s2c_linkspeed_data,
+ s2c_linkspeed_ack, CongestionSignals,
PktsOut, MinRTT, RcvWinScale,
autotune);
fprintf(fp, ",%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", CongAvoid,
CongestionOverCount, MaxRTT, OtherReductions,
CurTimeoutCount,
@@ -1409,8 +1409,8 @@
MaxRwinRcvd, Sndbuf, MaxCwnd, SndLimTimeRwin,
SndLimTimeCwnd,
SndLimTimeSender, DataBytesOut, SndLimTransRwin,
SndLimTransCwnd,
SndLimTransSender, MaxSsthresh, CurrentRTO,
CurrentRwinRcvd, link,
- mismatch, bad_cable, half_duplex, congestion,
c2sdata, c2sack,
- s2cdata, s2cack, CongestionSignals, PktsOut, MinRTT,
RcvWinScale,
+ mismatch, bad_cable, half_duplex, congestion, c2s_linkspeed_data, c2s_linkspeed_ack,
+ s2c_linkspeed_data, s2c_linkspeed_ack, CongestionSignals, PktsOut, MinRTT, RcvWinScale,
autotune, CongAvoid, CongestionOverCount, MaxRTT,
OtherReductions,
CurTimeoutCount, AbruptTimeouts, SendStall, SlowStart,
SubsequentTimeouts, ThruBytesAcked, peaks.min,
peaks.max,
@@ -1432,9 +1432,9 @@
strcat(logstr1, logstr2);
sprintf(
logstr2,
- "link=%d,mismatch=%d,bad_cable=%d,half_duplex=%d,congestion=%d,c2sdata=%d,c2sack=%d,s2cdata=%d,s2cack=%d,CongestionSignals=%d,PktsOut=%d,MinRTT=%d,RcvWinScale=%d\n",
- link, mismatch, bad_cable, half_duplex,
congestion, c2sdata,
- c2sack, s2cdata, s2cack, CongestionSignals,
PktsOut, MinRTT,
+ "link=%d,mismatch=%d,bad_cable=%d,half_duplex=%d,congestion=%d,c2s_linkspeed_data=%d,c2sack=%d,s2cdata=%d,s2cack=%d,CongestionSignals=%d,PktsOut=%d,MinRTT=%d,RcvWinScale=%d\n",
+ link, mismatch, bad_cable, half_duplex,
congestion, c2s_linkspeed_data,
+ c2s_linkspeed_ack, s2c_linkspeed_data, s2c_linkspeed_ack, CongestionSignals, PktsOut, MinRTT,
RcvWinScale);
strcat(logstr1, logstr2);
syslog(LOG_FACILITY | LOG_INFO, "%s", logstr1);
@@ -1457,7 +1457,7 @@
DupAcksIn, AckPktsIn, CurrentMSS,
SndLimTimeRwin,
SndLimTimeCwnd, SndLimTimeSender,
MaxRwinRcvd, CurrentCwnd,
Sndbuf, DataBytesOut, mismatch, bad_cable,
(int) c2sspd,
- (int) s2cspd, c2sdata, s2cack, 1);
+ (int) s2cspd, c2s_linkspeed_data,
s2c_linkspeed_ack, 1);
gen_html((int) c2sspd, (int) s2cspd, MinRTT, PktsRetrans,
Timeouts,
Sndbuf, MaxRwinRcvd, CurrentCwnd, mismatch,
bad_cable, totalcnt,
refresh);
- [ndt-dev] [ndt] r724 committed - Moved S2C, C2S, Mid tests to new files, renamed methods, and some vari..., ndt, 10/18/2011
Archive powered by MHonArc 2.6.16.