Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r988 committed - Remove web100 usage in the SFW test

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r988 committed - Remove web100 usage in the SFW test


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r988 committed - Remove web100 usage in the SFW test
  • Date: Mon, 10 Mar 2014 13:39:35 +0000

Revision: 988
Author:

Date: Mon Mar 10 13:39:30 2014 UTC
Log: Remove web100 usage in the SFW test


http://code.google.com/p/ndt/source/detail?r=988

Modified:
/branches/aaron-tcp_stats_cleanup/src/test_sfw_srv.c

=======================================
--- /branches/aaron-tcp_stats_cleanup/src/test_sfw_srv.c Mon Oct 14 13:20:21 2013 UTC
+++ /branches/aaron-tcp_stats_cleanup/src/test_sfw_srv.c Mon Mar 10 13:39:30 2014 UTC
@@ -130,16 +130,6 @@
fd_set fds;
struct timeval sel_tv;
int msgLen, msgType;
-
-#if USE_WEB100
- web100_var* var;
- web100_connection* cn;
- web100_group* group;
-#elif USE_WEB10G
- struct estats_val value;
- int cn;
-#endif
- int maxRTT, maxRTO;
char hostname[256];
int rc;

@@ -174,55 +164,6 @@
sfwsockfd = I2AddrFD(sfwsrv_addr);
sfwsockport = I2AddrPort(sfwsrv_addr);
log_println(1, " -- port: %d", sfwsockport);
-
- cn = tcp_stat_connection_from_socket(agent, ctlsockfd);
- if (cn) {
- // Get remote end's address
- memset(hostname, 0, sizeof(hostname));
-
-#if USE_WEB100
- web100_agent_find_var_and_group(agent, "RemAddress", &group, &var);
- web100_raw_read(var, cn, buff);
- // strncpy(hostname, web100_value_to_text(web100_get_var_type(var), buff),
- // 255);
- strlcpy(hostname, web100_value_to_text(web100_get_var_type(var), buff),
- sizeof(hostname));
-#elif USE_WEB10G
- web10g_get_remote_addr(agent, cn, hostname, sizeof(hostname));
-#endif
-
- // Determine test time in seconds.
- // test-time = max(round trip time, timeout) > 3 ? 3 : 1
-
-#if USE_WEB100
- web100_agent_find_var_and_group(agent, "MaxRTT", &group, &var);
- web100_raw_read(var, cn, buff);
- maxRTT = atoi(web100_value_to_text(web100_get_var_type(var), buff));
- web100_agent_find_var_and_group(agent, "MaxRTO", &group, &var);
- web100_raw_read(var, cn, buff);
- maxRTO = atoi(web100_value_to_text(web100_get_var_type(var), buff));
-#elif USE_WEB10G
- web10g_get_val(agent, cn, "MaxRTT", &value);
- maxRTT = value.uv32;
- web10g_get_val(agent, cn, "MaxRTO", &value);
- maxRTO = value.uv32;
-#endif
-
- if (maxRTT > maxRTO)
- maxRTO = maxRTT;
- if ((((double) maxRTO) / 1000.0) > 3.0)
- /* `testTime = (((double) maxRTO) / 1000.0) * 4 ; */
- testTime = 3;
- else
- testTime = 1;
- } else {
- log_println(0, "Simple firewall test: Cannot find connection");
- snprintf(buff, sizeof(buff), "Server (Simple firewall test): "
- "Cannot find connection");
- send_msg(ctlsockfd, MSG_ERROR, buff, strlen(buff));
- I2AddrFree(sfwsrv_addr);
- return -1;
- }
log_println(1, " -- SFW time: %d", testTime);

// try sending TEST_PREPARE msg with ephemeral port number to client.
@@ -273,6 +214,11 @@
I2AddrFree(sfwsrv_addr);
return 4;
}
+
+ clilen = sizeof(cli_addr);
+ getpeername(ctlsockfd, (struct sockaddr*)&cli_addr, &clilen);
+
+ addr2a(&cli_addr, hostname, sizeof(hostname));

// Get node, port(if present) and other details of client end.
// If not able to resolve it, the test cannot proceed to the "throughput"


  • [ndt-dev] [ndt] r988 committed - Remove web100 usage in the SFW test, ndt, 03/10/2014

Archive powered by MHonArc 2.6.16.

Top of Page