Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r845 committed - Merging trunk changes into applet_usability branch

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r845 committed - Merging trunk changes into applet_usability branch


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r845 committed - Merging trunk changes into applet_usability branch
  • Date: Tue, 15 Oct 2013 13:08:21 +0000

Revision: 845
Author:

Date: Tue Oct 15 13:07:11 2013 UTC
Log: Merging trunk changes into applet_usability branch
http://code.google.com/p/ndt/source/detail?r=845

Added:
/branches/applet_usability/README_WEB10G
/branches/applet_usability/src/web10g-util.c
Modified:
/branches/applet_usability
/branches/applet_usability/Applet/NDTConstants.java
/branches/applet_usability/Applet/Tcpbw100.java
/branches/applet_usability/Applet/Tcpbw100_msgs_ca_ES.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_el_GR.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_en_US.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_fr_FR.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_nb_NO.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_nl_NL.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_pt_BR.properties
/branches/applet_usability/Applet/Tcpbw100_msgs_ru_RU.properties
/branches/applet_usability/configure.ac
/branches/applet_usability/cpplint.sh
/branches/applet_usability/src/Makefile.am
/branches/applet_usability/src/genplot.c
/branches/applet_usability/src/heuristics.c
/branches/applet_usability/src/heuristics.h
/branches/applet_usability/src/logging.c
/branches/applet_usability/src/logging.h
/branches/applet_usability/src/network.c
/branches/applet_usability/src/network.h
/branches/applet_usability/src/test_c2s_srv.c
/branches/applet_usability/src/test_meta_srv.c
/branches/applet_usability/src/test_mid_srv.c
/branches/applet_usability/src/test_results_clt.c
/branches/applet_usability/src/test_s2c_srv.c
/branches/applet_usability/src/test_sfw_srv.c
/branches/applet_usability/src/testoptions.c
/branches/applet_usability/src/testoptions.h
/branches/applet_usability/src/tests_srv.h
/branches/applet_usability/src/utils.c
/branches/applet_usability/src/utils.h
/branches/applet_usability/src/web100-admin.c
/branches/applet_usability/src/web100-pcap.c
/branches/applet_usability/src/web100-util.c
/branches/applet_usability/src/web100clt.c
/branches/applet_usability/src/web100srv.c
/branches/applet_usability/src/web100srv.h

=======================================
--- /dev/null
+++ /branches/applet_usability/README_WEB10G Tue Oct 15 13:07:11 2013 UTC
@@ -0,0 +1,87 @@
+ ndt-web10g
+
+Required libraries:
+
+Web10G
+Download and install the latest userland and your kernel patch from
+http://web10g.org. You will need the use the Web10G userland-2.0.6.2
+(as at time of writing the newest release).
+
+This is known/expected to work with the following web10g kernel patches:
+Web10G-0.6.2-patches (Linux kernel 3.6, 3.7 & 3.8).
+Web10G-0.4-3.5-patch - You will have to make a small modification
+
+IMPORTANT - Web10G-0.4-3.5-patch modification
+Swap the single occurrence of ktime_to_ns(...) to ktime_to_us(...)
+before applying the patch.
+
+This will not work with the 3.2 kernel patch or earlier. Try running
+the sample applications included in the 2.0.6.2 userland, if these do
+not work the kernel patch your using doesn't support this userland
+and cannot be used.
+
+Although you only need the library installed to build, the patched
+web10g kernel is required to run the server, reading a log file on the
+other hand should be ok with the kernel patch. REMEMBER to modprobe
+tcp_estats_nl first and you'll most likely need sudo permissions to run
+the server.
+
+I2Util
+Grab the copy included in the ndt-3.6.5.1 release in the ndt google
+code project page. https://ndt.googlecode.com/files/ndt-3.6.5.1.tar.gz
+Or from svn here
+Build Instructions:
+
+Should be as simple as
+./bootstrap
+./configure
+make
+
+Web100 is still fully supported and if Web100 libs are found web100srv
+will also be built.
+
+Running:
+Unlike web100srv, web10gsrv doesn't require the variable name file and
+this will be ignored (-f option). Besides that the two work alike.
+
+The client web100clt can be used with both the Web10G and Web100
+servers. Only very minor changes have been made - such that the
+original ndt-web100 client should work correctly with both versions of
+the server.
+
+genplot is for web100 snaps where as genplot10g works with Web10G.
+
+I've tested with Linux 3.5.1 kernel patched with web10g
+Web10G-0.4-3.5-patch(modified)
+- There are some issues with logging Web10G Vars.
+
+Linux 3.8.8 kernel with web10g web10g-0.6.2-3.8.patch.
+- Works well.
+
+Known issues:
+Web10G related
+* Web10g kernel patch not quite right - 3.5 kernel patch need to swap
+ ktime_to_ns to ktime_to_us.
+* Logging using the 3.5 kernel patch doesn't work perfectly. Timestamps
+ and addresses are NOT recorded.
+* Server, Client(C and Java Applet) and genplot have been ported.
+ Other tools don't appear to rely upon the web100/10g library.
+
+Other
+* Running the server without a DNS server can cause tests to timeout and
+ fail. Add the NI_NUMERICHOST flag into the getnameinfo call within
+ _I2AddrSetNodePort() in the I2Util library to fix.
+* MSS incorrectly detecting modification when testing via IPv6??
+* A general ndt problem 10Gig connections may overflow integer values
+ and hence results may not be accurate - let us know if you notice
+ this happening.
+
+Reporting Issues:
+
+The best place to go for help is the

mailing
+list.
+
+Or to myself

(Richard Sanger).
+
+
+My work has been funded by The University of Waikato/The WAND group.
=======================================
--- /dev/null
+++ /branches/applet_usability/src/web10g-util.c Tue Oct 15 13:07:11 2013 UTC
@@ -0,0 +1,301 @@
+/**
+ * A handful of functions to handle some Web10G specific stuff.
+ * This provides some functions similar to those in the Web100 library
+ * for Web10G.
+ *
+ * Naming conventions
+ * web10g_* for functions added to ndt that extend the Web10G library,
+ * like everything in this file. The actual Web10G library uses
+ * estats_*.
+ *
+ * tcp_stat_* is used for types and functions intended to be used
+ * interchangably between web10g and web100.
+ *
+ * Author: Richard Sanger
+ *

+ */
+
+#include "web100srv.h"
+#include "logging.h"
+#include "utils.h"
+
+/**
+ * Find the web10g connection number related to a given socket.
+ *
+ * @param client A web10g client
+ * @param sockfd The socket file descriptor
+ *
+ * @return The connection number if successful. If an error occurs -1
+ * will be returned.
+ *
+ */
+int web10g_connection_from_socket(tcp_stat_agent* client, int sockfd) {
+ struct sockaddr_storage local_name;
+ struct sockaddr_storage peer_name;
+ socklen_t local_name_len = sizeof(local_name);
+ socklen_t peer_name_len = sizeof(peer_name);
+ int connection_id = -1;
+ struct estats_connection_list* clist = NULL;
+ struct estats_list* list_pos;
+
+ /* Get the ip address of ourself on the localsocket */
+ if (getsockname(sockfd, (struct sockaddr*) &local_name,
+ &local_name_len) == -1) {
+ log_println(1, "getsockname() failed: %s ", strerror(errno));
+ return -1;
+ }
+ /* IPv6 socket connected to IPv4? Convert to a real IPv4 address */
+ ipv4mapped_to_ipv4(&local_name);
+
+ /* Get the ip address of our peer */
+ if (getpeername(sockfd, (struct sockaddr*) &peer_name,
+ &peer_name_len) == -1) {
+ log_println(1, "getpeername() failed: %s ", strerror(errno));
+ return -1;
+ }
+ ipv4mapped_to_ipv4(&peer_name);
+
+ /* We have our sockaddrs so find the match in the Web10g table */
+ estats_connection_list_new(&clist);
+ estats_list_conns(clist, client);
+
+
+ ESTATS_LIST_FOREACH(list_pos, &(clist->connection_head)) {
+ struct estats_connection* cp =
+ ESTATS_LIST_ENTRY(list_pos, estats_connection, list);
+ struct estats_connection_tuple* ct =
+ (struct estats_connection_tuple*) cp;
+
+ if (local_name.ss_family == AF_INET &&
+ peer_name.ss_family == AF_INET &&
+ ct->local_addr[16] == ESTATS_ADDRTYPE_IPV4 &&
+ ct->rem_addr[16] == ESTATS_ADDRTYPE_IPV4) {
+ /* All IPv4 - compare addresses */
+ struct sockaddr_in * ipv4_local =
+ (struct sockaddr_in *) &local_name;
+ struct sockaddr_in * ipv4_peer =
+ (struct sockaddr_in *) &peer_name;
+
+ /* Compare local and remote ports and addresses */
+ if (ct->local_port == ntohs(ipv4_local->sin_port) &&
+ ct->rem_port == ntohs(ipv4_peer->sin_port) &&
+ ((struct in_addr*) ct->rem_addr)->s_addr ==
+ ipv4_peer->sin_addr.s_addr &&
+ ((struct in_addr*) ct->local_addr)->s_addr ==
+ ipv4_local->sin_addr.s_addr ) {
+ /* Found it */
+ connection_id = ct->cid;
+ log_println(2, "Matched socket to web10g IPv4 connection #%d",
+ connection_id);
+ goto Cleanup;
+ }
+ } else if (local_name.ss_family == AF_INET6 &&
+ peer_name.ss_family == AF_INET6 &&
+ ct->local_addr[16] == ESTATS_ADDRTYPE_IPV6 &&
+ ct->rem_addr[16] == ESTATS_ADDRTYPE_IPV6) {
+ /* We are IPv6 - compare addresses */
+ struct sockaddr_in6 * ipv6_local =
+ (struct sockaddr_in6 *) &local_name;
+ struct sockaddr_in6 * ipv6_peer =
+ (struct sockaddr_in6 *) &peer_name;
+
+ /* Compare local and remote ports and addresses */
+ if (ct->local_port == ntohs(ipv6_local->sin6_port) &&
+ ct->rem_port == ntohs(ipv6_peer->sin6_port) &&
+ memcmp(ct->rem_addr, ipv6_peer->sin6_addr.s6_addr,
+ sizeof(struct in6_addr)) == 0 &&
+ memcmp(ct->local_addr, ipv6_local->sin6_addr.s6_addr,
+ sizeof(struct in6_addr)) == 0) {
+ /* Found it */
+ connection_id = ct->cid;
+ log_println(2, "Matched socket to web10g IPv6 connection #%d",
+ connection_id);
+ goto Cleanup;
+ }
+ }
+ }
+
+ Cleanup:
+ estats_connection_list_free(&clist);
+ return connection_id;
+}
+
+/**
+ * Get the remote address given connection number
+ *
+ * @param client Web10g client
+ * @param conn The web10g connection number
+ * @param out A pointer to a character buffer, into which the remote
+ * address will be returned if successful. Upon error the contents are
+ * remain unchanged.
+ * @param size The size of the buffer 'out'.
+ *
+ * @return int 0 if successful otherwise 1 in the event of an error
+ * (The connection could not be found).
+ *
+ */
+int web10g_get_remote_addr(tcp_stat_agent* client,
+ tcp_stat_connection conn, char* out, int size) {
+ struct estats_connection_list* clist = NULL;
+ struct estats_list* list_pos;
+
+ estats_connection_list_new(&clist);
+ estats_list_conns(clist, client);
+ out[0] = 0;
+
+ ESTATS_LIST_FOREACH(list_pos, &(clist->connection_head)) {
+ struct estats_connection* cp =
+ ESTATS_LIST_ENTRY(list_pos, estats_connection, list);
+ struct estats_connection_tuple* ct =
+ (struct estats_connection_tuple*) cp;
+
+ if (ct->cid == conn) {
+ if (ct->local_addr[16] == ESTATS_ADDRTYPE_IPV4) {
+ inet_ntop(AF_INET, &(ct->rem_addr[0]), out, size);
+ log_println(1, "Got remote address IPv4 %s", out);
+ goto Cleanup;
+ } else if (ct->local_addr[16] == ESTATS_ADDRTYPE_IPV6) {
+ inet_ntop(AF_INET6, &(ct->rem_addr[0]), out, size);
+ log_println(1, "Got remote address IPv6 %s", out);
+ goto Cleanup;
+ }
+ }
+ }
+
+ Cleanup:
+ estats_connection_list_free(&clist);
+ return out[0] == 0 ? 1 : 0;
+}
+
+/**
+ * Find the specified web10g variables value within a provided capture.
+ * Similar to web10g_get_val except this works on a previously retrieved
+ * set of data.
+ *
+ * This also handle some special cases to get web100 variables that
+ * no longer exist in web10g namely:
+ * MaxCwnd = MAX(MaxSsCwnd, MaxCaCwnd)
+ * AckSegsIn = SegsIn - DataSegsIn
+ * AckSegsOut = SegsOut - DataSegsOut
+ *
+ * @param data A web10g data capture
+ * @param name The web10g variable name
+ * @param *value A pointer to a web10g value structure. If successful
+ * this will contain the requested value upon return. If an error occurs
+ * its contents will remain untouched.
+ *
+ * @return the type if successful otherwise -1 in the event of an error
+ * (including the case the specified value cannot be found).
+ *
+ */
+int web10g_find_val(const tcp_stat_snap* data, const char* name,
+ struct estats_val* value) {
+ int i;
+
+ if (data == NULL || name == NULL || value == NULL)
+ return -1;
+
+ /* Special cases for old web100 variables that no longer have a direct
+ * mapping (i.e. must be calculated from others) */
+
+ if (strcmp(name, "MaxCwnd") == 0) {
+ /* = MAX(MaxSsCwnd, MaxCaCwnd) */
+ struct estats_val ss = {0};
+ struct estats_val ca = {0};
+ int type;
+ /* Types should be the same, failing that an error (-1) will take
+ * presidence when or'd (uv32's) */
+ type = web10g_find_val(data, "MaxSsCwnd", &ss);
+ type |= web10g_find_val(data, "MaxCaCwnd", &ca);
+ /* Get the max of the two */
+ if (ss.uv32 > ca.uv32) {
+ value->uv64 = ss.uv64;
+ value->masked = ss.masked;
+ } else {
+ value->uv64 = ca.uv64;
+ value->masked = ca.masked;
+ }
+ return type;
+ }
+
+ if (strcmp(name, "AckSegsIn") == 0) {
+ /* = SegsIn - DataSegsIn */
+ struct estats_val si = {0};
+ struct estats_val dsi = {0};
+ int type;
+ /* Both uv32's */
+ type = web10g_find_val(data, "SegsIn", &si);
+ type |= web10g_find_val(data, "DataSegsIn", &dsi);
+
+ value->masked = 0;
+ value->uv32 = si.uv32 - dsi.uv32;
+ return type;
+ };
+
+ if (strcmp(name, "AckSegsOut") == 0) {
+ /* = SegsOut - DataSegsOut */
+ struct estats_val so = {0};
+ struct estats_val dso = {0};
+ int type;
+ /* Both uv32's */
+ type = web10g_find_val(data, "SegsOut", &so);
+ type |= web10g_find_val(data, "DataSegsOut", &dso);
+
+ value->masked = 0;
+ value->uv32 = so.uv32 - dso.uv32;
+ return type;
+ };
+
+ for (i = 0; i < data->length; i++) {
+ if (data->val[i].masked) continue;
+
+ if (strcmp(estats_var_array[i].name, name) == 0) {
+ value->uv64 = data->val[i].uv64;
+ value->masked = data->val[i].masked; /* = 0*/
+ return estats_var_array[i].valtype;
+ }
+ }
+ log_println(0, "WARNING: Web10G failed to find name=%s", name);
+ return -1;
+}
+
+/**
+ * Find the specified web10g variable given a connection at the current
+ * time.
+ * Similar to web10g_find_val except this also retrieves data from web10g
+ * rather than from a provided capture. If many variables are being read
+ * it's probably best to capture the data then use web10g_find_val.
+ *
+ * @param data A web10g data capture
+ * @param name The web10g variable name
+ * @param *value A pointer to a web10g value structure. If successful
+ * this will contain the requested value upon return. If an error occurs
+ * it's contents will remain untouched.
+ *
+ * @return the type if successful otherwise -1 in the event of an error
+ * (including the case the specified value cannot be found).
+ *
+ */
+int web10g_get_val(tcp_stat_agent* client, tcp_stat_connection conn,
+ const char* name, struct estats_val* value) {
+ int ret;
+ estats_error* err;
+ estats_val_data* data = NULL;
+
+ if ((err = estats_val_data_new(&data)) != NULL) {
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ return -1;
+ }
+
+ if ((err = estats_read_vars(data, conn, client)) != NULL) {
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ estats_val_data_free(&data);
+ return -1;
+ }
+
+ ret = web10g_find_val(data, name, value);
+ estats_val_data_free(&data);
+ return ret;
+}
=======================================
--- /branches/applet_usability/Applet/NDTConstants.java Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/Applet/NDTConstants.java Tue Oct 15 13:07:11 2013 UTC
@@ -18,7 +18,7 @@
public static final String META_BROWSER_OS = "client.browser.name";
public static final String META_CLIENT_KERNEL_VERSION = "client.kernel.version";
public static final String META_CLIENT_VERSION = "client.version";
- public static final String META_CLIENT_APPLICATION = "client.application";
+ public static final String META_CLIENT_APPLICATION = "client.application";

/*
* TODO for a later release: Version could be moved to some
"configurable"
@@ -26,7 +26,7 @@
*/
public static final String VERSION = "3.6.5.2";

- public static final String NDT_TITLE_STR = "TCP/Web100 Network Diagnostic Tool v";
+ public static final String NDT_TITLE_STR = "Network Diagnostic Tool Client v";

// Section: Test type
public static final byte TEST_MID = (1 << 0);
@@ -101,7 +101,22 @@

public static final int RFC_1323_DISABLED = 0;
public static final int RFC_1323_ENABLED = 1;
-
+ // Note Self disabled from servers standpoint i.e. disabled by server
+ public static final int RFC_1323_SELF_DISABLED = 2;
+ public static final int RFC_1323_PEER_DISABLED = 3;
+
+ // Section: RFC2018 SAck
+ public static final int RFC_2018_ENABLED = 1;
+
+ // Section: RFC2018 Nagle
+ public static final int RFC_896_ENABLED = 1;
+
+ // Section: RFC3168
+ public static final int RFC_3168_ENABLED = 1;
+ // Note Self disabled from servers standpoint i.e. disabled by server
+ public static final int RFC_3168_SELF_DISABLED = 2;
+ public static final int RFC_3168_PEER_DISABLED = 3;
+
// Section: Buffer limitation test thresholds
public static final float BUFFER_LIMITED = 0.15f; //unused right now

=======================================
--- /branches/applet_usability/Applet/Tcpbw100.java Tue Oct 15 12:57:51 2013 UTC
+++ /branches/applet_usability/Applet/Tcpbw100.java Tue Oct 15 13:07:11 2013 UTC
@@ -178,6 +178,8 @@
// int _iPkts, _iLength=8192, _iCurrentRTO;
int _iPkts, _iLength = NDTConstants.PREDEFINED_BUFFER_SIZE,
_iCurrentRTO;
int _iC2sData, _iC2sAck, _iS2cData, _iS2cAck;
+ // Lowercase string either web100 or web10g used to select Message based upon server type
+ String _sServerType = "web100";
// added for mailto url
protected URL _targetURL;

@@ -551,8 +553,6 @@
int testsNum = ((Integer)
_spinnerTestCount.getValue())
.intValue();
_bTestInProgress = true;
- createDiagnoseWindow();
- createStatsWindow();
_buttonStartTest.setEnabled(false);
_buttonDetails.setEnabled(false);
_buttonStatistics.setEnabled(false);
@@ -902,7 +902,10 @@
* Create the "More details" window.
*/
public void createDiagnoseWindow() {
- showStatus(_resBundDisplayMsgs.getString("getWeb100Var"));
+ if (_sServerType.compareTo("web100") == 0)
+
showStatus(_resBundDisplayMsgs.getString("getWeb100Var"));
+ else
+
showStatus(_resBundDisplayMsgs.getString("getWeb10gVar"));

// create new frame
if (_frameWeb100Vars == null) {
@@ -910,7 +913,7 @@
}

// Get title for this window
-
_frameWeb100Vars.setTitle(_resBundDisplayMsgs.getString("web100Var"));
+ _frameWeb100Vars.setTitle(_resBundDisplayMsgs.getString(_sServerType + "Var"));
Panel buttons = new Panel();
_frameWeb100Vars.getContentPane().add("South", buttons);

@@ -924,7 +927,7 @@

// Create Text area for displaying results, add "Heading"
_txtDiagnosis = new JTextArea(
- _resBundDisplayMsgs.getString("web100KernelVar") +
":\n", 15,
+ _resBundDisplayMsgs.getString(_sServerType +
"KernelVar") + ":\n", 15,
30);
_txtDiagnosis.setEditable(true);
_buttonDismiss.setEnabled(true);
@@ -965,7 +968,7 @@

// Text area for Statistics, add "heading"
_txtStatistics = new JTextArea(
- _resBundDisplayMsgs.getString("web100Stats") +
":\n", 25, 70);
+ _resBundDisplayMsgs.getString(_sServerType + "Stats") +
":\n", 25, 70);
_txtStatistics.setEditable(false);
_buttonStatsDismiss.setEnabled(true);
_buttonStatsCopy.setEnabled(_bCanCopy);
@@ -2499,9 +2502,6 @@
//
already encountered
} // end waiting

- _frameWeb100Vars.toBack();
- _frameDetailedStats.toBack();
-
// Tests can be started. Read server response again.
// The server must send a message to verify version, and this
is
// a MSG_LOGIN type of message
@@ -2539,6 +2539,15 @@
}
System.out.println("Server version: " +
vVersion.substring(1));

+ // If we have connected to a Web10G server rebrand ourselves
as such
+ _sServerType = vVersion.endsWith("Web10G") ? "web10g" :
"web100";
+
+ // Only create the windows once we have connected to the server so this works
+ createDiagnoseWindow();
+ createStatsWindow();
+ _frameWeb100Vars.toBack();
+ _frameDetailedStats.toBack();
+
// Read server message again. Server must send a message to
negotiate
// the test suite, and this is
// a MSG_LOGIN type of message which indicates the same set
of tests as
@@ -2771,7 +2780,7 @@
iSysval =
Integer.parseInt(sStrval);
// If it fails as an int it's probably to big since the values are often unsigned
} catch (Exception e) {
- System.out.println("Exception
occured reading a web100 var - " + e);
+ System.out.println("Exception occured reading a web100 var " + sSysvar + " - " + e);
iSysval = -1;
}
// save value into a key value
expected by us
@@ -3085,7 +3094,7 @@
// System.getProperty("java.class.version") + "\n");

_txtStatistics.append("\n\t------ "
- +
_resBundDisplayMsgs.getString("web100Details")
+ + _resBundDisplayMsgs.getString(_sServerType +
"Details")
+ " ------\n");

// Now add data to the statistics pane about access
speed/technology
@@ -3188,9 +3197,9 @@
}

_txtStatistics.append("\n"
- + _resBundDisplayMsgs.getString("web100rtt") +
" = "
+ + _resBundDisplayMsgs.getString(_sServerType +
"rtt") + " = "
+ NDTUtils.prtdbl(avgrtt) + " " + "ms" +
"; ");
- _sEmailText += "\n%0A" +
_resBundDisplayMsgs.getString("web100rtt")
+ _sEmailText += "\n%0A" + _resBundDisplayMsgs.getString(_sServerType + "rtt")
+ " = " + NDTUtils.prtdbl(avgrtt) + " " + "ms"
+ "; ";


_txtStatistics.append(_resBundDisplayMsgs.getString("packetsize")
@@ -3398,37 +3407,37 @@

// Update statistics on TCP negotiated optional
Performance Settings
_txtStatistics.append("\n"
- +
_resBundDisplayMsgs.getString("web100tcpOpts") + " \n");
+ + _resBundDisplayMsgs.getString(_sServerType +
"tcpOpts") + " \n");
_txtStatistics.append("RFC 2018 Selective Acknowledgment:
");
- if (_iSACKEnabled == iZero)
-
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ if (_iSACKEnabled != 0)
+
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+ "\n");
else
-
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ "\n");

_txtStatistics.append("RFC 896 Nagle Algorithm: ");
- if (_iNagleEnabled == iZero)
-
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ if (_iNagleEnabled != 0)
+
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+ "\n");
else
-
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ "\n");

_txtStatistics.append("RFC 3168 Explicit Congestion
Notification: ");
- if (_iECNEnabled == iZero)
-
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ if (_iECNEnabled != 0)
+
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+ "\n");
else
-
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ "\n");

_txtStatistics.append("RFC 1323 Time Stamping: ");
- if (_iTimestampsEnabled ==
NDTConstants.RFC_1323_DISABLED)
-
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ if (_iTimestampsEnabled != 0)
+
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+ "\n");
else
-
_txtStatistics.append(_resBundDisplayMsgs.getString("on")
+
_txtStatistics.append(_resBundDisplayMsgs.getString("off")
+ "\n");

_txtStatistics.append("RFC 1323 Window Scaling: ");
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_ca_ES.properties Tue May 10 08:51:49 2011 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_ca_ES.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,9 +73,10 @@
fullDuplex = subxaxarxa Full duplex Fast Ethernet
general = General
generatingReport = Generant informe de problemes: Aquest informe s'enviar\u00e0 per e-mail a la persona que especifiquis
-getWeb100Var = Obt\u00e9 les variables WEB100
+getWeb100Var = Obt\u00e9 les variables Web100
+getWeb10gVar = Obt\u00e9 les variables Web10G
halfDuplex = subxarxa Half duplex Fast Ethernet
-id = Eina de diagn\u00f2stic de xara TCP/Web100
+id = Eina de diagn\u00f2stic de xara TCP/Web100/Web10G
immediate = immediat
inboundTest = Test d'entrada Tcpbw100...
inboundWrongMessage = Test de throughput C2S: Rebut un tipus de missatge erroni
@@ -212,11 +213,17 @@
version = Versi\u00f3
versionWrongMessage = Negociant la versi\u00f3 de NDT: S'ha rebut un missatge erroni.
web100Details = An\u00e0lisi detallat Web100
-web100KernelVar = Variables de Kernel WEB100
-web100Stats = Estad\u00edstiques WEB100 habilitades
+web100KernelVar = Variables de Kernel Web100
+web100Stats = Estad\u00edstiques Web100 habilitades
web100Var = Variables Web100
web100rtt = Web100 informa el temps d'anada i tornada (RTT)
web100tcpOpts = Web100 informa que TCP ha negociat els par\u00e0metres de funcionament \u00f2ptims a:
+web10gDetails = An\u00e0lisi detallat Web10G
+web10gKernelVar = Variables de Kernel Web10G
+web10gStats = Estad\u00edstiques Web10G habilitades
+web10gVar = Variables Web10G
+web10grtt = Web10G informa el temps d'anada i tornada (RTT)
+web10gtcpOpts = Web10G informa que TCP ha negociat els par\u00e0metres de funcionament \u00f2ptims a:
willImprove = Millorar\u00e0 el funcionament
workstation = Estaci\u00f3 de treball
your = El seu
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_el_GR.properties Thu Feb 14 14:01:40 2013 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_el_GR.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,9 +73,10 @@
fullDuplex = \u03c5\u03c0\u03bf\u03b4\u03af\u03ba\u03c4\u03c5\u03bf Full duplex Fast Ethernet
general = \u0393\u03b5\u03bd\u03b9\u03ba\u03ac
generatingReport = \u03a0\u03b1\u03c1\u03b1\u03b3\u03c9\u03b3\u03ae \u03b4\u03b5\u03bb\u03c4\u03af\u03bf\u03c5 \u03c0\u03c1\u03bf\u03b2\u03bb\u03ae\u03bc\u03b1\u03c4\u03bf\u03c2: \u0391\u03c5\u03c4\u03ae \u03b7 \u03b1\u03bd\u03b1\u03c6\u03bf\u03c1\u03ac \u03b8\u03b1 \u03c4\u03b1\u03c7\u03c5\u03b4\u03c1\u03bf\u03bc\u03b7\u03b8\u03b5\u03af \u03c3\u03c4\u03bf \u03c0\u03c1\u03cc\u03c3\u03c9\u03c0\u03bf \u03c0\u03bf\u03c5 \u03b8\u03b1 \u03b5\u03c0\u03b9\u03bb\u03ad\u03be\u03b5\u03c4\u03b5
-getWeb100Var = Get WEB100 Variables
+getWeb100Var = Get Web100 Variables
+getWeb10gVar = Get Web10G Variables
halfDuplex = \u03c5\u03c0\u03bf\u03b4\u03af\u03ba\u03c4\u03c5\u03bf Half duplex Fast Ethernet
-id = TCP/Web100 \u0395\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03bf \u0394\u03b9\u03ac\u03b3\u03bd\u03c9\u03c3\u03b7\u03c2 \u0394\u03b9\u03ba\u03c4\u03cd\u03bf\u03c5
+id = TCP/Web100/Web10G \u0395\u03c1\u03b3\u03b1\u03bb\u03b5\u03af\u03bf \u0394\u03b9\u03ac\u03b3\u03bd\u03c9\u03c3\u03b7\u03c2 \u0394\u03b9\u03ba\u03c4\u03cd\u03bf\u03c5
immediate = \u03b1\u03bc\u03ad\u03c3\u03c9\u03c2
inboundTest = Tcpbw100 \u03b4\u03bf\u03ba\u03b9\u03bc\u03ae \u03b5\u03b9\u03c3\u03b5\u03c1\u03c7\u03cc\u03bc\u03b5\u03bd\u03b7\u03c2 \u03ba\u03af\u03bd\u03b7\u03c3\u03b7\u03c2...
inboundWrongMessage = \u0394\u03bf\u03ba\u03b9\u03bc\u03ae: \u03c4\u03b1\u03c7\u03cd\u03c4\u03b7\u03c4\u03b1 \u03b4\u03b9\u03b1\u03bc\u03b5\u03c4\u03b1\u03b3\u03c9\u03b3\u03ae\u03c2 \u03b1\u03c0\u03cc \u03c0\u03b5\u03bb\u03ac\u03c4\u03b7 \u03c0\u03c1\u03bf\u03c2 \u03b5\u03be\u03c5\u03c0\u03b7\u03c1\u03b5\u03c4\u03b7\u03c4\u03ae: \u039b\u03ac\u03b2\u03b1\u03bc\u03b5 \u03bb\u03ac\u03b8\u03bf\u03c2 \u03c4\u03cd\u03c0\u03bf \u03bc\u03b7\u03bd\u03cd\u03bc\u03b1\u03c4\u03bf\u03c2
@@ -211,11 +212,17 @@
version = \u0388\u03ba\u03b4\u03bf\u03c3\u03b7
versionWrongMessage = \u0394\u03b9\u03b1\u03c0\u03c1\u03b1\u03b3\u03bc\u03ac\u03c4\u03b5\u03c5\u03c3\u03b7 \u03ad\u03ba\u03b4\u03bf\u03c3\u03b7\u03c2 \u03c4\u03bf\u03c5 NDT: \u039b\u03ac\u03b2\u03b1\u03bc\u03b5 \u03bb\u03ac\u03b8\u03bf\u03c2 \u03c4\u03cd\u03c0\u03bf\u03c5 \u03bc\u03b7\u03bd\u03cd\u03bc\u03b1\u03c4\u03bf\u03c2
web100Details = Web100 \u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03b5\u03c1\u03ae\u03c2 \u03b1\u03bd\u03ac\u03bb\u03c5\u03c3\u03b7
-web100KernelVar = WEB100 \u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 \u03c4\u03bf\u03c5 \u03c0\u03c5\u03c1\u03ae\u03bd\u03b1
-web100Stats = \u03a3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ac \u03bc\u03ad\u03c3\u03c9 \u03c4\u03bf\u03c5 WEB100
+web100KernelVar = Web100 \u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 \u03c4\u03bf\u03c5 \u03c0\u03c5\u03c1\u03ae\u03bd\u03b1
+web100Stats = \u03a3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ac \u03bc\u03ad\u03c3\u03c9 \u03c4\u03bf\u03c5 Web100
web100Var = \u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 Web100
web100rtt = To Web100 \u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b5\u03b9 \u03cc\u03c4\u03b9 \u03bf \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2 \u03b1\u03c0\u03cc\u03ba\u03c1\u03b9\u03c3\u03b7\u03c2 (Round trip time)
web100tcpOpts = To Web100 \u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b5\u03b9 \u03cc\u03c4\u03b9 \u03c4\u03bf TCP \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af \u03c4\u03b9\u03c2 \u03b5\u03be\u03ae\u03c2 \u03c1\u03c5\u03b8\u03bc\u03af\u03c3\u03b5\u03b9\u03c2:
+web10gDetails = Web10G \u039b\u03b5\u03c0\u03c4\u03bf\u03bc\u03b5\u03c1\u03ae\u03c2 \u03b1\u03bd\u03ac\u03bb\u03c5\u03c3\u03b7
+web10gKernelVar = Web10G \u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 \u03c4\u03bf\u03c5 \u03c0\u03c5\u03c1\u03ae\u03bd\u03b1
+web10gStats = \u03a3\u03c4\u03b1\u03c4\u03b9\u03c3\u03c4\u03b9\u03ba\u03ac \u03bc\u03ad\u03c3\u03c9 \u03c4\u03bf\u03c5 Web10G
+web10gVar = \u039c\u03b5\u03c4\u03b1\u03b2\u03bb\u03b7\u03c4\u03ad\u03c2 Web10G
+web10grtt = To Web10G \u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b5\u03b9 \u03cc\u03c4\u03b9 \u03bf \u03c7\u03c1\u03cc\u03bd\u03bf\u03c2 \u03b1\u03c0\u03cc\u03ba\u03c1\u03b9\u03c3\u03b7\u03c2 (Round trip time)
+web10gtcpOpts = To Web10G \u03b1\u03bd\u03b1\u03c6\u03ad\u03c1\u03b5\u03b9 \u03cc\u03c4\u03b9 \u03c4\u03bf TCP \u03c7\u03c1\u03b7\u03c3\u03b9\u03bc\u03bf\u03c0\u03bf\u03b9\u03b5\u03af \u03c4\u03b9\u03c2 \u03b5\u03be\u03ae\u03c2 \u03c1\u03c5\u03b8\u03bc\u03af\u03c3\u03b5\u03b9\u03c2:
willImprove = \u03b8\u03b1 \u03b2\u03b5\u03bb\u03c4\u03b9\u03ce\u03c3\u03b5\u03b9 \u03c4\u03b7\u03bd \u03b5\u03c0\u03af\u03b4\u03bf\u03c3\u03b7
workstation = \u03a3\u03c4\u03b1\u03b8\u03bc\u03cc\u03c2 \u03b5\u03c1\u03b3\u03b1\u03c3\u03af\u03b1\u03c2
your = \u03a4\u03bf \u03b4\u03b9\u03ba\u03cc \u03c3\u03b1\u03c2
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_en_US.properties Thu Oct 10 08:36:25 2013 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_en_US.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,9 +73,10 @@
fullDuplex = Full duplex Fast Ethernet subnet
general = General
generatingReport = Generating Trouble Report: This report will be emailed to the person you specify
-getWeb100Var = Get WEB100 Variables
+getWeb100Var = Get Web100 Variables
+getWeb10gVar = Get Web10G Variables
halfDuplex = Half duplex Fast Ethernet subnet
-id = TCP/Web100 Network Diagnostic Tool
+id = TCP/Web100/Web10G Network Diagnostic Tool
immediate = immediate
inboundTest = Tcpbw100 inbound test...
inboundWrongMessage = C2S throughput test: Received wrong type of the message
@@ -211,11 +212,17 @@
version = Version
versionWrongMessage = Negotiating NDT version: Received wrong type of the message
web100Details = Web100 Detailed Analysis
-web100KernelVar = WEB100 Kernel Variables
-web100Stats = WEB100 Enabled Statistics
+web100KernelVar = Web100 Kernel Variables
+web100Stats = Web100 Enabled Statistics
web100Var = Web100 Variables
web100rtt = Web100 reports the Round trip time
web100tcpOpts = Web100 reports TCP negotiated the optional Performance Settings to:
+web10gDetails = Web10G Detailed Analysis
+web10gKernelVar = Web10G Kernel Variables
+web10gStats = Web10G Enabled Statistics
+web10gVar = Web10G Variables
+web10grtt = Web10G reports the Round trip time
+web10gtcpOpts = Web10G reports TCP negotiated the optional Performance Settings to:
willImprove = will improve performance
workstation = Workstation
your = Your
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_fr_FR.properties Tue May 10 08:51:49 2011 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_fr_FR.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,9 +73,10 @@
fullDuplex = Full duplex Fast Ethernet subnet
general = G\u00E9n\u00E9ral
generatingReport = G\u00E9n\u00E9ration du rapport d'incident: Ce rapport sera envoy\u00E9 \u00E0 la personne sp\u00E9cifi\u00E9e
-getWeb100Var = R\u00E9cup\u00E9rer les variables WEB100
+getWeb100Var = R\u00E9cup\u00E9rer les variables Web100
+getWeb10gVar = R\u00E9cup\u00E9rer les variables Web10G
halfDuplex = Half duplex Fast Ethernet subnet
-id = Outil de diagnostics r\u00E9seau TCP/Web100
+id = Outil de diagnostics r\u00E9seau TCP/Web100/Web10G
immediate = imm\u00E9diat
inboundTest = test d'entr\u00E9e Tcpbw100...
inboundWrongMessage = Test de d\u00E9bit C2S : r\u00E9ception du mauvais type de message
@@ -211,11 +212,17 @@
version = Version
versionWrongMessage = Negotiating NDT version: r\u00E9ception du mauvais type de message
web100Details = Analyse d\u00E9taill\u00E9e Web100
-web100KernelVar = Variables du noyau WEB100
-web100Stats = Statistiques activ\u00E9es WEB100
+web100KernelVar = Variables du noyau Web100
+web100Stats = Statistiques activ\u00E9es Web100
web100Var = Variables Web100
web100rtt = Web100 rapporte le temps d'aller-retour (RTT)
web100tcpOpts = Web100 rapporte que TCP a n\u00E9goci\u00E9 les param\u00E8tres de performances facultatifs \u00E0 :
+web10gDetails = Analyse d\u00E9taill\u00E9e Web10G
+web10gKernelVar = Variables du noyau Web10G
+web10gStats = Statistiques activ\u00E9es WebB10G
+web10gVar = Variables Web10G
+web10grtt = Web10G rapporte le temps d'aller-retour (RTT)
+web10gtcpOpts = Web10G rapporte que TCP a n\u00E9goci\u00E9 les param\u00E8tres de performances facultatifs \u00E0 :
willImprove = am\u00E9liorera les performances
workstation = Poste de travail
your = Votre
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_nb_NO.properties Tue May 10 08:51:49 2011 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_nb_NO.properties Tue Oct 15 13:07:11 2013 UTC
@@ -74,9 +74,10 @@
fullDuplex = full dupleks "Fast Ethernet"-subnett
general = Annet
generatingReport = Genererer feilrapport; denne vil bli sendt til personen du spesifiserer
-getWeb100Var = Viser variabler fra WEB100
+getWeb100Var = Viser variabler fra Web100
+getWeb10gVar = Viser variabler fra Web10G
halfDuplex = Halv-dupleks "Fast Ethernet"-subnett
-id = TCP/Web100 nettverksdiagnostikkverkt\u00f8y
+id = TCP/Web100/Web10G nettverksdiagnostikkverkt\u00f8y
immediate = umiddelbart
inboundTest = Tcpbw100 innkommende test...
inboundWrongMessage = Klient-til-tjener-ytelsestest: mottok feil melding
@@ -213,11 +214,17 @@
version = Versjon
versionWrongMessage = Avtaler NDT-versjon: Mottok feil type melding
web100Details = Detaljerte opplysninger fra Web100
-web100KernelVar = Kjernevariabler fra WEB100
-web100Stats = Statistikk fra WEB100
+web100KernelVar = Kjernevariabler fra Web100
+web100Stats = Statistikk fra Web100
web100Var = Variabler fra Web100
web100rtt = Web100 melder at rundreisetid
web100tcpOpts = Web100 melder at valgbare felt i TCP som p\u00e5virker ytelse er satt til:
+web10gDetails = Detaljerte opplysninger fra Web10G
+web10gKernelVar = Kjernevariabler fra Web10G
+web10gStats = Statistikk fra Web10G
+web10gVar = Variabler fra Web10G
+web10grtt = Web10G melder at rundreisetid
+web10gtcpOpts = Web10G melder at valgbare felt i TCP som p\u00e5virker ytelse er satt til:
willImprove = vil forbedre ytelsen
workstation = Arbeidsstasjon
your = Din
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_nl_NL.properties Tue May 10 08:51:49 2011 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_nl_NL.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,9 +73,10 @@
fullDuplex = Full duplex Fast Ethernet subnet
general = normaal
generatingReport = Probleem Rapport Genereren: Dit rapport wordt gemaild naar de persoon die u opgeeft
-getWeb100Var = Vraag WEB100 Variabelen op
+getWeb100Var = Vraag Web100 Variabelen op
+getWeb10gVar = Vraag Web10G Variabelen op
halfDuplex = Half duplex Fast Ethernet subnet
-id = TCP/Web100 Network Diagnostic Tool
+id = TCP/Web100/Web10G Network Diagnostic Tool
immediate = direct
inboundTest = Tcpbw100 inkomende test...
inboundWrongMessage = C2S doorvoer test: Verkeerd type bericht ontvangen
@@ -211,11 +212,17 @@
version = Versie
versionWrongMessage = Overleggen NDT versie: Verkeerd type bericht ontvangen
web100Details = Web100 gedetaileerde Analyze
-web100KernelVar = WEB100 Kernel Variabelen
-web100Stats = WEB100 Enabled Statistieken
+web100KernelVar = Web100 Kernel Variabelen
+web100Stats = Web100 Enabled Statistieken
web100Var = Web100 Variabelen
web100rtt = Web100 rapporteerd de Round trip time
web100tcpOpts = Web100 heeft voor TCP de volgende optionele settings overlegd:
+web10gDetails = Web10G gedetaileerde Analyze
+web10gKernelVar = Web10G Kernel Variabelen
+web10gStats = Web10G Enabled Statistieken
+web10gVar = Web10G Variabelen
+web10grtt = Web10G rapporteerd de Round trip time
+web10gtcpOpts = Web10G heeft voor TCP de volgende optionele settings overlegd:
willImprove = zal de performance verbeteren
workstation = Werkstation
your = Uw
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_pt_BR.properties Tue May 10 08:51:49 2011 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_pt_BR.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,9 +73,10 @@
fullDuplex = sub-rede Full duplex Fast Ethernet
general = Geral
generatingReport = Gerando Relat\u00F3rio de Problemas: Esse relat\u00F3rio ser\u00E1 enviado por email para a pessoa que voc\u00EA especificar
-getWeb100Var = Buscar vari\u00E1veis web100
+getWeb100Var = Buscar vari\u00E1veis Web100
+getWeb10gVar = Buscar vari\u00E1veis Web10G
halfDuplex = sub-rede Half duplex Fast Ethernet
-id = TCP/Web100 Ferramenta de Diagn\u00F3stico da Rede
+id = TCP/Web100/Web10G Ferramenta de Diagn\u00F3stico da Rede
immediate = imediato
inboundTest = Tcpbw100 teste de entrada inbound test...
inboundWrongMessage = C2S teste de taxa de transfer\u00EAncia: Tipo errado de mensagem foi recebido
@@ -209,12 +210,18 @@
vendor = Fabricante
version = Vers\u00E3o
versionWrongMessage = Negociando vers\u00E3o do NDT : Tipo errado de mensagem foi recebido
-web100Details = An\u00E1lise detalhada WEB100
-web100KernelVar = Vari\u00E1veis do Kernel WEB100
-web100Stats = Estat\u00EDsticas WEB100 dispon\u00EDveis
+web100Details = An\u00E1lise detalhada Web100
+web100KernelVar = Vari\u00E1veis do Kernel Web100
+web100Stats = Estat\u00EDsticas Web100 dispon\u00EDveis
web100Var = Vari\u00E1veis Web100
web100rtt = Web100 reporta o tempo de Ida e Volta
web100tcpOpts = Web100 verifica que TCP negociou as configura\u00E7\u00F5es de performance opicionais para:
+web10gDetails = An\u00E1lise detalhada Web10G
+web10gKernelVar = Vari\u00E1veis do Kernel Web10G
+web10gStats = Estat\u00EDsticas Web10G dispon\u00EDveis
+web10gVar = Vari\u00E1veis Web10G
+web10grtt = Web10G reporta o tempo de Ida e Volta
+web10gtcpOpts = Web10G verifica que TCP negociou as configura\u00E7\u00F5es de performance opicionais para:
willImprove = ir\u00E1 melhorar a performance
workstation = Esta\u00E7\u00E3o de trabalho
your = Sua
=======================================
--- /branches/applet_usability/Applet/Tcpbw100_msgs_ru_RU.properties Tue May 10 08:51:49 2011 UTC
+++ /branches/applet_usability/Applet/Tcpbw100_msgs_ru_RU.properties Tue Oct 15 13:07:11 2013 UTC
@@ -73,8 +73,10 @@
fullDuplex = \u043F\u043E\u043B\u043D\u043E\u0434\u0443\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F Fast Ethernet \u043F\u043E\u0434\u0441\u0435\u0442\u044C
general= \u041E\u0431\u0449\u0438\u0435
generatingReport = \u0413\u043E\u0442\u043E\u0432\u0438\u0442\u0441\u044F \u043E\u0442\u0447\u0435\u0442 \u043E \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0435: \u0414\u0430\u043D\u043D\u044B\u0439 \u043E\u0442\u0447\u0435\u0442 \u0431\u0443\u0434\u0435\u0442 \u0432\u044B\u0441\u043B\u0430\u043D \u0443\u043A\u0430\u0437\u0430\u043D\u043D\u044B\u043C \u043B\u0438\u0446\u0430\u043C
-getWeb100Var = \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C WEB100 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
-halfDuplex = \u043F\u043E\u043B\u0443\u0434\u0443\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F Fast Ethernet \u043F\u043E\u0434\u0441\u0435\u0442\u044C ID = TCP/Web100 Network Diagnostic Tool (NDT)
+getWeb100Var = \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C Web100 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
+getWeb100Var = \u041F\u043E\u043B\u0443\u0447\u0438\u0442\u044C Web10G \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
+halfDuplex = \u043F\u043E\u043B\u0443\u0434\u0443\u043F\u043B\u0435\u043A\u0441\u043D\u0430\u044F Fast Ethernet \u043F\u043E\u0434\u0441\u0435\u0442\u044C
+id = TCP/Web100/Web10G Network Diagnostic Tool (NDT)
immediate = \u0441\u0438\u044E \u043C\u0438\u043D\u0443\u0442\u0443
inboundTest = Tcpbw100 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0439 \u0442\u0435\u0441\u0442 ...
inboundWrongMessage = C2S \u0442\u0435\u0441\u0442 \u043D\u0430 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u043D\u0443\u044E \u0441\u043F\u043E\u0441\u043E\u0431\u043D\u043E\u0441\u0442\u044C:\u041F\u043E\u043B\u0443\u0447\u0435\u043D \u043D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u0442\u0438\u043F \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F
@@ -208,12 +210,18 @@
vendor = \u041F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C
version = \u0412\u0435\u0440\u0441\u0438\u044F
versionWrongMessage = \u0412\u044B\u044F\u0441\u043D\u0435\u043D\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u0418\u0421\u0414: \u041F\u043E\u043B\u0443\u0447\u0435\u043D \u043D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u044B\u0439 \u0442\u0438\u043F \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u044F
-web100Details = WEB100 \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u044B\u0439 \u041E\u0442\u0447\u0435\u0442
-web100KernelVar = WEB100 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u044F\u0434\u0440\u0430
-web100Stats = WEB100 \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430
-web100Var = WEB100 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
-web100rtt = WEB100 \u0441\u043E\u043E\u0431\u0449\u0430\u0435\u0442 \u043E \u0442\u0443\u0434\u0430-\u043E\u0431\u0440\u0430\u0442\u043D\u043E\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043A\u0435 (RTT)
-web100tcpOpts = WEB100 \u0441\u043E\u043E\u0431\u0449\u0430\u0435\u0442 \u043E \u0442\u043E\u043C \u0447\u0442\u043E \u0432 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0435 \u043E\u0431\u043C\u0435\u043D\u0430 TCP \u0431\u044B\u043B\u0438 \u043D\u0430\u0439\u0434\u0435\u043D\u044B \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438:
+web100Details = Web100 \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u044B\u0439 \u041E\u0442\u0447\u0435\u0442
+web100KernelVar = Web100 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u044F\u0434\u0440\u0430
+web100Stats = Web100 \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430
+web100Var = Web100 \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
+web100rtt = Web100 \u0441\u043E\u043E\u0431\u0449\u0430\u0435\u0442 \u043E \u0442\u0443\u0434\u0430-\u043E\u0431\u0440\u0430\u0442\u043D\u043E\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043A\u0435 (RTT)
+web100tcpOpts = Web100 \u0441\u043E\u043E\u0431\u0449\u0430\u0435\u0442 \u043E \u0442\u043E\u043C \u0447\u0442\u043E \u0432 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0435 \u043E\u0431\u043C\u0435\u043D\u0430 TCP \u0431\u044B\u043B\u0438 \u043D\u0430\u0439\u0434\u0435\u043D\u044B \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438:
+web10gDetails = Web10G \u041F\u043E\u0434\u0440\u043E\u0431\u043D\u044B\u0439 \u041E\u0442\u0447\u0435\u0442
+web10gKernelVar = Web10G \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u044F\u0434\u0440\u0430
+web10gStats = Web10G \u0421\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043A\u0430 \u0432\u043A\u043B\u044E\u0447\u0435\u043D\u0430
+web10gVar = Web10G \u043F\u0435\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435
+web10grtt = Web10G \u0441\u043E\u043E\u0431\u0449\u0430\u0435\u0442 \u043E \u0442\u0443\u0434\u0430-\u043E\u0431\u0440\u0430\u0442\u043D\u043E\u0439 \u0437\u0430\u0434\u0435\u0440\u0436\u043A\u0435 (RTT)
+web10gtcpOpts = Web10G \u0441\u043E\u043E\u0431\u0449\u0430\u0435\u0442 \u043E \u0442\u043E\u043C \u0447\u0442\u043E \u0432 \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\u0435 \u043E\u0431\u043C\u0435\u043D\u0430 TCP \u0431\u044B\u043B\u0438 \u043D\u0430\u0439\u0434\u0435\u043D\u044B \u0434\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u043F\u0430\u0440\u0430\u043C\u0435\u0442\u0440\u044B \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438:
willImprove = \u043F\u043E\u0437\u0432\u043E\u043B\u0438\u0442 \u043F\u043E\u0432\u044B\u0441\u0438\u0442\u044C \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0441\u043E\u0435\u0434\u0438\u043D\u0435\u043D\u0438\u0439
workstation = \u0420\u0430\u0431\u043E\u0447\u0430\u044F \u0421\u0442\u0430\u043D\u0446\u0438\u044F
your = \u0412\u0430\u0448
=======================================
--- /branches/applet_usability/configure.ac Tue Sep 24 13:49:33 2013 UTC
+++ /branches/applet_usability/configure.ac Tue Oct 15 13:07:11 2013 UTC
@@ -29,7 +29,7 @@
# Process this file with autoconf to produce a configure script.
#
# AC_PREREQ(2.57)
-AC_INIT([NDT],[3.6.5.2],[])
+AC_INIT([NDT],[3.6.6-rc1],[])
AC_CONFIG_AUX_DIR(config)
# AM_INIT_AUTOMAKE(NDT, v1.0, [no-define])
AM_INIT_AUTOMAKE
@@ -146,6 +146,19 @@
AM_CONDITIONAL(HAVE_WEB100, false)
])

+AC_CHECK_LIB([estats], [estats_record_open],
+ [
+ LINKED_WEB10GLIB="-lestats"
+ INCLUDED_WEB10GLIB="-I/usr/local/include/estats"
+ AC_DEFINE(HAVE_LIBWEB10G, 1, [Define to 1 if you have the 'Web10G' library (-lestats >=2.0.6.2).])
+ AM_CONDITIONAL(HAVE_WEB10G, true)
+ ],
+ [
+ LINKED_WEB10GLIB=""
+ INCLUDED_WEB10GLIB=""
+ AM_CONDITIONAL(HAVE_WEB10G, false)
+ ])
+
AC_CHECK_LIB([pcap], [pcap_open_live],
[
LINKED_PCAPLIB="-lpcap"
@@ -197,14 +210,16 @@
])


-NDTINCDIR='$(INCLUDED_WEB100LIB) $(INCLUDED_PCAPLIB)'
+NDTINCDIR='$(INCLUDED_WEB100LIB) $(INCLUDED_PCAPLIB) $(INCLUDED_WEB10GLIB)'
NDTLIBDIR=/usr/local/lib
NDTLDFLAGS='-L$(NDTLIBDIR) -Wl,-rpath,$(NDTLIBDIR)'
-NDTLIBS='$(LINKED_WEB100LIB) $(LINKED_PCAPLIB) $(LINKED_ODBCLIB) -lm'
+NDTLIBS='$(LINKED_WEB100LIB) $(LINKED_PCAPLIB) $(LINKED_ODBCLIB) $(LINKED_WEB10GLIB) -lm'
NDTINCS='-I$(NDTINCDIR)'

AC_SUBST(LINKED_WEB100LIB)
AC_SUBST(INCLUDED_WEB100LIB)
+AC_SUBST(LINKED_WEB10GLIB)
+AC_SUBST(INCLUDED_WEB10GLIB)
AC_SUBST(LINKED_PCAPLIB)
AC_SUBST(INCLUDED_PCAPLIB)
AC_SUBST(LINKED_ODBCLIB)
@@ -275,6 +290,19 @@
echo ""
echo ""

+if test -z "$HAVE_WEB10G_TRUE" && test -n "$HAVE_WEB10G_FALSE"; then
+if test -z "$HAVE_PCAP_H_TRUE" && test -n "$HAVE_PCAP_H_FALSE"; then
+ SUMMARY_WEB10GSRV="YES"
+ SUMMARY_GENPLOT10G="YES"
+else
+ SUMMARY_GENPLOT10G="YES"
+ SUMMARY_WEB10GSRV="NO (missing pcap headers)"
+fi
+else
+ SUMMARY_WEB10GSRV="NO (missing web10g userland library >=2.0.6.2)"
+ SUMMARY_GENPLOT10G="NO (missing web10g userland library >=2.0.6.2)"
+fi
+
SUMMARY_WEB100CLT="YES"
if test -z "$HAVE_WEB100_TRUE" && test -n "$HAVE_WEB100_FALSE"; then
if test -z "$HAVE_PCAP_H_TRUE" && test -n "$HAVE_PCAP_H_FALSE"; then
@@ -314,13 +342,14 @@
echo "* web100clt: ${SUMMARY_WEB100CLT}"
echo ""

-if test "$SUMMARY_FAKEWWW" = "YES" && test "$SUMMARY_WEB100SRV" = "YES" && test "$SUMMARY_TCPBW100JAR" = "YES"; then
+if test "$SUMMARY_FAKEWWW" = "YES" && (test "$SUMMARY_WEB100SRV" = "YES" | | test "$SUMMARY_WEB100GSRV" = "YES") && test "$SUMMARY_TCPBW100JAR" = "YES"; then
echo "*** Server Tools - complete"
else
echo "*** Server Tools - incomplete"
fi
echo "* fakewww: ${SUMMARY_FAKEWWW}"
echo "* web100srv: ${SUMMARY_WEB100SRV}"
+echo "* web10gsrv: ${SUMMARY_WEB10GSRV}"
echo "* Tcpbw100.jar: ${SUMMARY_TCPBW100JAR}"
echo ""

@@ -333,6 +362,7 @@
echo "* viewtrace: ${SUMMARY_VIEWTRACE}"
echo "* tr-mkmap: ${SUMMARY_TRMKMAP}"
echo "* genplot: ${SUMMARY_GENPLOT}"
+echo "* genplot10g: ${SUMMARY_GENPLOT10G}"
echo "* JAnalyze.jar: ${SUMMARY_JANALYZEJAR}"
echo "* Admin.class: ${SUMMARY_ADMINCLASS}"
echo ""
=======================================
--- /branches/applet_usability/cpplint.sh Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/cpplint.sh Tue Oct 15 13:07:11 2013 UTC
@@ -1,7 +1,5 @@
#!/bin/bash

-for f in src/*.[ch]; do
- ./cpplint.py \
- --filter=-legal/copyright,-readability/casting,-build/include_order,-runtime/threadsafe_fn,-build/include \
- $f
-done
+./cpplint.py \
+ --filter=-legal/copyright,-readability/casting,-build/include_order,-runtime/threadsafe_fn,-build/include \
+ src/*.[ch]
=======================================
--- /branches/applet_usability/src/Makefile.am Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/Makefile.am Tue Oct 15 13:07:11 2013 UTC
@@ -33,38 +33,61 @@
bin_PROGRAMS = web100clt
endif

+if HAVE_WEB10G
+if HAVE_PCAP_H
+if HAVE_WEB100
+sbin_PROGRAMS += web10gsrv genplot10g
+else
+sbin_PROGRAMS = fakewww web10gsrv genplot10g
+endif
+endif
+endif
+
web100clt_SOURCES = web100clt.c network.c usage.c logging.c utils.c protocol.c runningtest.c ndtptestconstants.c \
test_sfw_clt.c test_mid_clt.c test_c2s_clt.c test_s2c_clt.c test_meta_clt.c strlutils.c \
- test_results_clt.c
+ test_results_clt.c
web100clt_LDADD = $(I2UTILLIBDEPS) -lpthread $(ZLIB)
web100clt_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'
web100clt_DEPENDENCIES = $(I2UTILLIBDEPS)

genplot_SOURCES = genplot.c usage.c
genplot_LDADD = $(NDTLIBS) $(I2UTILLIBDEPS)
-genplot_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'
+genplot_CPPFLAGS ='-DBASEDIR="$(ndtdir)"' -DFORCE_WEB100
+
+genplot10g_SOURCES = genplot.c usage.c web10g-util.c utils.c
+genplot10g_LDADD = $(NDTLIBS) $(I2UTILLIBDEPS)
+genplot10g_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'

analyze_SOURCES = analyze.c usage.c logging.c runningtest.c ndtptestconstants.c strlutils.c
analyze_LDADD = $(NDTLIBS) $(I2UTILLIBDEPS) $(ZLIB)
-analyze_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'
+analyze_CPPFLAGS ='-DBASEDIR="$(ndtdir)"' -DFORCE_WEB100

fakewww_SOURCES = fakewww.c troute.c troute6.c tr-tree.c tr-tree6.c network.c usage.c logging.c \
- runningtest.c ndtptestconstants.c strlutils.c
+ runningtest.c ndtptestconstants.c strlutils.c
fakewww_LDADD = $(I2UTILLIBDEPS) $(ZLIB)
fakewww_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'

web100srv_SOURCES = web100srv.c web100-util.c web100-pcap.c web100-admin.c runningtest.c \
network.c usage.c utils.c mrange.c logging.c testoptions.c ndtptestconstants.c \
protocol.c test_sfw_srv.c test_meta_srv.c ndt_odbc.c strlutils.c heuristics.c \
- test_c2s_srv.c test_s2c_srv.c test_mid_srv.c
+ test_c2s_srv.c test_s2c_srv.c test_mid_srv.c
web100srv_LDFLAGS = $(NDTLDFLAGS) $(I2UTILLDFLAGS)
web100srv_LDADD = $(NDTLIBS) $(I2UTILLIBS) $(I2UTILLIBDEPS) -lpthread $(ZLIB)
-web100srv_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'
+web100srv_CPPFLAGS ='-DBASEDIR="$(ndtdir)"' -DFORCE_WEB100
web100srv_DEPENDENCIES = $(I2UTILLIBDEPS)

+web10gsrv_SOURCES = web100srv.c web100-util.c web100-pcap.c web100-admin.c runningtest.c \
+ network.c usage.c utils.c mrange.c logging.c testoptions.c ndtptestconstants.c \
+ protocol.c test_sfw_srv.c test_meta_srv.c ndt_odbc.c strlutils.c heuristics.c \
+ test_c2s_srv.c test_s2c_srv.c test_mid_srv.c web10g-util.c
+web10gsrv_LDFLAGS = $(NDTLDFLAGS) $(I2UTILLDFLAGS)
+web10gsrv_LDADD = $(NDTLIBS) $(I2UTILLIBS) $(I2UTILLIBDEPS) -lpthread $(ZLIB)
+web10gsrv_CPPFLAGS = '-DBASEDIR="$(ndtdir)"'
+web10gsrv_DEPENDENCIES = $(I2UTILLIBDEPS)
+
viewtrace_SOURCES = viewtrace.c usage.c logging.c utils.c runningtest.c ndtptestconstants.c strlutils.c
viewtrace_LDADD = $(NDTLIBS) $(I2UTILLIBDEPS) $(ZLIB)
-viewtrace_CPPFLAGS ='-DBASEDIR="$(ndtdir)"'
+viewtrace_CPPFLAGS ='-DBASEDIR="$(ndtdir)"' -DFORCE_WEB100

tr_mkmap_SOURCES = tr-mkmap.c tr-tree.c tr-tree6.c usage.c logging.c runningtest.c ndtptestconstants.c strlutils.c
tr_mkmap_LDADD = $(NDTLIBS) $(I2UTILLIBDEPS) $(ZLIB)
@@ -88,5 +111,5 @@

EXTRA_DIST = clt_tests.h logging.h mrange.h network.h protocol.h testoptions.h test_sfw.h test_meta.h \
troute.h tr-tree.h usage.h utils.h varinfo.h web100-admin.h web100srv.h ndt_odbc.h runningtest.h ndtptestconstants.h \
- heuristics.h strlutils.h test_results_clt.h tests_srv.h
+ heuristics.h strlutils.h test_results_clt.h tests_srv.h

=======================================
--- /branches/applet_usability/src/genplot.c Thu Nov 15 21:34:19 2012 UTC
+++ /branches/applet_usability/src/genplot.c Tue Oct 15 13:07:11 2013 UTC
@@ -28,10 +28,7 @@
#include <getopt.h>
#include <sys/types.h>

-#ifdef HAVE_LIBWEB100
-#include <web100.h>
-#endif
-
+#include "web100srv.h"
#include "usage.h"

char *color[16] = { "green", "blue", "orange", "red", "yellow", "magenta",
@@ -42,6 +39,10 @@
0, 0, 'R' }, { "throughput", 0, 0, 'S' }, { "cwndtime", 0, 0, 'c' }, {
"help", 0, 0, 'h' }, { "version", 0, 0, 'v' }, { 0, 0, 0, 0 } };

+/**
+ * @param x
+ * @return x unless x == 2147483647 in which case -1 is returned.
+ */
int checkmz(int x) {
if (x == 2147483647) {
return -1;
@@ -49,16 +50,128 @@
return x;
}

-void get_title(web100_snapshot* snap, web100_log* log, web100_agent* agent,
- web100_group* group, char* title, char* remport) {
+
+#if USE_WEB100
+
+#define ELAPSED_TIME "Duration"
+#define TIME_SENDER "SndLimTimeSender"
+#define DATA_OCT_OUT "DataBytesOut"
+
+#elif USE_WEB10G
+
+#define Chk(x) \
+ do { \
+ err = (x); \
+ if (err != NULL) { \
+ goto Cleanup; \
+ } \
+ } while (0)
+
+/* ElapsedMicroSecs is the one of the only things not yet working in the
+ * kernel patch. Instead use snaplog timestamps to fake this */
+static uint64_t start_time = 0;
+#define ELAPSED_TIME "ElapsedMicroSecs"
+#define TIME_SENDER "SndLimTimeSnd"
+#define DATA_OCT_OUT "HCDataOctetsOut"
+
+/* web10g-util.c needs logging but we don't want real logging
+ * so let it link with this version and print to stderr */
+void log_println(int lvl, const char* format, ...) {
+ va_list ap;
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
+
+#endif
+
+/**
+ * Given a snap (likely read from a log) read a value as a double.
+ * Upon failure will exit the program with error code EXIT_FAILURE.
+ *
+ *
+ * @param name The name of the variable to read in Web100/Web10G.
+ * @param snap A Web100/Web10G snap
+ * @param group A Web100 group - ignored by Web10G should be NULL
+ * @param agent A Web100 agent - ignored by Web10G should be NULL
+ *
+ * @return The value of 'name' covnerted to a double.
+ */
+double tcp_stat_read_double(const char * name, tcp_stat_snap* snap,
+ tcp_stat_group* group, tcp_stat_agent* agent) {
+#if USE_WEB100
web100_var* var;
- char buf[128];
+ char buf[256];
+#elif USE_WEB10G
+ estats_val val;
+#endif

- if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_log_open_read");
- return;
+#if USE_WEB100
+ if ((web100_agent_find_var_and_group(agent, name, &group,
+ &var)) != WEB100_ERR_SUCCESS) {
+ web100_perror("web100_agent_find_var_and_group");
+ exit(EXIT_FAILURE);
}

+ if ((web100_snap_read(var, snap, buf)) != WEB100_ERR_SUCCESS) {
+ web100_perror("web100_snap_read");
+ exit(EXIT_FAILURE);
+ }
+ return atof(
+ web100_value_to_text(web100_get_var_type(var),
+ buf));
+#elif USE_WEB10G
+ int vartype = ESTATS_UNSIGNED32;
+ /* ELAPSED_TIME not working in kernel patch, so use time on the
+ * snap */
+ if (strcmp(name, ELAPSED_TIME) == 0) {
+ val.masked = 0;
+ val.uv32 = snap->tv.sec * 1000000 + snap->tv.usec - start_time;
+ } else {
+ vartype = web10g_find_val(snap, name, &val);
+ if (vartype == -1) {
+ printf("Bad vartype tcp_stat_read_double %s\n", name);
+ exit(EXIT_FAILURE);
+ }
+ }
+ switch (vartype) {
+ case ESTATS_UNSIGNED64:
+ return (double) val.uv64;
+ case ESTATS_UNSIGNED32:
+ return (double) val.uv32;
+ case ESTATS_SIGNED32:
+ return (double) val.sv32;
+ case ESTATS_UNSIGNED16:
+ return (double) val.uv16;
+ case ESTATS_UNSIGNED8:
+ return (double) val.uv8;
+ }
+ fprintf(stderr, "Bad vartype tcp_stat_read_double %s\n", name);
+ exit(EXIT_FAILURE);
+#endif
+}
+
+/**
+ * Get the title info from the snap. That is local address:port remote
+ * address:port.
+ *
+ * For Web10G this also logs the start_time because this is expected
+ * to be the first snap captured.
+ *
+ * @param snap A Web100/Web10G snap
+ * @param agent A Web100 agent - ignored by Web10G should be NULL
+ * @param group A Web100 group - ignored by Web10G should be NULL
+ * @param title Upon return contains the string
+ * "<localaddr>:<localport> --> <remoteaddr>"
+ * @param remport Upon return contains the remote port as a string
+ */
+void get_title(tcp_stat_snap* snap, tcp_stat_agent* agent,
+ tcp_stat_group* group, char* title, char* remport) {
+#if USE_WEB100
+ web100_var* var;
+ char buf[128];
+
if ((web100_agent_find_var_and_group(agent, "LocalAddress", &group, &var))
!= WEB100_ERR_SUCCESS) {
web100_perror("web100_agent_find_var_and_group");
@@ -102,14 +215,64 @@
}
strcpy(remport, web100_value_to_text(web100_get_var_type(var), buf));
/* printf("%s:%s\n", title, remport); */
+#elif USE_WEB10G
+ estats_error* err = NULL;
+ struct estats_connection_tuple_ascii tuple_ascii;
+
+ /* Quite a convenient little function we have */
+ if ((err = estats_connection_tuple_as_strings(&tuple_ascii,
+ &snap->tuple)) != NULL) {
+ /* If using the 3.5 kernel to make snaps it appears that the
+ * address isn't filled in, so continue with unknown */
+ fprintf(stderr, "WARNING estats_connection_tuple_as_string has"
+ " failed this could be due to using the 3.5 kernel patch which"
+ " doesn't log this information!!!!");
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ sprintf(title, "unknown:unknown --> unknown");
+ sprintf(remport, "unknown");
+ // exit(EXIT_FAILURE);
+ }
+
+ sprintf(title, "%s:%s --> %s", tuple_ascii.local_addr,
+ tuple_ascii.local_port, tuple_ascii.rem_addr);
+ sprintf(remport, "%s", tuple_ascii.rem_port);
+ /* Notes the time fo this the first snap in the global start_time
+ * because ElapsedTimeMicroSec is unimplemented in the kernel patch */
+ start_time = snap->tv.sec * 1000000 + snap->tv.usec;
+
+#endif
}

-void plot_var(char *list, int cnt, char *name, web100_snapshot* snap,
- web100_log* log, web100_agent* agent, web100_group* group,
+/**
+ * Plot anything else.
+ *
+ * @param list A comma seperated list of Web100/Web10G names to
+ * plot.
+ * @param cnt The number of items in list to plot, starting from the
+ * start. Shouldn't be larger than the number of items in 'list'
+ * @param name The file name to output to (gets .<remport>.xpls
+ * appended to the end).
+ * @param snap Allocated storage for Web100 - NULL for Web10G
+ * @param log A open Web100/Web10G log file
+ * @param agent A Web100 agent - ignored by Web10G should be NULL
+ * @param group A Web100 group - ignored by Web10G should be NULL
+ * @param func (Can be NULL) A function that expects two integers for
+ * its arguments and returns a new integer. The first interger
+ * corrosponds to the item in 'list' 0 for the first etc.
+ * The second the value in the snap. The returned value is
+ * plotted.
+ * Called once for every list item for ever snap in the log.
+ */
+void plot_var(char *list, int cnt, char *name, tcp_stat_snap* snap,
+ tcp_stat_log* log, tcp_stat_agent* agent, tcp_stat_group* group,
int(*func)(const int arg, const int value)) {
+#if USE_WEB10G
+ estats_error* err = NULL;
+#endif
char *varg;
- char buf[256];
- web100_var* var;
+ /*char buf[256];
+ web100_var* var;*/
char varlist[256], lname[256], remport[8];
char title[256];
int i, first = 0;
@@ -124,11 +287,28 @@

memset(lname, 0, 256);

- get_title(snap, log, agent, group, title, remport);
+ /* Get the first snap from the log */
+#if USE_WEB100
+ if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
+ web100_perror("web100_snap_from_log");
+ return;
+ }
+#elif USE_WEB10G
+ if ((err = estats_record_read_data(&snap, log)) != NULL) {
+ estats_record_close(&log);
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ return;
+ }
+#endif
+
+ get_title(snap, agent, group, title, remport);

if (name == NULL) {
fn = stdout;
- strncpy(name, "Unknown", 7);
+ /* XXX writing into a NULL pointer?? */
+ // strncpy(name, "Unknown", 7);
+ name = "Unknown";
} else {
snprintf(lname, sizeof(lname), "%s.%s.xpl", name, remport);
fn = fopen(lname, "w");
@@ -149,9 +329,14 @@
first = 0;

for (;;) {
+ /* We've already read the first item to use with get_title */
if (first != 0) {
+#if USE_WEB100
if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
- /* web100_perror("web100_log_open_read"); */
+#elif USE_WEB10G
+ if ((err = estats_record_read_data(&snap, log)) != NULL) {
+ estats_error_free(&err);
+#endif
fprintf(fn, "go\n");
return;
}
@@ -159,33 +344,16 @@
strncpy(varlist, list, strlen(list) + 1);
varg = strtok(varlist, ",");
for (i = 0; i < cnt; i++) {
- if ((web100_agent_find_var_and_group(agent, varg, &group, &var))
- != WEB100_ERR_SUCCESS) {
- web100_perror("web100_agent_find_var_and_group");
- exit(EXIT_FAILURE);
- }
-
- if ((web100_snap_read(var, snap, buf)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_snap_read");
- exit(EXIT_FAILURE);
- }
-
if (i == 0) {
if (first == 0) {
if (func) {
x1 = func(
i,
checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(
- var), buf))));
+ tcp_stat_read_double(varg, snap, group, agent)));
} else {
x1 = checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(var),
- buf)));
+ tcp_stat_read_double(varg, snap, group, agent));
}
} else {
x1 = x2;
@@ -196,16 +364,10 @@
y1[i - 1] = func(
i,
checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(
- var), buf))));
+ tcp_stat_read_double(varg, snap, group, agent)));
} else {
y1[i - 1] = checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(var),
- buf)));
+ tcp_stat_read_double(varg, snap, group, agent));
}
} else {
y1[i - 1] = y2[i - 1];
@@ -218,46 +380,25 @@
strncpy(varlist, list, strlen(list) + 1);
varg = strtok(varlist, ",");
for (i = 0; i < cnt; i++) {
- if ((web100_agent_find_var_and_group(agent, varg, &group, &var))
- != WEB100_ERR_SUCCESS) {
- web100_perror("web100_agent_find_var_and_group");
- exit(EXIT_FAILURE);
- }
-
- if ((web100_snap_read(var, snap, buf)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_snap_read");
- exit(EXIT_FAILURE);
- }
-
if (i == 0) {
if (func) {
x2 = func(
i,
checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(var),
- buf))));
+ tcp_stat_read_double(varg, snap, group, agent)));
} else {
x2 = checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(var), buf)));
+ tcp_stat_read_double(varg, snap, group, agent));
}
} else {
if (func) {
y2[i - 1] = func(
i,
checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(var),
- buf))));
+ tcp_stat_read_double(varg, snap, group, agent)));
} else {
y2[i - 1] = checkmz(
- atoi(
- web100_value_to_text(
- web100_get_var_type(var), buf)));
+ tcp_stat_read_double(varg, snap, group, agent));
}
fprintf(fn, "%s\nline %0.4f %0.4f %0.4f %0.4f\n", color[i - 1],
x1 / 1000000, y1[i - 1] / 1024, x2 / 1000000,
@@ -265,18 +406,33 @@
}
varg = strtok(NULL, ",");
}
+#if USE_WEB10G
+ estats_val_data_free(&snap);
+#endif
}
fprintf(fn, "go\n");
}

-void plot_cwndtime(char *name, web100_snapshot* snap, web100_log* log,
- web100_agent* agent, web100_group* group) {
+
+/**
+ * Make a plot CwndTime(%) against total time.
+ *
+ * @param name The file name to output to (gets .<remport>.xpls
+ * appended to the end).
+ * @param snap Allocated storage for Web100 - NULL for Web10G
+ * @param log A open Web100/Web10G log file
+ * @param agent A Web100 agent - ignored by Web10G should be NULL
+ * @param group A Web100 group - ignored by Web10G should be NULL
+ */
+void plot_cwndtime(char *name, tcp_stat_snap* snap, tcp_stat_log* log,
+ tcp_stat_agent* agent, tcp_stat_group* group) {
+#if USE_WEB10G
+ estats_error* err = NULL;
+#endif
double SndLimTimeRwin = 0, SndLimTimeSender = 0;
- char buf[256];
- web100_var* var;
char lname[256], remport[8];
char title[256];
- char* variables[] = { "Duration", "SndLimTimeRwin", "SndLimTimeSender",
+ char* variables[] = { ELAPSED_TIME, "SndLimTimeRwin", TIME_SENDER,
"SndLimTimeCwnd" };
int i, first = 0;
double x1, x2, y1, y2;
@@ -284,11 +440,28 @@

memset(lname, 0, 256);

- get_title(snap, log, agent, group, title, remport);
+ /* Get the first snap from the log */
+#if USE_WEB100
+ if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
+ web100_perror("web100_snap_from_log");
+ return;
+ }
+#elif USE_WEB10G
+ if ((err = estats_record_read_data(&snap, log)) != NULL) {
+ estats_record_close(&log);
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ return;
+ }
+#endif
+
+ get_title(snap, agent, group, title, remport);

if (name == NULL) {
fn = stdout;
- strncpy(name, "Unknown", 7);
+ /* XXX writing into a NULL pointer?? */
+ // strncpy(name, "Unknown", 7);
+ name = "Unknown";
} else {
snprintf(lname, sizeof(lname), "%s.%s.xpl", name, remport);
fn = fopen(lname, "w");
@@ -302,104 +475,127 @@
first = 0;

for (;;) {
+ /* We've already read the first item to use with get_title */
if (first != 0) {
+#if USE_WEB100
if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
+#elif USE_WEB10G
+ if ((err = estats_record_read_data(&snap, log)) != NULL) {
+ estats_error_free(&err);
+#endif
fprintf(fn, "go\n");
return;
}
}
for (i = 0; i < 4; i++) {
- if ((web100_agent_find_var_and_group(agent, variables[i], &group,
- &var)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_agent_find_var_and_group");
- exit(EXIT_FAILURE);
- }
-
- if ((web100_snap_read(var, snap, buf)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_snap_read");
- exit(EXIT_FAILURE);
- }
-
- if (i == 0) {
- if (first == 0) {
- x1 = atoi(
- web100_value_to_text(web100_get_var_type(var),
- buf));
- } else {
- x1 = x2;
- }
- } else if (i == 1) {
- if (first == 0) {
- SndLimTimeRwin = atoi(
- web100_value_to_text(web100_get_var_type(var),
- buf));
- }
- } else if (i == 2) {
- if (first == 0) {
- SndLimTimeSender = atoi(
- web100_value_to_text(web100_get_var_type(var),
- buf));
+ if (first == 0) {
+ /* Give everything starting values */
+ switch (i) {
+ case 0: /* ELAPSED_TIME */
+ x1 = tcp_stat_read_double(variables[i], snap, group, agent);
+ break;
+ case 1: /* "SndLimTimeRwin" */
+ SndLimTimeRwin = tcp_stat_read_double(variables[i],
+ snap, group, agent);
+ break;
+ case 2: /* "SndLimTimeSender" */
+ SndLimTimeSender = tcp_stat_read_double(variables[i],
+ snap, group, agent);
+ break;
+ case 3: /* "SndLimTimeCwnd" */
+ y1 = tcp_stat_read_double(variables[i], snap, group, agent);
+ y1 = y1 / (SndLimTimeRwin + SndLimTimeSender + y1);
+ break;
}
} else {
- if (first == 0) {
- y1 = atoi(
- web100_value_to_text(web100_get_var_type(var),
- buf));
- y1 = y1 / (SndLimTimeRwin + SndLimTimeSender + y1);
- } else {
- y1 = y2;
+ switch (i) {
+ case 0: /* ELAPSED_TIME */
+ x1 = x2;
+ break;
+ case 3: /* "SndLimTimeCwnd" */
+ y1 = y2;
+ break;
}
}
}

first++;
for (i = 0; i < 4; i++) {
- if ((web100_agent_find_var_and_group(agent, variables[i], &group,
- &var)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_agent_find_var_and_group");
- exit(EXIT_FAILURE);
- }
-
- if ((web100_snap_read(var, snap, buf)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_snap_read");
- exit(EXIT_FAILURE);
- }
-
- if (i == 0) {
- x2 = atoi(web100_value_to_text(web100_get_var_type(var), buf));
- } else if (i == 1) {
- SndLimTimeRwin = atoi(
- web100_value_to_text(web100_get_var_type(var), buf));
- } else if (i == 2) {
- SndLimTimeSender = atoi(
- web100_value_to_text(web100_get_var_type(var), buf));
- } else {
- y2 = atoi(web100_value_to_text(web100_get_var_type(var), buf));
+ if (i == 0) { /* ELAPSED_TIME */
+ x2 = tcp_stat_read_double(variables[i], snap, group, agent);
+ } else if (i == 1) { /* "SndLimTimeRwin" */
+ SndLimTimeRwin = tcp_stat_read_double(variables[i],
+ snap, group, agent);
+ } else if (i == 2) { /* "SndLimTimeSender" */
+ SndLimTimeSender = tcp_stat_read_double(variables[i],
+ snap, group, agent);
+ } else { /* "SndLimTimeCwnd" */
+ y2 = tcp_stat_read_double(variables[i], snap, group, agent);
y2 = y2 / (SndLimTimeRwin + SndLimTimeSender + y2);
fprintf(fn, "%s\nline %0.4f %0.4f %0.4f %0.4f\n", color[i - 1],
x1 / 1000000, y1, x2 / 1000000, y2);
}
}
+#if USE_WEB10G
+ estats_val_data_free(&snap);
+#endif
}
fprintf(fn, "go\n");
}

-void print_var(char *varlist, web100_snapshot* snap, web100_log* log,
- web100_agent* agent, web100_group* group,
+/**
+ *
+ * Loop through the supplied list of variables and prints them to
+ * stdout as a new row for every snap in the log file.
+ *
+ * A function 'func' can be provided to changed how these are printed.
+ *
+ * @param varlist A comma seperated list of Web100/Web10G names to
+ * print.
+ * @param snap Allocated storage for Web100 - NULL for Web10G
+ * @param log A open Web100/Web10G log file
+ * @param agent A Web100 agent - ignored by Web10G should be NULL
+ * @param group A Web100 group - ignored by Web10G should be NULL
+ * @param func (Can be NULL) A function that expects two integers for
+ * its arguments. The first corrosponds to the item in varlist
+ * 0 for the first etc. The second the value in the snap.
+ * Called once for every varlist item for ever snap in the log.
+ */
+void print_var(char *varlist, tcp_stat_snap* snap, tcp_stat_log* log,
+ tcp_stat_agent* agent, tcp_stat_group* group,
void(*func)(const int arg, const int value)) {
- char *varg, savelist[256], *text;
- char buf[256], title[256], remport[8];
+ char *varg, savelist[256];
+ char title[256], remport[8];
int i, j;
- web100_var* var;
+#if USE_WEB10G
+ estats_error* err = NULL;
+#endif
FILE* fn;

fn = stdout;
- get_title(snap, log, agent, group, title, remport);
+
+ /* Get the first snap from the log */
+#if USE_WEB100
+ if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
+ web100_perror("web100_snap_from_log");
+ return;
+ }
+#elif USE_WEB10G
+ if ((err = estats_record_read_data(&snap, log)) != NULL) {
+ estats_record_close(&log);
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ return;
+ }
+#endif
+
+ get_title(snap, agent, group, title, remport);
fprintf(fn, "Extracting Data from %s:%s connection\n\n", title, remport);

strncpy(savelist, varlist, strlen(varlist) + 1);
printf("Index\t");
varg = strtok(varlist, ",");
+ /* Loop through varlist and print them out as the column names */
for (j = 0;; j++) {
if (varg == NULL)
break;
@@ -411,45 +607,46 @@
varg = strtok(NULL, ",");
}
printf("\n");
+ /* Loop over the log file */
for (i = 0;; i++) {
- if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
- /* web100_perror("web100_log_open_read"); */
- printf("-------------- End Of Data --------------\n\n");
- return;
+ /* We've already read the first item to use with get_title */
+ if (i != 0) {
+#if USE_WEB100
+ if ((web100_snap_from_log(snap, log)) != WEB100_ERR_SUCCESS) {
+#elif USE_WEB10G
+ if ((err = estats_record_read_data(&snap, log)) != NULL) {
+ estats_error_free(&err);
+#endif
+ printf("-------------- End Of Data --------------\n\n");
+ return;
+ }
}
printf("%5d\t", i);
-
strncpy(varlist, savelist, strlen(savelist) + 1);
varg = strtok(varlist, ",");
+ /* Loop over the vars we are printing out */
for (j = 0;; j++) {
- if (varg == NULL)
+ if (varg == NULL) {
break;
- if ((web100_agent_find_var_and_group(agent, varg, &group, &var))
- != WEB100_ERR_SUCCESS) {
- web100_perror("web100_agent_find_var_and_group");
- exit(EXIT_FAILURE);
- }
-
- if ((web100_snap_read(var, snap, buf)) != WEB100_ERR_SUCCESS) {
- web100_perror("web100_snap_read");
- exit(EXIT_FAILURE);
}
if (func) {
- func(
- j,
- atoi(
- web100_value_to_text(web100_get_var_type(var),
- buf)));
+ /* Let the provided function do the printing */
+ func(j, (int) tcp_stat_read_double(varg, snap, group, agent));
} else {
- text = web100_value_to_text(web100_get_var_type(var), buf);
- if (strcmp(text, "4294966376") == 0) {
+ /* Do it ourself */
+ double value = tcp_stat_read_double(varg, snap, group, agent);
+ // weird magic number ((2^32) - 1) - 919
+ if ((int) value == 4294966376) {
printf("%10s\t", "-1");
} else {
- printf("%10s\t", text);
+ printf("%10"PRId64"\t", (int64_t) value);
}
}
varg = strtok(NULL, ",");
}
+#if USE_WEB10G
+ estats_val_data_free(&snap);
+#endif
printf("\n");
}
}
@@ -460,9 +657,9 @@

if (arg == -1) {
if (value) {
- printf("%10s\t", "Throughput (kB/s)");
+ printf("%10s\t", "Throughput (mB/s)");
} else {
- printf("%10s\t", "Duration");
+ printf("%10s\t", ELAPSED_TIME);
}
return;
}
@@ -494,7 +691,7 @@

if (arg == -1) {
if (value == 0) {
- printf("%10s\t", "Duration");
+ printf("%10s\t", ELAPSED_TIME);
} else if (value == 3) {
printf("%10s\t", "CwndTime (%% of total time)");
}
@@ -519,11 +716,14 @@
/* --- */

int main(int argc, char** argv) {
- web100_agent* agent;
- web100_connection* conn;
- web100_group* group;
- web100_log* log;
- web100_snapshot* snap;
+ tcp_stat_agent* agent = NULL;
+ tcp_stat_connection conn = NULL;
+ tcp_stat_group* group = NULL;
+ tcp_stat_log* log = NULL;
+ tcp_stat_snap* snap = NULL;
+#if USE_WEB10G
+ estats_error* err = NULL;
+#endif
char fn[128];
char *varlist = NULL, list[1024];
char *varg;
@@ -577,6 +777,7 @@

for (j = optind; j < argc; j++) {
snprintf(fn, sizeof(fn), "%s", argv[j]);
+#if USE_WEB100
if ((log = web100_log_open_read(fn)) == NULL) {
web100_perror("web100_log_open_read");
exit(EXIT_FAILURE);
@@ -596,17 +797,25 @@
web100_perror("web100_get_log_connection");
exit(EXIT_FAILURE);
}
-
+#elif USE_WEB10G
+ if ((err = estats_record_open(&log, fn, "r")) != NULL) {
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ exit(EXIT_FAILURE);
+ }
+#endif
fprintf(stderr, "Extracting data from Snaplog '%s'\n\n", fn);

+#if USE_WEB100
if ((snap = web100_snapshot_alloc_from_log(log)) == NULL) {
web100_perror("web100_snapshot_alloc_from_log");
exit(EXIT_FAILURE);
}
+#endif

if (plotuser == 1) {
memset(list, 0, 1024);
- strncpy(list, "Duration,", 9);
+ strncpy(list, ELAPSED_TIME",", 1024);
strncat(list, varlist, strlen(varlist));
varg = strtok(list, ",");
for (k = 1;; k++) {
@@ -614,7 +823,7 @@
break;
}
memset(list, 0, 1024);
- strncpy(list, "Duration,", 9);
+ strncpy(list, ELAPSED_TIME",", 1024);
strncat(list, varlist, strlen(varlist));
if (txt == 1)
print_var(list, snap, log, agent, group, NULL);
@@ -624,7 +833,7 @@
}
if (plotspd == 1) {
memset(list, 0, 1024);
- strncpy(list, "Duration,DataBytesOut", 21);
+ strncpy(list, ELAPSED_TIME","DATA_OCT_OUT, 1024);
if (txt == 1)
print_var(list, snap, log, agent, group, throughput);
else
@@ -634,8 +843,8 @@
if (plotcwndtime == 1) {
memset(list, 0, 1024);
strncpy(list,
- "Duration,SndLimTimeRwin,SndLimTimeSender,SndLimTimeCwnd",
- 55);
+ ELAPSED_TIME",SndLimTimeRwin,"TIME_SENDER",SndLimTimeCwnd",
+ 1024);
if (txt == 1)
print_var(list, snap, log, agent, group, cwndtime);
else
@@ -643,7 +852,7 @@
}
if (plotcwnd == 1) {
memset(list, 0, 1024);
- strncpy(list, "Duration,CurCwnd", 16);
+ strncpy(list, ELAPSED_TIME",CurCwnd", 1024);
if (txt == 1)
print_var(list, snap, log, agent, group, NULL);
else
@@ -651,7 +860,7 @@
}
if (plotrwin == 1) {
memset(list, 0, 1024);
- strncpy(list, "Duration,CurRwinRcvd", 20);
+ strncpy(list, ELAPSED_TIME",CurRwinRcvd", 1024);
if (txt == 1)
print_var(list, snap, log, agent, group, NULL);
else
@@ -659,13 +868,17 @@
}
if (plotboth == 1) {
memset(list, 0, 1024);
- strncpy(list, "Duration,CurCwnd,CurRwinRcvd", 28);
+ strncpy(list, ELAPSED_TIME",CurCwnd,CurRwinRcvd", 1024);
if (txt == 1)
print_var(list, snap, log, agent, group, NULL);
else
plot_var(list, 3, "Both", snap, log, agent, group, NULL);
}
- web100_log_close_read(log);
+#if USE_WEB100
+ web100_log_close_read(log);
+#elif USE_WEB10G
+ estats_record_close(&log);
+#endif
}

exit(0);
=======================================
--- /branches/applet_usability/src/heuristics.c Thu Nov 15 21:34:19 2012 UTC
+++ /branches/applet_usability/src/heuristics.c Tue Oct 15 13:07:11 2013 UTC
@@ -132,10 +132,12 @@
* @return average round trip time
* */

-double calc_avg_rtt(int sumRTT, int countRTT, double *avgRTT) {
+double calc_avg_rtt(tcp_stat_var sumRTT, tcp_stat_var countRTT,
+ double *avgRTT) {
*avgRTT = (double) sumRTT / countRTT;
log_println(log_lvl_heur,
- "-- Average round trip time= SumRTT (%d) over countRTT (%d)=%f",
+ "-- Average round trip time= SumRTT (%"VARtype") over "
+ "countRTT (%"VARtype")=%f",
sumRTT, countRTT, (*avgRTT) * .001);
return ((*avgRTT) * .001);
}
@@ -158,7 +160,8 @@
* @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) {
+double calc_packetloss(tcp_stat_var congsnsignals, tcp_stat_var pktsout,
+ int c2sdatalinkspd) {
double packetloss = (double) congsnsignals / pktsout;
if (packetloss == 0) {
if (c2sdatalinkspd > 5)
@@ -166,7 +169,8 @@
else
packetloss = .000001; // set to 10^-6 otherwise
}
- log_println(log_lvl_heur, "--packetloss=%d over %d=%f. Link spd=%d",
+ log_println(log_lvl_heur, "--packetloss=%"VARtype" over %"VARtype
+ "=%f. Link spd=%d",
congsnsignals, pktsout, packetloss, c2sdatalinkspd);
return packetloss;
}
@@ -179,7 +183,8 @@
* @param actualackcount number of non-duplicate ACKs received
* @return percentage of packets out of order
* */
-double calc_packets_outoforder(int dupackcount, int actualackcount) {
+double calc_packets_outoforder(tcp_stat_var dupackcount,
+ tcp_stat_var actualackcount) {
log_println(log_lvl_heur, "--packets out of order: %f",
(double) dupackcount / actualackcount);
return ((double) dupackcount / actualackcount);
@@ -197,12 +202,13 @@
* @param packetloss Packet loss
* @return maximum theoretical bandwidth
* */
-double calc_max_theoretical_throughput(int currentMSS, double rttsec,
- double packetloss) {
+double calc_max_theoretical_throughput(tcp_stat_var currentMSS,
+ double rttsec, double packetloss) {
double maxthruput;
maxthruput = (currentMSS / (rttsec * sqrt(packetloss))) * BITS_8 / KILO_BITS
/ KILO_BITS;
- log_println(log_lvl_heur, "--max_theoretical_thruput: %f. From %d,%f,%f",
+ log_println(log_lvl_heur, "--max_theoretical_thruput: %f. From %"
+ VARtype",%f,%f",
maxthruput, currentMSS, rttsec, packetloss);
return maxthruput;
}
@@ -218,9 +224,10 @@
* @param cwin congestion window value in bytes
*
* */
-void calc_window_sizes(int *SndWinScale, int *RcvWinScale, int SendBuf,
- int MaxRwinRcvd, int MaxCwnd, double *rwin, double *swin,
- double *cwin) {
+void calc_window_sizes(tcp_stat_var *SndWinScale,
+ tcp_stat_var *RcvWinScale, tcp_stat_var SendBuf,
+ tcp_stat_var MaxRwinRcvd, tcp_stat_var MaxCwnd,
+ double *rwin, double *swin, double *cwin) {
if ((*SndWinScale > WINDOW_SCALE_THRESH) || (SendBuf < MAX_TCP_PORT))
*SndWinScale = 0;
if ((*RcvWinScale > WINDOW_SCALE_THRESH) || (MaxRwinRcvd < MAX_TCP_PORT))
@@ -231,8 +238,9 @@
*cwin = (double) MaxCwnd * BITS_8 / KILO_BITS / KILO_BITS;
log_println(
log_lvl_heur,
- "--window sizes: SndWinScale= %d, RcvwinScale=%d, MaxRwinRcvd=%d, "
- "maxCwnd=%d,rwin=%f, swin=%f, cwin=%f",
+ "--window sizes: SndWinScale= %"VARtype", RcvwinScale=%"VARtype
+ ", MaxRwinRcvd=%"VARtype", "
+ "maxCwnd=%"VARtype",rwin=%f, swin=%f, cwin=%f",
*SndWinScale, *RcvWinScale, MaxRwinRcvd, MaxCwnd, *rwin, *swin, *cwin);
}

@@ -245,7 +253,8 @@
* @param totaltime total test time
* @return idle time fraction
* */
-double calc_RTOIdle(int timeouts, int currentRTO, double totaltime) {
+double calc_RTOIdle(tcp_stat_var timeouts, tcp_stat_var currentRTO,
+ double totaltime) {
double idlewaitingforpackets = (timeouts * ((double) currentRTO / 1000))
/ totaltime;
log_println(log_lvl_heur, "--RTOIdle:%f", idlewaitingforpackets);
@@ -263,10 +272,12 @@
* 'sender limited' state
* @return Total test time
* */
-int calc_totaltesttime(int SndLimTimeRwin, int SndLimTimeCwnd,
- int SndLimTimeSender) {
+int calc_totaltesttime(tcp_stat_var SndLimTimeRwin,
+ tcp_stat_var SndLimTimeCwnd,
+ tcp_stat_var SndLimTimeSender) {
int totaltime = SndLimTimeRwin + SndLimTimeCwnd + SndLimTimeSender;
- log_println(log_lvl_heur, "--Total test time: %d+%d+%d=%d ", SndLimTimeRwin,
+ log_println(log_lvl_heur, "--Total test time: %"VARtype"+%"VARtype"+%"
+ VARtype"=%d ", SndLimTimeRwin,
SndLimTimeCwnd, SndLimTimeSender, totaltime);
return (totaltime);
}
@@ -278,9 +289,10 @@
* @return sender limited time ratio
*
*/
-double calc_sendlimited_sndrfault(int SndLimTimeSender, int totaltime) {
+double calc_sendlimited_sndrfault(tcp_stat_var SndLimTimeSender,
+ int totaltime) {
double sendlimitedtime = ((double) SndLimTimeSender) / totaltime;
- log_println(log_lvl_heur, "--Send limited time: %d over %d=%f ",
+ log_println(log_lvl_heur, "--Send limited time: %"VARtype" over %d=%f ",
SndLimTimeSender, totaltime, sendlimitedtime);
return sendlimitedtime;
}
@@ -293,9 +305,10 @@
* @return sender limited time ratio
*
*/
-double calc_sendlimited_rcvrfault(int SndLimTimeRwin, int totaltime) {
+double calc_sendlimited_rcvrfault(tcp_stat_var SndLimTimeRwin,
+ int totaltime) {
double sendlimitedtime = ((double) SndLimTimeRwin) / totaltime;
- log_println(log_lvl_heur, "--Send limited time: %d over %d=%f ",
+ log_println(log_lvl_heur, "--Send limited time: %"VARtype" over %d=%f ",
SndLimTimeRwin, totaltime, sendlimitedtime);
return sendlimitedtime;
}
@@ -306,9 +319,10 @@
* @param totaltime Total test time
* @return sender limited time ratio
*/
-double calc_sendlimited_cong(int SndLimTimeCwnd, int totaltime) {
+double calc_sendlimited_cong(tcp_stat_var SndLimTimeCwnd,
+ int totaltime) {
double sendlimitedtime = ((double) SndLimTimeCwnd) / totaltime;
- log_println(log_lvl_heur, "--Send limited time: %d over %d=%f ",
+ log_println(log_lvl_heur, "--Send limited time: %"VARtype" over %d=%f ",
SndLimTimeCwnd, totaltime, sendlimitedtime);
return sendlimitedtime;
}
@@ -321,7 +335,8 @@
* @param totaltime Total test time in microseconds
* @return Actual throughput
*/
-double calc_real_throughput(int DataBytesOut, int totaltime) {
+double calc_real_throughput(tcp_stat_var DataBytesOut,
+ tcp_stat_var totaltime) {
double realthruput = ((double) DataBytesOut / (double) totaltime) * BITS_8;
log_println(log_lvl_heur, "--Actual observed throughput: %f ", realthruput);
return realthruput;
@@ -335,7 +350,8 @@
* expired when the RTO backoff multiplier is
equal to one
* @return Actual throughput
*/
-double cal_totalwaittime(int currentRTO, int timeoutcounters) {
+double cal_totalwaittime(tcp_stat_var currentRTO,
+ tcp_stat_var timeoutcounters) {
double waitarrivetime = (double) (currentRTO * timeoutcounters) / KILO;
log_println(log_lvl_heur, "--Total wait time: %f ", waitarrivetime);
return waitarrivetime;
@@ -404,8 +420,9 @@
* @param multiple is multiple test mode on?
* @return int 1 if duplex mismatch is found, 0 if not.
* */
-int detect_duplexmismatch(double cwndtime, double bwtheoretcl, int pktsretxed,
- double timesec, int maxsstartthresh, double idleRTO,
+int detect_duplexmismatch(double cwndtime, double bwtheoretcl,
+ tcp_stat_var pktsretxed, double timesec,
+ tcp_stat_var maxsstartthresh, double idleRTO,
int link, int s2cspd, int midboxspd, int multiple) {
int duplex_mismatch_yes = 0;
if ((cwndtime > .9) // more than 90% time spent being receiver window limited
@@ -468,7 +485,7 @@
* @return 1 is fault hardware suspected, 0 otherwise
* */
int detect_faultyhardwarelink(double packetloss, double cwndtime,
- double timesec, int maxslowstartthresh) {
+ double timesec, tcp_stat_var maxslowstartthresh) {
int faultyhw_found = 0;
if (((packetloss * 100) / timesec > 15) && (cwndtime / timesec > .6)
&& (packetloss < .01) && (maxslowstartthresh > 0)) {
@@ -532,7 +549,8 @@
* @return 1 if wireless link, 0 otherwise
* */
int detect_wirelesslink(double sendtime, double realthruput, double bw_theortcl,
- int sndlimtrans_rwin, int sndlimtrans_cwnd,
+ tcp_stat_var sndlimtrans_rwin,
+ tcp_stat_var sndlimtrans_cwnd,
double rwindowtime, int link) {
int is_wireless = 0;
if ((sendtime == 0) && (realthruput < 5) && (bw_theortcl > 50)
@@ -563,7 +581,8 @@
* @param link integer indicative of link type
* @return 1 if wireless link, 0 otherwise
* */
-int detect_DSLCablelink(int sndlim_timesender, int sndlim_transsender,
+int detect_DSLCablelink(tcp_stat_var sndlim_timesender,
+ tcp_stat_var sndlim_transsender,
double realthruput, double bw_theoretical, int link) {
int is_dslorcable = 0;
if ((sndlim_timesender < 600) && (sndlim_transsender == 0)
@@ -593,8 +612,8 @@
* @param totaltesttime total test time
* @return 1 if half_duplex link suspected, 0 otherwise
* */
-int detect_halfduplex(double rwintime, int sndlim_transrwin,
- int sndlim_transsender, double totaltesttime) {
+int detect_halfduplex(double rwintime, tcp_stat_var sndlim_transrwin,
+ tcp_stat_var sndlim_transsender, double totaltesttime) {
int is_halfduplex = 0;
if ((rwintime > .95) && (sndlim_transrwin / totaltesttime > 30)
&& (sndlim_transsender / totaltesttime > 30)) {
=======================================
--- /branches/applet_usability/src/heuristics.h Thu Nov 15 21:33:44 2012 UTC
+++ /branches/applet_usability/src/heuristics.h Tue Oct 15 13:07:11 2013 UTC
@@ -8,6 +8,8 @@
#ifndef SRC_HEURISTICS_H_
#define SRC_HEURISTICS_H_

+#include "web100srv.h"
+
// link speed algorithms
void calc_linkspeed(char spds[4][256], int spd_index, int *c2sdata, int *c2sack,
int* s2cdata, int *s2cack, float runave[4],
@@ -15,44 +17,55 @@
int *timeout, int *dupack, int isc2stest);

// calculate average round trip time
-double calc_avg_rtt(int sumRTT, int countRTT, double * avgRTT);
+double calc_avg_rtt(tcp_stat_var sumRTT, tcp_stat_var countRTT,
+ double *avgRTT);

// calculate packet loss percentage
-double calc_packetloss(int congsnsignals, int pktsout, int c2sdatalinkspd);
+double calc_packetloss(tcp_stat_var congsnsignals, tcp_stat_var pktsout,
+ int c2sdatalinkspd);

// Calculate the percentage of packets arriving out of order
-double calc_packets_outoforder(int dupackcount, int actualackcount);
+double calc_packets_outoforder(tcp_stat_var dupackcount,
+ tcp_stat_var actualackcount);

// calculate theoretical maximum goodput in bits
-double calc_max_theoretical_throughput(int currentMSS, double rttsec,
- double packetloss);
+double calc_max_theoretical_throughput(tcp_stat_var currentMSS,
+ double rttsec, double packetloss);

// finalize some window sizes
-void calc_window_sizes(int *SndWinScale, int *RcvWinScale, int SendBuf,
- int MaxRwinRcvd, int MaxCwnd, double *rwin, double *swin,
- double *cwin);
+void calc_window_sizes(tcp_stat_var *SndWinScale,
+ tcp_stat_var *RcvWinScale, tcp_stat_var SendBuf,
+ tcp_stat_var MaxRwinRcvd, tcp_stat_var MaxCwnd,
+ double *rwin, double *swin, double *cwin);

// calculate RTO Idle time
-double calc_RTOIdle(int timeouts, int CurrentRTO, double totaltime);
+double calc_RTOIdle(tcp_stat_var timeouts, tcp_stat_var currentRTO,
+ double totaltime);

// calculate total test time for S_C test
-int calc_totaltesttime(int SndLimTimeRwin, int SndLimTimeCwnd,
- int SndLimTimeSender);
+int calc_totaltesttime(tcp_stat_var SndLimTimeRwin,
+ tcp_stat_var SndLimTimeCwnd,
+ tcp_stat_var SndLimTimeSender);

// get time ratio of 'Sender Limited' time due to congestion
-double calc_sendlimited_cong(int SndLimTimeCwnd, int totaltime);
+double calc_sendlimited_cong(tcp_stat_var SndLimTimeCwnd,
+ int totaltime);

// get time ratio of 'Sender Limited' time due to receivers fault
-double calc_sendlimited_rcvrfault(int SndLimTimeRwin, int totaltime);
+double calc_sendlimited_rcvrfault(tcp_stat_var SndLimTimeRwin,
+ int totaltime);

// get time ratio of 'Sender Limited' time due to sender's fault
-double calc_sendlimited_sndrfault(int SndLimTimeSender, int totaltime);
+double calc_sendlimited_sndrfault(tcp_stat_var SndLimTimeSender,
+ int totaltime);

// Calculate actual throughput in Mbps
-double calc_real_throughput(int DataBytesOut, int totaltime);
+double calc_real_throughput(tcp_stat_var DataBytesOut,
+ tcp_stat_var totaltime);

// Calculate total time spent waiting for packets to arrive
-double cal_totalwaittime(int currentRTO, int timeoutcounters);
+double cal_totalwaittime(tcp_stat_var currentRTO,
+ tcp_stat_var timeoutcounters);

// Is throughput measured greater in value during the C->S than S->C test?
int is_c2s_throughputbetter(int c2stestresult, int s2ctestresult);
@@ -65,13 +78,14 @@
int isNotMultipleTestMode(int multiple);

// detect duplex mismatch mode
-int detect_duplexmismatch(double cwndtime, double bwtheoretcl, int pktsretxed,
- double timesec, int maxsstartthresh, double idleRTO,
+int detect_duplexmismatch(double cwndtime, double bwtheoretcl,
+ tcp_stat_var pktsretxed, double timesec,
+ tcp_stat_var maxsstartthresh, double idleRTO,
int link, int s2cspd, int midboxspd, int multiple);

// detect if faulty hardware may exist
int detect_faultyhardwarelink(double packetloss, double cwndtime,
- double timesec, int maxslowstartthresh);
+ double timesec, tcp_stat_var maxslowstartthresh);

// Is this an ethernet link?
int detect_ethernetlink(double realthruput, double s2cspd, double packetloss,
@@ -79,16 +93,18 @@

// Is wireless link?
int detect_wirelesslink(double sendtime, double realthruput, double bw_theortcl,
- int sndlimtrans_rwin, int sndlimtrans_cwnd,
+ tcp_stat_var sndlimtrans_rwin,
+ tcp_stat_var sndlimtrans_cwnd,
double rwindowtime, int link);

// Is DSL/Cable modem?
-int detect_DSLCablelink(int sndlim_timesender, int sndlim_transsender,
+int detect_DSLCablelink(tcp_stat_var sndlim_timesender,
+ tcp_stat_var sndlim_transsender,
double realthruput, double bw_theoretical, int link);

// Is a half_duplex link present?
-int detect_halfduplex(double rwintime, int sndlim_transrwin,
- int sndlim_transsender, double totaltesttime);
+int detect_halfduplex(double rwintime, tcp_stat_var sndlim_transrwin,
+ tcp_stat_var sndlim_transsender, double totaltesttime);

// Is congestion detected?
int detect_congestionwindow(double cwndtime, int mismatch, double cwin,
=======================================
--- /branches/applet_usability/src/logging.c Sun Apr 21 18:31:49 2013 UTC
+++ /branches/applet_usability/src/logging.c Tue Oct 15 13:07:11 2013 UTC
@@ -701,7 +701,7 @@
* @param processid PID of process
* @param ctlSocket socket over which message has been exchanged
* */
-void protolog_sendprintln(const int type, void* msg, const int len,
+void protolog_sendprintln(const int type, const void* msg, const int len,
const int processid, const int ctlSocket) {
char *currentDir;

@@ -711,7 +711,7 @@
}
currentDir = get_currentdirndesc();

- protolog_println(currentDir, type, msg, len, processid, ctlSocket);
+ protolog_println(currentDir, type, (void*) msg, len, processid, ctlSocket);
}

/**
=======================================
--- /branches/applet_usability/src/logging.h Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/logging.h Tue Oct 15 13:07:11 2013 UTC
@@ -99,7 +99,7 @@
void protolog_printgeneric(const char* key, const char* val, int socketnum);
void protolog_status(int pid, enum TEST_ID testid,
enum TEST_STATUS_INT teststatus, int socketnum);
-void protolog_sendprintln(const int type, void* msg, const int len,
+void protolog_sendprintln(const int type, const void* msg, const int len,
const int processid, const int ctlSocket);
void protolog_rcvprintln(const int type, void* msg, const int len,
const int processid, const int ctlSocket);
=======================================
--- /branches/applet_usability/src/network.c Sun Apr 21 19:27:02 2013 UTC
+++ /branches/applet_usability/src/network.c Tue Oct 15 13:07:11 2013 UTC
@@ -39,7 +39,7 @@
// Attempt to connect to one of the chosen addresses.
struct addrinfo* ai = NULL;
for (ai = fai; ai; ai = ai->ai_next) {
- if(ai->ai_family != family)
+ if (ai->ai_family != family)
continue;

// create socket with obtained address domain, socket type and protocol
@@ -281,7 +281,8 @@
*sockfd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
if (*sockfd < 0) {
// socket create failed. Abandon further activities using this socket
- log_println(1, "Failed to create %d %d %d", ai->ai_family, ai->ai_socktype, ai->ai_protocol);
+ log_println(1, "Failed to create %d %d %d", ai->ai_family,
+ ai->ai_socktype, ai->ai_protocol);
continue;
}

@@ -356,7 +357,7 @@
return 1;
} else {
log_println(0, "Failed to connect: %s", strerror(errno));
- //goto error;
+ // goto error;
}
}

@@ -380,7 +381,7 @@
*
*/

-int send_msg(int ctlSocket, int type, void* msg, int len) {
+int send_msg(int ctlSocket, int type, const void* msg, int len) {
unsigned char buff[3];
int rc, i;

@@ -489,9 +490,9 @@
* @return The amount of bytes written to the file descriptor
*/

-int writen(int fd, void* buf, int amount) {
+int writen(int fd, const void* buf, int amount) {
int sent, n;
- char* ptr = buf;
+ const char* ptr = buf;
sent = 0;
assert(amount >= 0);
while (sent < amount) {
@@ -567,3 +568,4 @@
}
return received;
}
+
=======================================
--- /branches/applet_usability/src/network.h Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/network.h Tue Oct 15 13:07:11 2013 UTC
@@ -20,9 +20,9 @@
I2Addr CreateListenSocket(I2Addr addr, char* serv, int options, int buf_size);
int CreateConnectSocket(int* sockfd, I2Addr local_addr, I2Addr server_addr,
int option, int buf_sizes);
-int send_msg(int ctlSocket, int type, void* msg, int len);
+int send_msg(int ctlSocket, int type, const void* msg, int len);
int recv_msg(int ctlSocket, int* type, void* msg, int* len);
-int writen(int fd, void* buf, int amount);
+int writen(int fd, const void* buf, int amount);
int readn(int fd, void* buf, int amount);

/* web100-util.c routine used in network. */
=======================================
--- /branches/applet_usability/src/test_c2s_srv.c Wed Jul 17 14:57:34 2013 UTC
+++ /branches/applet_usability/src/test_c2s_srv.c Tue Oct 15 13:07:11 2013 UTC
@@ -57,10 +57,12 @@
* -102 - Retries exceeded while waiting for data from
connected client
*
*/
-int test_c2s(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
+int test_c2s(int ctlsockfd, tcp_stat_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) {
+ tcp_stat_connection conn;
+ tcp_stat_group* group = NULL;
/* The pipe that will return packet pair results */
int mon_pipe[2];
int recvsfd; // receiver socket file descriptor
@@ -83,14 +85,12 @@
char listenc2sport[10]; // listening port
pthread_t workerThreadId;

- // web_100 related variables
- web100_group* group = NULL;
- web100_connection* conn = NULL;
-
// snap related variables
SnapArgs snapArgs;
snapArgs.snap = NULL;
+#if USE_WEB100
snapArgs.log = NULL;
+#endif
snapArgs.delay = options->snapDelay;
wait_sig = 0;

@@ -250,8 +250,8 @@
// commenting out below to move to init_pkttrace function
I2Addr src_addr = I2AddrByLocalSockFD(get_errhandle(), recvsfd, 0);

- // Get web100 connection. Used to collect web100 variable statistics
- conn = web100_connection_from_socket(agent, recvsfd);
+ // Get tcp_stat connection. Used to collect tcp_stat variable statistics
+ conn = tcp_stat_connection_from_socket(agent, recvsfd);

// set up packet tracing. Collected data is used for bottleneck link
// calculations
@@ -294,8 +294,7 @@
continue;
break;
}
- if (strlen(tmpstr) > 5)
- memcpy(meta.c2s_ndttrace, tmpstr, strlen(tmpstr));
+ memcpy(meta.c2s_ndttrace, tmpstr, strlen(tmpstr));
// name of nettrace file passed back from pcap child
log_println(3, "--tracefile after packet_trace %s",
meta.c2s_ndttrace);
@@ -377,7 +376,8 @@
// 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);
+ tcp_stat_get_data_recv(recvsfd, agent, conn, count_vars);
+

close(recvsfd);
close(testOptions->c2ssockfd);
=======================================
--- /branches/applet_usability/src/test_meta_srv.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/test_meta_srv.c Tue Oct 15 13:07:11 2013 UTC
@@ -22,7 +22,7 @@
/**
* Performs the META test.
* @param ctlsockfd Client control socket descriptor
- * @param agent Web100 agent used to track the connection
+ * @param agent UNUSED Web100 agent used to track the connection
* @param testOptions The test options
* @param conn_options The connection options
* @return 0 - success,
@@ -38,8 +38,8 @@
* 4 - Invalid data format in received message
*/

-int test_meta_srv(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
- int conn_options) {
+int test_meta_srv(int ctlsockfd, tcp_stat_agent* agent,
+ TestOptions* testOptions, int conn_options) {
int j;
int msgLen, msgType;
char buff[BUFFSIZE + 1];
=======================================
--- /branches/applet_usability/src/test_mid_srv.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/test_mid_srv.c Tue Oct 15 13:07:11 2013 UTC
@@ -9,7 +9,7 @@
* Author: kkumar
*/

-#include <syslog.h>
+#include <syslog.h>
#include <pthread.h>
#include <sys/times.h>
#include <assert.h>
@@ -37,7 +37,7 @@
* >0 - error code.
* Error codes:
* -1 - Listener socket creation failed
- * -3 - web100 connection data not obtained
+ * -3 - tcp_stat 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
@@ -49,7 +49,7 @@
*
*/

-int test_mid(int ctlsockfd, web100_agent* agent, TestOptions* options,
+int test_mid(int ctlsockfd, tcp_stat_agent* agent, TestOptions* options,
int conn_options, double* s2c_throughput_mid) {
int maxseg = ETHERNET_MTU_SIZE;
/* int maxseg=1456, largewin=16*1024*1024; */
@@ -66,7 +66,7 @@
char listenmidport[10]; // listener socket for middlebox tests
int msgType;
int msgLen;
- web100_connection* conn;
+ tcp_stat_connection conn;
char tmpstr[256]; // temporary string storage
struct timeval sel_tv; // time
fd_set rfd; // receiver file descriptor
@@ -235,18 +235,23 @@
meta.family = ((struct sockaddr *) &cli_addr)->sa_family;

buff[0] = '\0';
- // get web100 connection data
- if ((conn = web100_connection_from_socket(agent, midsfd)) == NULL) {
+ // get tcp_stat connection data
+#if USE_WEB100
+ if ((conn = tcp_stat_connection_from_socket(agent, midsfd)) == NULL) {
+#elif USE_WEB10G
+ if ((conn = tcp_stat_connection_from_socket(agent, midsfd)) == -1) {
+#endif
log_println(
0,
- "!!!!!!!!!!! test_mid() failed to get web100 connection data, rc=%d",
+ "!!!!!!!!!!! test_mid() failed to get "TCP_STAT_NAME
+ " connection data, rc=%d",
errno);
/* exit(-1); */
return -3;
}

// Perform S->C throughput test. Obtained results in "buff"
- web100_middlebox(midsfd, agent, conn, buff, sizeof(buff));
+ tcp_stat_middlebox(midsfd, agent, conn, buff, sizeof(buff));

// Transmit results in the form of a TEST_MSG message
send_msg(ctlsockfd, TEST_MSG, buff, strlen(buff));
=======================================
--- /branches/applet_usability/src/test_results_clt.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/test_results_clt.c Tue Oct 15 13:07:11 2013 UTC
@@ -296,11 +296,24 @@

/**
* Print if TCP Selective Acknowledgment Options based on RFC 2018 is on
- *
+ * web100: 0 off, >=1 on.
+ * web10g: 1 on, 2 selfDisabled, 3 peerDisabled.
* @param SACKEnabled
*/
void print_SAck_RFC2018(int SACKEnabled) {
printf("RFC 2018 Selective Acknowledgment: ");
+/* #if USE_WEB10G
+ if (SACKEnabled == 1)
+ printf("ON\n");
+ else if (SACKEnabled == 2)
+ printf("OFF (self)\n");
+ else if (SACKEnabled == 3)
+ printf("OFF (peer)\n");
+ else
+ printf("<undefined (%d)>\n", SACKEnabled);
+#elif USE_WEB100 */
+/* TODO Add this back end by from 'SACK's values, 'SACKEnabled' is
+ * converted to Web100 0=off else on */
if (SACKEnabled == 0)
printf("OFF\n");
else
@@ -314,6 +327,16 @@

void print_Nagle_RFC896(int is_nagleenabled) {
printf("RFC 896 Nagle Algorithm: ");
+/*#if USE_WEB10G
+ if (is_nagleenabled == 1)
+ printf("ON\n");
+ else if (is_nagleenabled == 2)
+ printf("OFF\n");
+ else
+ printf("<undefined (%d)>\n", is_nagleenabled);
+#elif USE_WEB100 */
+/* TODO Add this back end by from 'Nagle's values, 'NagleEnabled' is
+ * converted to Web100 0=off else on */
if (is_nagleenabled == 0)
printf("OFF\n");
else
@@ -322,10 +345,24 @@

/**
* Print if Explicit congestion notification to IP is on - RFC 3168 related
+ * web100 0 off, >=1 on
+ * web10g 1 on, 2 selfDisabled, 3 peerDisabled
* @param is_ECNenabled
*/
void print_congestion_RFC3168(int is_ECNenabled) {
printf("RFC 3168 Explicit Congestion Notification: ");
+/*#if USE_WEB10G
+ if (is_ECNenabled == 1)
+ printf("ON\n");
+ else if (is_ECNenabled == 2)
+ printf("OFF (self)\n");
+ else if (is_ECNenabled == 3)
+ printf("OFF (peer)\n");
+ else
+ printf("<undefined (%d)>\n", is_ECNenabled);
+#elif USE_WEB100 */
+/* TODO Add this back end by from 'ECN's values, 'ECNEnabled' is
+ * converted to Web100 0=off else on */
if (is_ECNenabled == 0)
printf("OFF\n");
else
@@ -334,11 +371,24 @@

/**
* Print details of whether time stamping is on - RFC 1323 related.
- *
+ * web100 1 on, 0 off
+ * web10g 1 on, 2 selfDisabled, 3 peerDisabled
* @param is_timestampenabled
*/
void print_timestamping_RFC1323(int is_timestampenabled) {
printf("RFC 1323 Time Stamping: ");
+/*#if USE_WEB10G
+ if (is_timestampenabled == 1)
+ printf("ON\n");
+ else if (is_timestampenabled == 2)
+ printf("OFF (self)\n");
+ else if (is_timestampenabled == 3)
+ printf("OFF (peer)\n");
+ else
+ printf("<undefined (%d)>\n", is_timestampenabled);
+#elif USE_WEB100 */
+/* TODO Add this back end by from 'TimeStamping's values,
+ * 'TimestampingEnabled' is converted to Web100 0=off else on */
if (is_timestampenabled == 0)
printf("OFF\n");
else
=======================================
--- /branches/applet_usability/src/test_s2c_srv.c Wed Jul 17 14:57:34 2013 UTC
+++ /branches/applet_usability/src/test_s2c_srv.c Tue Oct 15 13:07:11 2013 UTC
@@ -68,10 +68,25 @@
* -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 test_s2c(int ctlsockfd, tcp_stat_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) {
+#if USE_WEB100
+ /* 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* tgroup;
+ web100_group* rgroup;
+ web100_var* var;
+#elif USE_WEB10G
+ estats_val_data* snap;
+#endif
+ tcp_stat_connection conn;
+ /* Just a holder for web10g */
+ tcp_stat_group* group = NULL;
/* Pipe that handles returning packet pair timing */
int mon_pipe[2];
int ret; // ctrl protocol read/write return status
@@ -101,16 +116,6 @@
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;
@@ -124,7 +129,9 @@

SnapArgs snapArgs;
snapArgs.snap = NULL;
+#if USE_WEB100
snapArgs.log = NULL;
+#endif
snapArgs.delay = options->snapDelay;
wait_sig = 0;

@@ -276,7 +283,7 @@
}
}
src_addr = I2AddrByLocalSockFD(get_errhandle(), xmitsfd, 0);
- conn = web100_connection_from_socket(agent, xmitsfd);
+ conn = tcp_stat_connection_from_socket(agent, xmitsfd);

// set up packet capture. The data collected is used for bottleneck link
// calculations
@@ -343,10 +350,14 @@
// system("/sbin/sysctl -w net.ipv4.route.flush=1");
system("echo 1 > /proc/sys/net/ipv4/route/flush");
}
+#if USE_WEB100
rgroup = web100_group_find(agent, "read");
rsnap = web100_snapshot_alloc(rgroup, conn);
tgroup = web100_group_find(agent, "tune");
tsnap = web100_snapshot_alloc(tgroup, conn);
+#elif USE_WEB10G
+ estats_val_data_new(&snap);
+#endif

// fill send buffer with random printable data for throughput test
bytes_written = 0;
@@ -397,6 +408,7 @@

// get details of next sequence # to be sent and fetch value from
// snap file
+#if USE_WEB100
web100_agent_find_var_and_group(agent, "SndNxt", &group,
&var);
web100_snap_read(var, snapArgs.snap, tmpstr);
@@ -410,6 +422,13 @@
lastunackedseq = atoi(
web100_value_to_text(web100_get_var_type(var),
tmpstr));
+#elif USE_WEB10G
+ struct estats_val value;
+ web10g_find_val(snapArgs.snap, "SndNxt", &value);
+ nextseqtosend = value.uv32;
+ web10g_find_val(snapArgs.snap, "SndUna", &value);
+ lastunackedseq = value.uv32;
+#endif
pthread_mutex_unlock(&mainmutex);

// Temporarily stop sending data if you sense that the buffer is
@@ -466,8 +485,12 @@
"S2C test - failed to send test message to pid=%d",
s2c_childpid);

+#if USE_WEB100
web100_snap(rsnap);
web100_snap(tsnap);
+#elif USE_WEB10G
+ estats_read_vars(snap, conn, agent);
+#endif

log_println(1, "sent %d bytes to client in %0.2f seconds",
(int) bytes_written, tx_duration);
@@ -549,12 +572,18 @@
// Get web100 variables from snapshot taken earlier and send to client
log_println(6, "S2C-Send web100 data vars to client pid=%d",
s2c_childpid);
+
+#if USE_WEB100
// send web100 data to client
- ret = web100_get_data(tsnap, ctlsockfd, agent, count_vars);
+ ret = tcp_stat_get_data(tsnap, xmitsfd, ctlsockfd, agent, count_vars);
web100_snapshot_free(tsnap);
// send tuning-related web100 data collected to client
- ret = web100_get_data(rsnap, ctlsockfd, agent, count_vars);
+ ret = tcp_stat_get_data(rsnap, xmitsfd, ctlsockfd, agent, count_vars);
web100_snapshot_free(rsnap);
+#elif USE_WEB10G
+ ret = tcp_stat_get_data(snap, xmitsfd, ctlsockfd, agent, count_vars);
+ estats_val_data_free(&snap);
+#endif

// If sending web100 variables above failed, indicate to client
if (ret < 0) {
=======================================
--- /branches/applet_usability/src/test_sfw_srv.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/test_sfw_srv.c Tue Oct 15 13:07:11 2013 UTC
@@ -120,7 +120,7 @@
* 5 - Unable to resolve client address
*/

-int test_sfw_srv(int ctlsockfd, web100_agent* agent, TestOptions* options,
+int test_sfw_srv(int ctlsockfd, tcp_stat_agent* agent, TestOptions* options,
int conn_options) {
char buff[BUFFSIZE + 1];
I2Addr sfwsrv_addr = NULL;
@@ -130,9 +130,15 @@
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;
@@ -169,26 +175,39 @@
sfwsockport = I2AddrPort(sfwsrv_addr);
log_println(1, " -- port: %d", sfwsockport);

- cn = web100_connection_from_socket(agent, ctlsockfd);
+ 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);
- memset(hostname, 0, 256);
// 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)
=======================================
--- /branches/applet_usability/src/testoptions.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/testoptions.c Tue Oct 15 13:07:11 2013 UTC
@@ -24,7 +24,7 @@
// Worker thread characteristics used to record snaplog and Cwnd peaks
typedef struct workerArgs {
SnapArgs* snapArgs; // snapArgs struct pointer
- web100_agent* agent; // web_100 agent pointer
+ tcp_stat_agent* agent; // tcp_stat agent pointer
CwndPeaks* peaks; // data indicating Cwnd values
int writeSnap; // enable writing snaplog
} WorkerArgs;
@@ -44,17 +44,25 @@
* @param peaks Structure containing CWND peaks information
* @param snap Web100 snapshot structure
*/
-
-void findCwndPeaks(web100_agent* agent, CwndPeaks* peaks,
- web100_snapshot* snap) {
+void findCwndPeaks(tcp_stat_agent* agent, CwndPeaks* peaks,
+ tcp_stat_snap* snap) {
+ int CurCwnd;
+#if USE_WEB100
web100_group* group;
web100_var* var;
- int CurCwnd;
char tmpstr[256];
+#elif USE_WEB10G
+ struct estats_val value;
+#endif

+#if USE_WEB100
web100_agent_find_var_and_group(agent, "CurCwnd", &group, &var);
web100_snap_read(var, snap, tmpstr);
CurCwnd = atoi(web100_value_to_text(web100_get_var_type(var), tmpstr));
+#elif USE_WEB10G
+ web10g_find_val(snap, "CurCwnd", &value);
+ CurCwnd = value.uv32;
+#endif

if (slowStart) {
if (CurCwnd < prevCWNDval) {
@@ -108,9 +116,11 @@

void*
snapWorker(void* arg) {
+ /* WARNING void* arg (workerArgs) is on the stack of the function below and
+ * doesn't exist forever. */
WorkerArgs *workerArgs = (WorkerArgs*) arg;
SnapArgs *snapArgs = workerArgs->snapArgs;
- web100_agent* agent = workerArgs->agent;
+ tcp_stat_agent* agent = workerArgs->agent;
CwndPeaks* peaks = workerArgs->peaks;
int writeSnap = workerArgs->writeSnap;

@@ -136,6 +146,7 @@
pthread_mutex_unlock(&mainmutex);
break;
}
+#if USE_WEB100
web100_snap(snapArgs->snap);
if (peaks) {
findCwndPeaks(agent, peaks, snapArgs->snap);
@@ -143,6 +154,15 @@
if (writeSnap) {
web100_log_write(snapArgs->log, snapArgs->snap);
}
+#elif USE_WEB10G
+ estats_read_vars(snapArgs->snap, snapArgs->conn, agent);
+ if (peaks) {
+ findCwndPeaks(agent, peaks, snapArgs->snap);
+ }
+ if (writeSnap) {
+ estats_record_write_data(snapArgs->log, snapArgs->snap);
+ }
+#endif
pthread_mutex_unlock(&mainmutex);
mysleep(delay);
}
@@ -249,20 +269,20 @@

/** Method to start snap worker thread that collects snap logs
* @param snaparg object
- * @param web100_agent Agent
+ * @param tcp_stat_agent Agent
* @param snaplogenabled Is snap logging enabled?
- * @param workerlooparg integer used to syncronize writing/reading from snaplog/web100 snapshot
+ * @param workerlooparg integer used to syncronize writing/reading from snaplog/tcp_stat snapshot
* @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
+ * @param tcp_stat_connection connection pointer
+ * @param tcp_stat_group group web100_group pointer
*/
-void start_snap_worker(SnapArgs *snaparg, web100_agent *agentarg,
+void start_snap_worker(SnapArgs *snaparg, tcp_stat_agent* agentarg,
CwndPeaks* peaks, char snaplogenabled,
pthread_t *wrkrthreadidarg, char *metafilevariablename,
- char *metafilename, web100_connection* conn,
- web100_group* group) {
+ char *metafilename, tcp_stat_connection conn,
+ tcp_stat_group* group) {
FILE *fplocal;

WorkerArgs workerArgs;
@@ -271,8 +291,13 @@
workerArgs.peaks = peaks;
workerArgs.writeSnap = snaplogenabled;

+#if USE_WEB100
group = web100_group_find(agentarg, "read");
snaparg->snap = web100_snapshot_alloc(group, conn);
+#elif USE_WEB10G
+ snaparg->conn = conn;
+ estats_val_data_new(&snaparg->snap);
+#endif

if (snaplogenabled) {
// memcpy(metafilevariablename, metafilename, strlen(metafilename));
@@ -280,7 +305,12 @@
// just the file name, but full filename is needed to open the log file

fplocal = fopen(get_logfile(), "a");
+
+#if USE_WEB100
snaparg->log = web100_log_open_write(metafilename, conn, group);
+#elif USE_WEB10G
+ estats_record_open(&snaparg->log, metafilename, "w");
+#endif
if (fplocal == NULL) {
log_println(
0,
@@ -302,10 +332,17 @@
pthread_mutex_lock(&mainmutex);
workerLoop= 1;
// obtain web100 snap into "snaparg.snap"
+#if USE_WEB100
web100_snap(snaparg->snap);
if (snaplogenabled) {
web100_log_write(snaparg->log, snaparg->snap);
}
+#elif USE_WEB10G
+ estats_read_vars(snaparg->snap, conn, agentarg);
+ if (snaplogenabled) {
+ estats_record_write_data(snaparg->log, snaparg->snap);
+ }
+#endif
pthread_cond_wait(&maincond, &mainmutex);
pthread_mutex_unlock(&mainmutex);
}
@@ -325,11 +362,17 @@
pthread_join(*workerThreadId, NULL);
}
// close writing snaplog, if snaplog recording is enabled
+#if USE_WEB100
if (snaplogenabled) {
web100_log_close_write(snapArgs_ptr->log);
}
-
web100_snapshot_free(snapArgs_ptr->snap);
+#elif USE_WEB10G
+ if (snaplogenabled) {
+ estats_record_close(&snapArgs_ptr->log);
+ }
+ estats_val_data_free(&snapArgs_ptr->snap);
+#endif
}

/**
@@ -411,22 +454,28 @@

/**
* Set Cwnd limit
- * @param connarg web100_connection pointer
- * @param group_arg web100 group pointer
- * @param agentarg web100 agent pointer
+ * @param connarg tcp_stat_connection pointer
+ * @param group_arg tcp_stat group pointer
+ * @param agentarg tcp_stat agent pointer
* */
-void setCwndlimit(web100_connection* connarg, web100_group* grouparg,
- web100_agent* agentarg, Options* optionsarg) {
+void setCwndlimit(tcp_stat_connection connarg, tcp_stat_group* grouparg,
+ tcp_stat_agent* agentarg, Options* optionsarg) {
+#if USE_WEB100
web100_var *LimRwin, *yar;
+#elif USE_WEB10G
+ struct estats_val yar;
+#endif
+
u_int32_t limrwin_val;
- char yuff[32];

if (optionsarg->limit > 0) {
log_print(1, "Setting Cwnd limit - ");

+#if USE_WEB100
if (connarg != NULL) {
log_println(1,
"Got web100 connection pointer for recvsfd socket\n");
+ char yuff[32];
web100_agent_find_var_and_group(agentarg, "CurMSS", &grouparg,
&yar);
web100_raw_read(yar, connarg, yuff);
@@ -442,6 +491,17 @@
log_print(1, "now write %d to limit the Receive window",
limrwin_val);
web100_raw_write(LimRwin, connarg, &limrwin_val);
+#elif USE_WEB10G
+ if (connarg != -1) {
+ log_println(1,
+ "Got web10g connection for recvsfd socket\n");
+ web10g_get_val(agentarg, connarg, "CurMSS", &yar);
+ log_println(1, "MSS = %s, multiplication factor = %d",
+ yar.uv32, optionsarg->limit);
+ limrwin_val = optionsarg->limit * yar.uv32;
+ log_print(1, "now write %d to limit the Receive window", limrwin_val);
+ estats_write_var("LimRwin", limrwin_val, connarg, agentarg);
+#endif
log_println(1, " --- Done");
}
}
=======================================
--- /branches/applet_usability/src/testoptions.h Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/testoptions.h Tue Oct 15 13:07:11 2013 UTC
@@ -17,7 +17,6 @@
#define RETRY_EXCEEDED_WAITING_DATA -102
#define SOCKET_STATUS_FAILED -1

-
typedef struct testoptions {
int multiple; // multiples tests enabled
int mainport; // main port used for test
@@ -47,8 +46,9 @@

// Snap log characteristics
typedef struct snapArgs {
- web100_snapshot* snap; // web_100 snapshot indicator
- web100_log* log; // web_100 log
+ tcp_stat_connection conn;
+ tcp_stat_snap* snap;
+ tcp_stat_log* log;
int delay; // periodicity, in ms, of collecting snap
} SnapArgs;

@@ -59,26 +59,26 @@

void catch_s2c_alrm(int signo);

-int test_sfw_srv(int ctlsockfd, web100_agent* agent, TestOptions* options,
+int test_sfw_srv(int ctlsockfd, tcp_stat_agent* agent, TestOptions* options,
int conn_options);
-int test_meta_srv(int ctlsockfd, web100_agent* agent, TestOptions* options,
+int test_meta_srv(int ctlsockfd, tcp_stat_agent* agent, TestOptions* options,
int conn_options);

int getCurrentTest();
void setCurrentTest(int testId);

-// void start_snap_worker(SnapArgs *snaparg, web100_agent *agentarg,
-void start_snap_worker(SnapArgs *snaparg, web100_agent *agentarg,
+// void start_snap_worker(SnapArgs *snaparg, tcp_stat_agent *agentarg,
+void start_snap_worker(SnapArgs *snaparg, tcp_stat_agent *agentarg,
CwndPeaks* peaks, char snaplogenabled,
pthread_t *wrkrthreadidarg, char *metafilevariablename,
- char *metafilename, web100_connection* conn,
- web100_group* group);
+ char *metafilename, tcp_stat_connection conn,
+ tcp_stat_group* group);

void stop_snap_worker(pthread_t *workerThreadId, char snaplogenabled,
SnapArgs* snapArgs_ptr);

-void setCwndlimit(web100_connection* connarg, web100_group* grouparg,
- web100_agent* agentarg, Options* optionsarg);
+void setCwndlimit(tcp_stat_connection connarg, tcp_stat_group* grouparg,
+ tcp_stat_agent* agentarg, Options* optionsarg);

int is_buffer_clogged(int nextseqtosend, int lastunackedseq);
void stop_packet_trace(int *monpipe_arr);
=======================================
--- /branches/applet_usability/src/tests_srv.h Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/tests_srv.h Tue Oct 15 13:07:11 2013 UTC
@@ -11,19 +11,19 @@

#include "testoptions.h"

-int test_c2s(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
+int test_c2s(int ctlsockfd, tcp_stat_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);

// S2C test
-int test_s2c(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
+int test_s2c(int ctlsockfd, tcp_stat_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);

// the middlebox test
-int test_mid(int ctlsockfd, web100_agent* agent, TestOptions* testOptions,
+int test_mid(int ctlsockfd, tcp_stat_agent* agent, TestOptions* testOptions,
int conn_options, double* s2c2spd);

#endif // SRC_TESTS_SRV_H_
=======================================
--- /branches/applet_usability/src/utils.c Wed Mar 20 15:05:33 2013 UTC
+++ /branches/applet_usability/src/utils.c Tue Oct 15 13:07:11 2013 UTC
@@ -197,3 +197,69 @@
// strlen(output_buf), output_buf);
return j - 1;
}
+
+/**
+ * Converts a IPv4-mapped IPv6 sockaddr_in6 to a sockaddr_in4
+ *
+ * @param ss a sockaddr_storage
+ *
+ * @return if the ss represents a IPv6 mapped IPv4 address it will be converted
+ * into a IPv4 sockaddr_in. Otherwise ss will remain unchanged.
+ */
+void ipv4mapped_to_ipv4(struct sockaddr_storage * ss) {
+#ifdef AF_INET6
+ if (ss->ss_family == AF_INET6) {
+ if (IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *) ss)->sin6_addr)) {
+ // Ports already in the right place so just move the actual address
+ ss->ss_family = AF_INET;
+ ((struct sockaddr_in *) ss)->sin_addr.s_addr =
+ ((uint32_t *) &((struct sockaddr_in6 *) ss)->sin6_addr)[3];
+ }
+ }
+#endif
+}
+
+/**
+ * Get a string representation of an ip address.
+ *
+ * NOTE: This will modify addr if its an IPv4 mapped address and return
+ * it as a IPv4 sockaddr.
+ *
+ * @param addr A sockaddr structure which contains the address
+ * @param buf A buffer to fill with the ip address as a string
+ * @param len The length of buf.
+ */
+void addr2a(struct sockaddr_storage * addr, char * buf, int len) {
+ ipv4mapped_to_ipv4(addr);
+
+ if (((struct sockaddr *)addr)->sa_family == AF_INET) {
+ /* IPv4 */
+ inet_ntop(AF_INET, &(((struct sockaddr_in *)addr)->sin_addr),
+ buf, len);
+ }
+#ifdef AF_INET6
+ else if (((struct sockaddr *)addr)->sa_family == AF_INET6) {
+ /* IPv6 */
+ inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)addr)->sin6_addr),
+ buf, len);
+ }
+#endif
+}
+
+/**
+ * Get a string representation of an port number.
+ *
+ * @param addr A sockaddr structure which contains the port number
+ * @param buf A buffer to fill with the port number as a string
+ * @param len The length of buf.
+ */
+void port2a(struct sockaddr_storage* addr, char* buf, int len) {
+ if (((struct sockaddr*)addr)->sa_family == AF_INET) {
+ snprintf(buf, len, "%hu", ntohs(((struct sockaddr_in*)addr)->sin_port));
+ }
+#ifdef AF_INET6
+ else if (((struct sockaddr*)addr)->sa_family == AF_INET6) {
+ snprintf(buf, len, "%hu", ntohs(((struct sockaddr_in6*)addr)->sin6_port));
+ }
+#endif
+}
=======================================
--- /branches/applet_usability/src/utils.h Thu Nov 15 21:33:44 2012 UTC
+++ /branches/applet_usability/src/utils.h Tue Oct 15 13:07:11 2013 UTC
@@ -9,6 +9,8 @@
#ifndef SRC_UTILS_H_
#define SRC_UTILS_H_

+#include <arpa/inet.h>
+
int check_int(char* text, int* number);
int check_rint(char* text, int* number, int minVal, int maxVal);
int check_long(char* text, long* number);
@@ -18,6 +20,10 @@
void mysleep(double time);
int trim(char *line, int line_size,
char * output_buf, int output_buf_size);
+/* These are socket/sock_addr related functions */
+void ipv4mapped_to_ipv4(struct sockaddr_storage * ss);
+void addr2a(struct sockaddr_storage * addr, char * buf, int len);
+void port2a(struct sockaddr_storage* addr, char* buf, int len);

// Numbers 1 and 65535 are used in mrange.c for determining "valid" ranges
// While the methods could be used for any "range" comparison,
=======================================
--- /branches/applet_usability/src/web100-admin.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/web100-admin.c Tue Oct 15 13:07:11 2013 UTC
@@ -7,16 +7,18 @@
*

*/

+#include "web100-admin.h"
+
#include <math.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>

-#include "web100srv.h"
+#include "heuristics.h"
#include "logging.h"
-#include "web100-admin.h"
+#include "strlutils.h"
#include "utils.h"
-#include "strlutils.h"
+#include "web100srv.h"

/* Initialize the Administrator view. Process the data in the existing log file to
* catch up on what's happened before.
@@ -761,7 +763,7 @@
MinRTT = atoi(tmpstr);
}

-display: log_println(4, "Web100 variables line received\n");
+display: log_println(4, TCP_STAT_NAME" variables line received\n");
totalcnt = calculate(date, SumRTT, CountRTT, CongestionSignals,
PktsOut, DupAcksIn, AckPktsIn, CurrentMSS,
SndLimTimeRwin, SndLimTimeCwnd, SndLimTimeSender,
=======================================
--- /branches/applet_usability/src/web100-pcap.c Wed Jul 17 14:57:34 2013 UTC
+++ /branches/applet_usability/src/web100-pcap.c Tue Oct 15 13:07:11 2013 UTC
@@ -107,7 +107,7 @@
*
* This calls pcap_breakloop with the correct capture.
*/
-void force_breakloop(){
+void force_breakloop() {
if (pd != NULL) {
pcap_breakloop(pd);
}
=======================================
--- /branches/applet_usability/src/web100-util.c Fri Sep 13 18:02:07 2013 UTC
+++ /branches/applet_usability/src/web100-util.c Tue Oct 15 13:07:11 2013 UTC
@@ -10,12 +10,89 @@
#include <time.h>
#include <assert.h>

-#include "web100srv.h"
-#include "network.h"
#include "logging.h"
-#include "utils.h"
+#include "network.h"
#include "protocol.h"
#include "strlutils.h"
+#include "utils.h"
+#include "web100srv.h"
+
+struct tcp_name {
+ char* web100_name;
+ char* web10g_name;
+};
+
+/* Must match in-order with tcp_vars in web100srv.h struct */
+// TODO: is there better way to do this?? preprocessor macros or something
+static struct tcp_name tcp_names[] = {
+/* {"WEB100", "WEB10G" } / tcp_vars name / */
+ {"Timeouts", "Timeouts"}, /* Timeouts */
+ {"SumRTT", "SumRTT"}, /* SumRTT */
+ {"CountRTT", "CountRTT"}, /* CountRTT */
+ {"PktsRetrans", "SegsRetrans"}, /* PktsRetrans */
+ {"FastRetran", "FastRetran"}, /* FastRetran */
+ {"DataPktsOut", "DataSegsOut"}, /* DataPktsOut */
+ {"AckPktsOut", "AckSegsOut"}, /* AckSegsOut (like AckSegsIn) =
+ SegsOut - DataSegsOut */
+ {"CurMSS", "CurMSS"}, /* CurrentMSS */
+ {"DupAcksIn", "DupAcksIn"}, /* DupAcksIn */
+ /* NOTE: in the server to client throughput test all packets received from client are ack's
+ * So SegsIn == AckPktsIn. Replacement in web10g is AckPktsIn == (SegsIn - DataSegsIn)
+ *
+ * So web100 kernel code looked like this
+ *
+ vars->PktsIn++;
+ if (skb->len == th->doff*4) {
+ vars->AckPktsIn++;
+ if (TCP_SKB_CB(skb)->ack_seq == tp->snd_una)
+ vars->DupAcksIn++;
+ } else {
+ vars->DataPktsIn++;
+ vars->DataBytesIn += skb->len - th->doff*4;
+ }
+ * Web10G kernel code looks like this
+ *
+ vars->SegsIn++;
+ if (skb->len == th->doff * 4) {
+ if (TCP_SKB_CB(skb)->ack_seq == tp->snd_una)
+ vars->DupAcksIn++;
+ } else {
+ vars->DataSegsIn++;
+ vars->DataOctetsIn += skb->len - th->doff * 4;
+ }
+ */
+ {"AckPktsIn", "AckSegsIn"}, /* AckPktsIn - not included in web10g */
+ {"MaxRwinRcvd", "MaxRwinRcvd"}, /* MaxRwinRcvd */
+ {"X_Sndbuf", NULL}, /* Sndbuf - Not in Web10g pull from socket */
+ {"CurCwnd", "CurCwnd"}, /* CurrentCwnd */
+ {"SndLimTimeRwin", "SndLimTimeRwin"}, /* SndLimTimeRwin */
+ {"SndLimTimeCwnd", "SndLimTimeCwnd"}, /* SndLimTimeCwnd */
+ {"SndLimTimeSender", "SndLimTimeSnd"}, /* SndLimTimeSender */
+ {"DataBytesOut", "HCDataOctetsOut"}, /* DataBytesOut HC for 10Gig */
+ {"SndLimTransRwin", "SndLimTransRwin"}, /* SndLimTransRwin */
+ {"SndLimTransCwnd", "SndLimTransCwnd"}, /* SndLimTransCwnd */
+ {"SndLimTransSender", "SndLimTransSnd"}, /* SndLimTransSender */
+ {"MaxSsthresh", "MaxSsthresh"}, /* MaxSsthresh */
+ {"CurRTO", "CurRTO"}, /* CurrentRTO */
+ {"CurRwinRcvd", "CurRwinRcvd"}, /* CurrentRwinRcvd */
+ {"MaxCwnd", "MaxCwnd"}, /* MaxCwnd not in web10g but is
+ MAX(MaxSsCwnd, MaxCaCwnd) special case in web10g_find_val */
+ {"CongestionSignals", "CongSignals"}, /* CongestionSignals */
+ {"PktsOut", "SegsOut"}, /* PktsOut */
+ {"MinRTT", "MinRTT"}, /* MinRTT */
+ {"RcvWinScale", "WinScaleRcvd"}, /* RcvWinScale */
+ {"SndWinScale", "WinScaleSent"}, /* SndWinScale */
+ {"CongAvoid", "CongAvoid"}, /* CongAvoid */
+ {"CongestionOverCount", "CongOverCount"}, /* CongestionOverCount */
+ {"MaxRTT", "MaxRTT"}, /* MaxRTT */
+ {"OtherReductions", "OtherReductions"}, /* OtherReductions */
+ {"CurTimeoutCount", "CurTimeoutCount"}, /* CurTimeoutCount */
+ {"AbruptTimeouts", "AbruptTimeouts"}, /* AbruptTimeouts */
+ {"SendStall", "SendStall"}, /* SendStall */
+ {"SlowStart", "SlowStart"}, /* SlowStart */
+ {"SubsequentTimeouts", "SubsequentTimeouts"}, /* SubsequentTimeouts */
+ {"ThruBytesAcked", "ThruOctetsAcked"}, /* ThruBytesAcked */
+};

/**
* set up the necessary structures for monitoring connections at the
@@ -24,7 +101,8 @@
* @return integer indicating number of web100 variables read
* or indicating failure of initialization
*/
-int web100_init(char *VarFileName) {
+int tcp_stat_init(char *VarFileName) {
+#if USE_WEB100
FILE * fp;
char line[256], trimmedline[256];
int count_vars = 0;
@@ -54,47 +132,8 @@
log_println(1, "web100_init() read %d variables from file", count_vars);

return (count_vars);
-}
-
-/**
- * Get a string representation of an ip address.
- *
- * @param addr A sockaddr structure which contains the address
- * @param buf A buffer to fill with the ip address as a string
- * @param len The length of buf.
- */
-static void addr2a(struct sockaddr_storage * addr,char * buf, int len){
- if(((struct sockaddr *)addr)->sa_family == AF_INET){
- /* IPv4 */
- inet_ntop(AF_INET, &(((struct sockaddr_in *)addr)->sin_addr),
- buf, len);
- }
-#ifdef AF_INET6
- else if(((struct sockaddr *)addr)->sa_family == AF_INET6 ){
- /* IPv6 */
- inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)addr)->sin6_addr),
- buf, len);
- }
-#endif
-}
-
-/**
- * Get a string representation of an port number.
- *
- * @param addr A sockaddr structure which contains the port number
- * @param buf A buffer to fill with the port number as a string
- * @param len The length of buf.
- */
-static void port2a(struct sockaddr_storage * addr,char * buf, int len){
- if(((struct sockaddr *)addr)->sa_family == AF_INET){
- /* IPv4 */
- snprintf(buf, len, "%hu", ntohs(((struct sockaddr_in *)addr)->sin_port));
- }
-#ifdef AF_INET6
- else if(((struct sockaddr *)addr)->sa_family == AF_INET6 ){
- /* IPv6 */
- snprintf(buf, len, "%hu", ntohs(((struct sockaddr_in6 *)addr)->sin6_port));
- }
+#elif USE_WEB10G
+ return TOTAL_INDEX_MAX;
#endif
}

@@ -116,11 +155,18 @@
*
*
*/
-void web100_middlebox(int sock, web100_agent* agent, web100_connection* cn,
- char *results, size_t results_strlen) {
+void tcp_stat_middlebox(int sock, tcp_stat_agent* agent, tcp_stat_connection cn,
+ char *results, size_t results_strlen) {
+#if USE_WEB100
web100_var* var;
web100_group* group;
web100_snapshot* snap;
+ web100_var* LimCwnd;
+#elif USE_WEB10G
+ struct estats_val value;
+ estats_val_data* data = NULL;
+#endif
+
char buff[8192], line[256];
char* sndbuff;
int i, j, k, currentMSSval = 0;
@@ -130,13 +176,12 @@
int ret;
char tmpstr[200];
size_t tmpstrlen = sizeof(tmpstr);
- web100_var *LimCwnd;
u_int32_t limcwnd_val;
struct sockaddr_storage saddr;
socklen_t saddr_size;
-
+
// middlebox test results
- static char vars[][255] = { "CurMSS", "WinScaleSent", "WinScaleRecv", };
+ static char vars[][255] = { "CurMSS", "WinScaleSent", "WinScaleRcvd", };

assert(results);

@@ -146,9 +191,9 @@

// get socket IP address
saddr_size = sizeof(saddr);
- if (getsockname(sock,(struct sockaddr *) &saddr, &saddr_size) == -1) {
+ if (getsockname(sock, (struct sockaddr *) &saddr, &saddr_size) == -1) {
/* Make it clear something failed but continue test */
- log_println(0,"Middlebox - getsockname() failed: %s", strerror(errno));
+ log_println(0, "Middlebox - getsockname() failed: %s", strerror(errno));
snprintf(line, sizeof(line), "address_error;");
snprintf(tmpstr, sizeof(tmpstr), "0");
} else {
@@ -174,9 +219,9 @@
// and copy into results
tmpstrlen = sizeof(tmpstr);
saddr_size = sizeof(saddr);
- if (getpeername(sock,(struct sockaddr *) &saddr, &saddr_size) == -1) {
+ if (getpeername(sock, (struct sockaddr *) &saddr, &saddr_size) == -1) {
/* Make it clear something failed but continue test */
- log_println(0,"Middlebox - getpeername() failed: %s", strerror(errno));
+ log_println(0, "Middlebox - getpeername() failed: %s", strerror(errno));
snprintf(line, sizeof(line), "address_error;");
snprintf(tmpstr, sizeof(tmpstr), "0");
} else {
@@ -191,7 +236,8 @@
strlcat(results, line, results_strlen);

// get web100 values for the middlebox test result group
- for (i = 0; i < 3; i++) {
+ for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
+#if USE_WEB100
// read web100_group and web100_var of vars[i] into group and var
web100_agent_find_var_and_group(agent, vars[i], &group, &var);
// read variable value from web100 connection
@@ -204,7 +250,20 @@
currentMSSval = atoi(
web100_value_to_text(web100_get_var_type(var), buff));
snprintf(line, sizeof(line), "%s;",
- web100_value_to_text(web100_get_var_type(var), buff));
+ web100_value_to_text(web100_get_var_type(var), buff));
+#elif USE_WEB10G
+ int type;
+ type = web10g_get_val(agent, cn, vars[i], &value);
+ if (type == -1) {
+ log_println(0, "Middlebox: Failed to read the value of %s", vars[i]);
+ return;
+ } else {
+ if (strcmp(vars[i], "CurMSS") == 0)
+ currentMSSval = value.uv32;
+ snprintf(line, sizeof(line), "%u;", value.uv32);
+ }
+#endif
+
if (strcmp(line, "4294967295;") == 0)
snprintf(line, sizeof(line), "%d;", -1);

@@ -223,12 +282,18 @@
* RAC 2/28/06
*/

+ limcwnd_val = 2 * currentMSSval;
+
+#if USE_WEB100
// get web100_var and web100_group
web100_agent_find_var_and_group(agent, "LimCwnd", &group, &LimCwnd);

// set TCP CWND web100 variable to twice the current MSS Value
- limcwnd_val = 2 * currentMSSval;
web100_raw_write(LimCwnd, cn, &limcwnd_val);
+#elif USE_WEB10G
+ estats_write_var("LimCwnd", (uint32_t)limcwnd_val, cn, agent);
+#endif
+
log_println(5, "Setting Cwnd Limit to %d octets", limcwnd_val);

// try to allocate memory of the size of current MSS Value
@@ -252,9 +317,13 @@
sndbuff[j] = (k++ & 0x7f);
}

+#if USE_WEB100
// get web100 group with name "read"
group = web100_group_find(agent, "read");
snap = web100_snapshot_alloc(group, cn);
+#elif USE_WEB10G
+ estats_val_data_new(&data);
+#endif

FD_ZERO(&wfd);
FD_SET(sock, &wfd);
@@ -264,6 +333,7 @@
if ((ret == -1) && (errno == EINTR)) /* a signal arrived, ignore it */
continue;

+#if USE_WEB100
web100_snap(snap);

// get next sequence # to be sent
@@ -274,6 +344,13 @@
web100_agent_find_var_and_group(agent, "SndUna", &group, &var);
web100_snap_read(var, snap, line);
SndUna = atoi(web100_value_to_text(web100_get_var_type(var), line));
+#elif USE_WEB10G
+ estats_read_vars(data, cn, agent);
+ web10g_find_val(data, "SndNxt", &value);
+ SndMax = value.uv32;
+ web10g_find_val(data, "SndUna", &value);
+ SndUna = value.uv32;
+#endif

// stop sending data if (buf size * 16) <
// [ (Next Sequence # To Be Sent) - (Oldest Unacknowledged Sequence #) - 1 ]
@@ -289,27 +366,40 @@
if (k < 0) // general error writing to socket. quit
break;
}
+
+#if USE_WEB100
log_println(5, "Finished with web100_middlebox() routine snap-0x%x, "
"sndbuff=%x0x", snap, sndbuff);
web100_snapshot_free(snap);
+#elif USE_WEB10G
+
+ estats_val_data_free(&data);
+ log_println(5, "Finished with web10g_middlebox() routine, "
+ "sndbuff=%x0x", sndbuff);
+#endif
/* free(sndbuff); */
}

/**
- * Get receiver side Web100 stats and write them to the log file
+ * Get receiver side Web100/Web10G stats and writes them to the log file
*
* @param sock integer socket file descriptor
- * @param agent pointer to a web100_agent
- * @param cn pointer to a web100_connection
- * @param count_vars integer number of web100_variables to get value of
+ * @param agent pointer to a tcp_stat_agent
+ * @param cn A tcp_stat_connection
+ * @param count_vars integer number of tcp_stat_vars to get value of
*
*/
-void web100_get_data_recv(int sock, web100_agent* agent, web100_connection* cn,
- int count_vars) {
- int i, ok;
- web100_var* var;
+void tcp_stat_get_data_recv(int sock, tcp_stat_agent* agent,
+ tcp_stat_connection cn, int count_vars) {
+#if USE_WEB100
+ web100_var* var = NULL;
+ web100_group* group = NULL;
+#elif USE_WEB10G
+ estats_val_data* data = NULL;
+ estats_error* err = NULL;
+#endif
+ int i;
char buf[32], line[256], *ctime();
- web100_group* group;
FILE * fp;
time_t tt;

@@ -321,18 +411,24 @@
fprintf(fp, "%15.15s;", ctime(&tt) + 4);
// get values for group, var of IP Address of the Remote host's side of
// connection
+
+#if USE_WEB100
web100_agent_find_var_and_group(agent, "RemAddress", &group, &var);
web100_raw_read(var, cn, buf);
snprintf(line, sizeof(line), "%s;",
web100_value_to_text(web100_get_var_type(var), buf));
+#elif USE_WEB10G
+ web10g_get_remote_addr(agent, cn, buf, sizeof(buf));
+ snprintf(line, sizeof(line), "%s;", buf);
+#endif
// write remote address to log file
if (fp)
fprintf(fp, "%s", line);

- ok = 1;
-
// get values for other web100 variables and write to the log file

+#if USE_WEB100
+ int ok = 1;
for (i = 0; i < count_vars; i++) {
if ((web100_agent_find_var_and_group(agent, web_vars[i].name, &group,
&var)) != WEB100_ERR_SUCCESS) {
@@ -363,6 +459,28 @@
}
ok = 1;
}
+#elif USE_WEB10G
+ estats_val_data_new(&data);
+ estats_read_vars(data, cn, agent);
+
+ // Loop through all the web10g variables and write to file/log_print them
+ for (i = 0; i < data->length; i++) {
+ if (data->val[i].masked) continue;
+ char * str = NULL;
+
+ if ((err = estats_val_as_string(&str, &data->val[i], estats_var_array[i].valtype)) != NULL) {
+ log_println(0, "Error: tcp_stat_get_data_recv - estats_val_as_string");
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ continue;
+ }
+ if (fp)
+ fprintf(fp, "%s;", str);
+ log_println(9, "%s: %s", estats_var_array[i].name, estats_read_vars);
+ }
+
+ estats_val_data_free(&data);
+#endif

// close file pointers after web100 variables have been fetched
if (fp) {
@@ -370,24 +488,86 @@
fclose(fp);
}
}
+
+#if USE_WEB10G
+/* Persistent storage needed. These are filled by tcp_stat_get_data
+ * and later read by tcp_stat_logvars and free()'d */
+static estats_val_data* dataDumpSave = NULL;
+static int X_SndBuf = -1;
+static int X_RcvBuf = -1;
+#endif
+
+
+
+#if USE_WEB10G
+
+/**
+ * Print a web10g variable to a line using the new name and then write
+ * this line to the test socket. Used by tcp_stat_get_data().
+ * i.e.
+ * <org_name>: <value>
+ *
+ * @param old_name The name within web10g, or an additional name
+ * supported by web10g_find_var
+ * @param new_name The name to print this as (i.e. the web100 name)
+ * @param snap A web10g snapshot
+ * @param line A char* to write the line to
+ * @param line_size Size of line in bytes
+ * @param ctlsock The socket to write to
+ *
+ * If this fails nothing is sent on the cltsocket and the error will
+ * be logged.
+ *
+ */
+static void print_10gvar_renamed(const char * old_name,
+ const char * new_name, const tcp_stat_snap* snap, char * line,
+ int line_size, int ctlsock) {
+ int type;
+ struct estats_val val;
+ estats_error* err;
+ char * str;
+
+ type = web10g_find_val(snap, old_name, &val);
+ if (type == -1) {
+ log_println(0, "In print_10gvar_renamed(), web10g_find_val()"
+ " failed to find %s", old_name);
+ } else {
+ if ((err = estats_val_as_string(&str, &val, type)) != NULL) {
+ log_println(0, "In print_10gvar_renamed(), estats_val_as_string()"
+ " failed for %s", old_name);
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ } else {
+ snprintf(line, line_size, "%s: %s\n", new_name, str);
+ send_msg(ctlsock, TEST_MSG, line, strlen(line));
+ free(str);
+ str = NULL;
+ }
+ }
+}
+
+#endif
+

/**
* Collect Web100 stats from a snapshot and transmit to a receiver.
* The transmission is done using a TES_MSG type message and sent to
* client reachable via the input parameter socket FD.
*
- * @param snap pointer to a web100_snapshot taken earlier
+ * @param snap pointer to a tcp_stat_snapshot taken earlier
* @param ctlsock integer socket file descriptor indicating data recipient
- * @param agent pointer to a web100_agent
- * @param count_vars integer number of web100_variables to get value of
+ * @param agent pointer to a tcp_stat_agent
+ * @param count_vars integer number of tcp_stat_variables to get value of
*
*/
-int web100_get_data(web100_snapshot* snap, int ctlsock, web100_agent* agent,
- int count_vars) {
+int tcp_stat_get_data(tcp_stat_snap* snap, int testsock, int ctlsock,
+ tcp_stat_agent* agent, int count_vars) {
+ char line[256];
+#if USE_WEB100
int i;
web100_var* var;
- char buf[32], line[256];
web100_group* group;
+ char buf[32];

assert(snap);
assert(agent);
@@ -422,6 +602,7 @@
// receiver end
snprintf(web_vars[i].value, sizeof(web_vars[i].value), "%s",
web100_value_to_text(web100_get_var_type(var), buf));
+ /* Why do we atoi after getting as text anyway ?? */
snprintf(line, sizeof(line), "%s: %d\n", web_vars[i].name,
atoi(web_vars[i].value));
send_msg(ctlsock, TEST_MSG, line, strlen(line));
@@ -429,8 +610,177 @@
}
log_println(6, "S2C test - Send web100 data to client pid=%d", getpid());
return (0);
+#elif USE_WEB10G
+ int j;
+ unsigned int xbuf_size;
+ struct estats_val val;
+ estats_error* err;
+
+ xbuf_size = sizeof(X_RcvBuf);
+ if (getsockopt(testsock,
+ SOL_SOCKET, SO_RCVBUF, (void *)&X_RcvBuf, &xbuf_size) != 0) {
+ log_println(0, "Error: failed to getsockopt() SO_RCVBUF");
+ }
+ xbuf_size = sizeof(X_SndBuf);
+ if (getsockopt(testsock,
+ SOL_SOCKET, SO_SNDBUF, (void *)&X_SndBuf, &xbuf_size) != 0) {
+ log_println(0, "Error: failed to getsockopt() SO_RCVBUF");
+ }
+
+ assert(snap);
+
+ /* Need to save this for later */
+ estats_val_data_new(&dataDumpSave);
+ memcpy(dataDumpSave, snap, sizeof(struct estats_val_data)
+ + (sizeof(struct estats_val) * snap->length));
+
+ for (j = 0; j < snap->length; j++) {
+ char *str;
+ if (snap->val[j].masked) continue;
+
+ if ((err = estats_val_as_string(&str, &snap->val[j],
+ estats_var_array[j].valtype)) != NULL) {
+ log_println(0, "In tcp_stat_get_data() estats_val_as_string()"
+ " failed for %s", estats_var_array[j].name);
+ estats_error_print(stderr, err);
+ estats_error_free(&err);
+ continue;
+ }
+ snprintf(line, sizeof(line), "%s: %s\n",
+ estats_var_array[j].name, str);
+ send_msg(ctlsock, TEST_MSG, (const void *) line, strlen(line));
+ log_print(9, "%s", line);
+ free(str);
+ str = NULL;
+ }
+
+ /* This is the list of changed variable names that the client tries to read.
+ * Web100 -> Web10g
+ * ECNEnabled -> ECN
+ * NagleEnabled -> Nagle
+ * SACKEnabled -> WillSendSACK & WillUseSACK
+ * TimestampsEnabled -> TimeStamps
+ * PktsRetrans -> SegsRetrans
+ * X_Rcvbuf -> Not in web10g not used by client but send anyway
+ * X_Sndbuf -> Not in web10g but could be interesting for the client
+ * DataPktsOut -> DataSegsOut
+ * AckPktsOut -> Depreciated
+ * MaxCwnd -> MaxSsCwnd MaxCaCwnd
+ * SndLimTimeSender -> SndLimTimeSnd
+ * DataBytesOut -> DataOctetsOut
+ * AckPktsIn -> Depreciated
+ * SndLimTransSender -> SndLimTransSnd
+ * PktsOut -> SegsOut
+ * CongestionSignals -> CongSignals
+ * RcvWinScale -> Same as WinScaleSent if WinScaleSent != -1
+ */
+ static const char* frame_web100 = "-~~~Web100_old_var_names~~~-: 1\n";
+ int type;
+ char *str = NULL;
+ send_msg(ctlsock, TEST_MSG, (const void *)frame_web100,
+ strlen(frame_web100));
+
+ /* ECNEnabled -> ECN */
+ type = web10g_find_val(snap, "ECN", &val);
+ if (type != ESTATS_SIGNED32) {
+ log_println(0, "In tcp_stat_get_data(), web10g_find_val()"
+ " failed to find ECN bad type=%d", type);
+ } else {
+ snprintf(line, sizeof(line), "ECNEnabled: %"PRId32"\n", (val.sv32 == 1) ? 1 : 0);
+ send_msg(ctlsock, TEST_MSG, line, strlen(line));
+ }
+
+ /* NagleEnabled -> Nagle */
+ type = web10g_find_val(snap, "Nagle", &val);
+ if (type != ESTATS_SIGNED32) {
+ log_println(0, "In tcp_stat_get_data(), web10g_find_val()"
+ " failed to find Nagle bad type=%d", type);
+ } else {
+ snprintf(line, sizeof(line), "NagleEnabled: %"PRId32"\n", (val.sv32 == 2) ? 1 : 0);
+ send_msg(ctlsock, TEST_MSG, line, strlen(line));
+ }
+
+ /* SACKEnabled -> WillUseSACK & WillSendSACK */
+ type = web10g_find_val(snap, "WillUseSACK", &val);
+ if (type == -1) {
+ log_println(0, "In tcp_stat_get_data(), web10g_find_val()"
+ " failed to find WillUseSACK bad type=%d", type);
+ } else {
+ /* Yes this comes through as 3 from web100 */
+ snprintf(line, sizeof(line), "SACKEnabled: %d\n", (val.sv32 == 1) ? 3 : 0);
+ send_msg(ctlsock, TEST_MSG, line, strlen(line));
+ }
+
+ /* TimestampsEnabled -> TimeStamps */
+ type = web10g_find_val(snap, "TimeStamps", &val);
+ if (type != ESTATS_SIGNED32) {
+ log_println(0, "In tcp_stat_get_data(), web10g_find_val()"
+ " failed to find TimeStamps bad type=%d", type);
+ } else {
+ snprintf(line, sizeof(line), "TimestampsEnabled: %"PRId32"\n", (val.sv32 == 1) ? 1 : 0);
+ send_msg(ctlsock, TEST_MSG, line, strlen(line));
+ }
+
+ /* PktsRetrans -> SegsRetrans */
+ print_10gvar_renamed("SegsRetrans", "PktsRetrans", snap, line,
+ sizeof(line), ctlsock);
+
+ /* DataPktsOut -> DataSegsOut */
+ print_10gvar_renamed("DataSegsOut", "DataPktsOut", snap, line,
+ sizeof(line), ctlsock);
+
+ /* MaxCwnd -> MAX(MaxSsCwnd, MaxCaCwnd) */
+ print_10gvar_renamed("MaxCwnd", "MaxCwnd", snap, line,
+ sizeof(line), ctlsock);
+
+ /* SndLimTimeSender -> SndLimTimeSnd */
+ print_10gvar_renamed("SndLimTimeSnd", "SndLimTimeSender", snap, line,
+ sizeof(line), ctlsock);
+
+ /* DataBytesOut -> DataOctetsOut */
+ print_10gvar_renamed("HCDataOctetsOut", "DataBytesOut", snap, line,
+ sizeof(line), ctlsock);
+
+ /* SndLimTransSender -> SndLimTransSnd */
+ print_10gvar_renamed("SndLimTransSnd", "SndLimTransSender", snap, line,
+ sizeof(line), ctlsock);
+
+ /* PktsOut -> SegsOut */
+ print_10gvar_renamed("SegsOut", "PktsOut", snap, line,
+ sizeof(line), ctlsock);
+
+ /* CongestionSignals -> CongSignals */
+ print_10gvar_renamed("CongSignals", "CongestionSignals", snap, line,
+ sizeof(line), ctlsock);
+
+ /* RcvWinScale -> Same as WinScaleSent if WinScaleSent != -1 */
+ type = web10g_find_val(snap, "WinScaleSent", &val);
+ if (type == -1) {
+ log_println(0, "In tcp_stat_get_data(), web10g_find_val()"
+ " failed to find WinScaleSent");
+ } else {
+ if (val.sv32 == -1)
+ snprintf(line, sizeof(line), "RcvWinScale: %u\n", 0);
+ else
+ snprintf(line, sizeof(line), "RcvWinScale: %d\n", val.sv32);
+ send_msg(ctlsock, TEST_MSG, (const void *) line, strlen(line));
+ }
+
+ /* X_Rcvbuf & X_Sndbuf */
+ snprintf(line, sizeof(line), "X_Rcvbuf: %d\n", X_RcvBuf);
+ send_msg(ctlsock, TEST_MSG, (const void *) line, strlen(line));
+ snprintf(line, sizeof(line), "X_Sndbuf: %d\n", X_SndBuf);
+ send_msg(ctlsock, TEST_MSG, (const void *) line, strlen(line));
+
+ send_msg(ctlsock, TEST_MSG, (const void *)frame_web100,
+ strlen(frame_web100));
+
+ log_println(6, "S2C test - Send web100 data to client pid=%d", getpid());
+ return 0;
+#endif
}

+#if USE_WEB100
/**
* Calculate Web100 based Round-Trip Time (RTT) value.
*
@@ -475,6 +825,7 @@
sum = atoi(web100_value_to_text(web100_get_var_type(var), buf));
return (sum / count);
}
+#endif

/**
* Check if the "Auto Tune Send Buffer" and "Auto Tune Receive Buffer" options
@@ -483,7 +834,7 @@
* @param sock integer socket file descriptor indicating data recipient
* @param agent pointer to a web100_agent
* @param cn pointer to web100_connection
- * @return On successful fetch of required web100_varibles, integers:
+ * @return On successful fetch of required web100_variables, integers:
* 0x01 if "Autotune send buffer" is not enabled
* 0x02 if "Autotune receive buffer" is not
enabled
* 0x03 if both " Autotune send buffer" and "Autotune receive buffer" are not enabled.
@@ -493,7 +844,8 @@
* 23 cannot read the value of the X_SBufMode or X_RBufMode web100_variable.
*/

-int web100_autotune(int sock, web100_agent* agent, web100_connection* cn) {
+int tcp_stat_autotune(int sock, tcp_stat_agent* agent, tcp_stat_connection cn) {
+#if USE_WEB100
web100_var* var;
char buf[32];
web100_group* group;
@@ -534,8 +886,13 @@
if (i == 0)
j |= 0x02;
return (j);
+#elif USE_WEB10G
+ // Disabled in web10g.
+ return 0x03;
+#endif
}

+#if USE_WEB100
/**
* Check if the "Auto Tune Send Buffer" and "Auto Tune Receive Buffer" options
* are enabled. If not, scale the Send window or receive window sizes based on the
@@ -559,8 +916,8 @@
* 35 - cannot read value of RcvWinScale
web100 variable.
*
*/
-int web100_setbuff(int sock, web100_agent* agent, web100_connection* cn,
- int autotune) {
+int tcp_stat_setbuff(int sock, tcp_stat_agent* agent, tcp_stat_connection cn,
+ int autotune) {
web100_var* var;
char buf[32];
web100_group* group;
@@ -624,126 +981,80 @@

return (0);
}
+#endif

/**
* @param sock integer socket file descriptor indicating data recipient
- * @param pointers to local copies of web100 variables
+ * @param tcp_vars to local copies of tcp_stat variables
* @return integer 0
- *
- *
*/
-int web100_logvars(int *Timeouts, int *SumRTT, int *CountRTT, int *PktsRetrans,
- int *FastRetran, int *DataPktsOut, int *AckPktsOut,
- int *CurrentMSS, int *DupAcksIn, int *AckPktsIn,
- int *MaxRwinRcvd, int *Sndbuf, int *CurrentCwnd,
- int *SndLimTimeRwin, int *SndLimTimeCwnd,
- int *SndLimTimeSender, int *DataBytesOut,
- int *SndLimTransRwin, int *SndLimTransCwnd,
- int *SndLimTransSender, int *MaxSsthresh, int *CurrentRTO,
- int *CurrentRwinRcvd, int *MaxCwnd, int *CongestionSignals,
- int *PktsOut, int *MinRTT, int count_vars, int *RcvWinScale,
- int *SndWinScale, int *CongAvoid, int *CongestionOverCount,
- int *MaxRTT, int *OtherReductions, int *CurTimeoutCount,
- int *AbruptTimeouts, int *SendStall, int *SlowStart,
- int *SubsequentTimeouts, int *ThruBytesAcked) {
- int i;
+int tcp_stat_logvars(struct tcp_vars* vars, int count_vars) {
+#if USE_WEB100
+ int a, b;
+ for (a = 0; a < sizeof(struct tcp_vars) / sizeof(tcp_stat_var); ++a) {
+ const char* web100_name = tcp_names[a].web100_name;
+ if (web100_name == NULL)
+ continue;
int PktsIn = -1;
int DataPktsIn = -1;
int has_AckPktsIn = 0;

- for (i = 0; i <= count_vars; i++) {
- if (strcmp(web_vars[i].name, "Timeouts") == 0)
- *Timeouts = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "PktsIn") == 0)
- PktsIn = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "DataPktsIn") == 0)
- DataPktsIn = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SumRTT") == 0)
- *SumRTT = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CountRTT") == 0)
- *CountRTT = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "PktsRetrans") == 0)
- *PktsRetrans = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "FastRetran") == 0)
- *FastRetran = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "DataPktsOut") == 0)
- *DataPktsOut = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "AckPktsOut") == 0)
- *AckPktsOut = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CurMSS") == 0)
- *CurrentMSS = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "DupAcksIn") == 0)
- *DupAcksIn = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "AckPktsIn") == 0) {
- has_AckPktsIn = 1;
- *AckPktsIn = atoi(web_vars[i].value);
+ for (b = 0; b < count_vars; b++) {
+ if (strcmp(web_vars[b].name, web100_name) == 0) {
+ tcp_stat_var* var = &((tcp_stat_var *)vars)[a];
+ *var = atoi(web_vars[b].value);
+ log_println(5, "Found %s : %i", web100_name, *var);
+ break;
+ }
}
- else if (strcmp(web_vars[i].name, "MaxRwinRcvd") == 0)
- *MaxRwinRcvd = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "X_Sndbuf") == 0)
- *Sndbuf = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CurCwnd") == 0)
- *CurrentCwnd = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "MaxCwnd") == 0)
- *MaxCwnd = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndLimTimeRwin") == 0)
- *SndLimTimeRwin = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndLimTimeCwnd") == 0)
- *SndLimTimeCwnd = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndLimTimeSender") == 0)
- *SndLimTimeSender = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "DataBytesOut") == 0)
- *DataBytesOut = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndLimTransRwin") == 0)
- *SndLimTransRwin = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndLimTransCwnd") == 0)
- *SndLimTransCwnd = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndLimTransSender") == 0)
- *SndLimTransSender = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "MaxSsthresh") == 0)
- *MaxSsthresh = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CurRTO") == 0)
- *CurrentRTO = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CurRwinRcvd") == 0)
- *CurrentRwinRcvd = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CongestionSignals") == 0)
- *CongestionSignals = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "PktsOut") == 0)
- *PktsOut = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "MinRTT") == 0)
- *MinRTT = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "RcvWinScale") == 0)
- *RcvWinScale = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SndWinScale") == 0)
- *SndWinScale = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CongAvoid") == 0)
- *CongAvoid = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CongestionOverCount") == 0)
- *CongestionOverCount = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "MaxRTT") == 0)
- *MaxRTT = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "OtherReductions") == 0)
- *OtherReductions = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "CurTimeoutCount") == 0)
- *CurTimeoutCount = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "AbruptTimeouts") == 0)
- *AbruptTimeouts = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SendStall") == 0)
- *SendStall = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SlowStart") == 0)
- *SlowStart = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "SubsequentTimeouts") == 0)
- *SubsequentTimeouts = atoi(web_vars[i].value);
- else if (strcmp(web_vars[i].name, "ThruBytesAcked") == 0)
- *ThruBytesAcked = atoi(web_vars[i].value);
+ if (b == count_vars) {
+ log_println(1, "WARNING: Failed to find Web100 var %s", web100_name);
+ }
}
+#elif USE_WEB10G
+ int a;
+ estats_val val;
+ assert(dataDumpSave);

- if (!has_AckPktsIn) {
- *AckPktsIn = PktsIn - DataPktsIn;
+ for (a = 0; a < sizeof(struct tcp_vars) / sizeof(tcp_stat_var); ++a) {
+ const char* web10g_name = tcp_names[a].web10g_name;
+ int vartype;
+ if (web10g_name == NULL)
+ continue;
+
+ /* Find each item in the list */
+ if ((vartype = web10g_find_val(dataDumpSave, web10g_name, &val)) == -1) {
+ log_println(1, "WARNING: Failed to find Web10g var %s", web10g_name);
+ } else {
+ tcp_stat_var* var = &((tcp_stat_var *)vars)[a];
+ switch (vartype) {
+ case ESTATS_UNSIGNED64:
+ *var = (tcp_stat_var) val.uv64;
+ break;
+ case ESTATS_UNSIGNED32:
+ *var = (tcp_stat_var) val.uv32;
+ break;
+ case ESTATS_SIGNED32:
+ *var = (tcp_stat_var) val.sv32;
+ break;
+ case ESTATS_UNSIGNED16:
+ *var = (tcp_stat_var) val.uv16;
+ break;
+ case ESTATS_UNSIGNED8:
+ *var = (tcp_stat_var) val.uv8;
+ break;
+ }
+ log_println(5, "Found %s : %i", web10g_name, *var);
+ }
}
+ /* Our special case */
+ vars->Sndbuf = X_SndBuf;

- return (0);
+ estats_val_data_free(&dataDumpSave);
+#endif
+ return 0;
}
+

/**
* Routine to read snaplog file and determine the number of times the
@@ -758,8 +1069,9 @@
* @return Integer, 0 on success, -1 on failure
*/

-int CwndDecrease(web100_agent* agent, char* logname, u_int32_t *dec_cnt,
+int CwndDecrease(char* logname, u_int32_t *dec_cnt,
u_int32_t *same_cnt, u_int32_t *inc_cnt) {
+#if USE_WEB100
web100_var* var;
char buff[256];
web100_snapshot* snap;
@@ -767,7 +1079,15 @@
web100_log* log;
web100_group* group;
web100_agent* agnt;
+#elif USE_WEB10G
+ estats_val var;
+ char buff[256];
+ estats_val_data* snap;
+ int s1, s2, cnt, rt;
+ estats_record* log;
+#endif

+#if USE_WEB100
// open snaplog file to read values
if ((log = web100_log_open_read(logname)) == NULL)
return (0);
@@ -782,18 +1102,33 @@
if (web100_agent_find_var_and_group(agnt, "CurCwnd", &group, &var)
!= WEB100_ERR_SUCCESS)
return (-1);
+#elif USE_WEB10G
+ estats_record_open(&log, logname, "r");
+#endif
+
s2 = 0;
cnt = 0;

// get values and update counts
+#if USE_WEB100
while (web100_snap_from_log(snap, log) == 0) {
+#elif USE_WEB10G
+ while (estats_record_read_data(&snap, log) == NULL) {
+#endif
if (cnt++ == 0)
continue;
s1 = s2;
// Parse snapshot, returning variable values
+#if USE_WEB100
rt = web100_snap_read(var, snap, buff);
s2 = atoi(web100_value_to_text(web100_get_var_type(var), buff));
+#elif USE_WEB10G
+ rt = web10g_find_val(snap, "CurCwnd", &var);
+ s2 = var.uv32;
+#endif
+
if (cnt < 20) {
+#if USE_WEB100
log_println(7, "Reading snaplog %p (%d), var = %s", snap, cnt,
(char*) var);
log_println(
@@ -802,6 +1137,15 @@
rt, s1, s2,
web100_value_to_text(web100_get_var_type(var), buff),
*dec_cnt);
+#elif USE_WEB10G
+ log_println(7, "Reading snaplog %p (%d), var = %"PRIu64, snap, cnt,
+ var.uv64);
+ log_println(
+ 7,
+ "Checking for Cwnd decreases. rt=%d, s1=%d, s2=%d, dec-cnt=%d",
+ rt, s1, s2,
+ *dec_cnt);
+#endif
***The diff for this file has been truncated for email.***
=======================================
--- /branches/applet_usability/src/web100clt.c Thu Apr 11 14:37:40 2013 UTC
+++ /branches/applet_usability/src/web100clt.c Tue Oct 15 13:07:11 2013 UTC
@@ -1,5 +1,7 @@
#include "../config.h"

+#include <arpa/inet.h>
+#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
@@ -46,6 +48,9 @@
double loss, estimate, avgrtt, spd, waitsec, timesec, rttsec;
double order, rwintime, sendtime, cwndtime, rwin, swin, cwin;
double mylink;
+/* Set to either Web10G or Web100 */
+const char *ServerType;
+
static struct option long_options[] = {
{ "name", 1, 0, 'n' }, { "port", 1, 0, 'p' },
{ "debug", 0, 0, 'd' }, { "help", 0, 0, 'h' },
@@ -104,7 +109,8 @@

void printWeb100VarInfo() {
int i = 0;
- printf(" --- Detailed description of the Web100 variables ---\n\n");
+
+ printf(" --- Detailed description of the %s variables ---\n\n", ServerType);

while (web100vartable[i][0]) {
printf("* %s\n %s\n", web100vartable[i][0], web100vartable[i][1]);
@@ -185,10 +191,10 @@
results_sfw(tests, host);

if (msglvl > 0) {
- printf("\n\t------ Web100 Detailed Analysis ------\n");
+ printf("\n\t------ %s Detailed Analysis ------\n", ServerType);

- printf("\nWeb100 reports the Round trip time = %0.2f msec;",
- avgrtt);
+ printf("\n%s reports the Round trip time = %0.2f msec;",
+ ServerType, avgrtt);

printf("the Packet size = %d Bytes; and \n", CurrentMSS);

@@ -205,8 +211,8 @@

// Now print details of optional Performance settings values like the
// following list:
- printf("\n Web100 reports TCP negotiated the optional Performance "
- "Settings to: \n");
+ printf("\n %s reports TCP negotiated the optional Performance "
+ "Settings to: \n", ServerType);

// ..Selective ack options
print_SAck_RFC2018(SACKEnabled);
@@ -232,32 +238,10 @@
c2sAck, s2cData, s2cAck);
}
} else {
- printf("No Web100 data collected! Possible Duplex Mismatch condition "
+ printf("No %s data collected! Possible Duplex Mismatch condition "
"caused Server to client test to run long.\nCheck for host=Full "
- "and switch=Half mismatch condition\n");
- }
-}
-
-/**
- * Get a string representation of an ip address.
- *
- * @param addr A sockaddr structure which contains the address
- * @param buf A buffer to fill with the ip address as a string
- * @param len The length of buf.
- */
-static void addr2a(struct sockaddr_storage * addr,char * buf, int len){
- if(((struct sockaddr *)addr)->sa_family == AF_INET){
- /* IPv4 */
- inet_ntop(AF_INET, &(((struct sockaddr_in *)addr)->sin_addr),
- buf, len);
+ "and switch=Half mismatch condition\n", ServerType);
}
-#ifdef AF_INET6
- else if(((struct sockaddr *)addr)->sa_family == AF_INET6 ){
- /* IPv6 */
- inet_ntop(AF_INET6, &(((struct sockaddr_in6 *)addr)->sin6_addr),
- buf, len);
- }
-#endif
}

/**
@@ -277,7 +261,7 @@
void middleboxResults(char *midresult_str, int cltsock) {
char ssip[64], scip[64], *str;
char csip[64], ccip[64];
- struct sockaddr_storage addr;
+ struct sockaddr_storage addr;
socklen_t addr_size;
int mss;
size_t tmpLen;
@@ -295,22 +279,22 @@
winssent = atoi(str);
str = strtok(NULL, ";");
winsrecv = atoi(str);
-
+
/* Get the our local IP address */
addr_size = sizeof(addr);
memset(ccip, 0, 64);
tmpLen = 63;
- if (getsockname(cltsock,(struct sockaddr *) &addr, &addr_size) == -1) {
+ if (getsockname(cltsock, (struct sockaddr *) &addr, &addr_size) == -1) {
perror("Middlebox - getsockname() failed");
} else {
addr2a(&addr, ccip , tmpLen);
}
-
+
/* Get the server IP address */
addr_size = sizeof(addr);
memset(csip, 0, 64);
tmpLen = 63;
- if (getpeername(cltsock,(struct sockaddr *) &addr, &addr_size) == -1) {
+ if (getpeername(cltsock, (struct sockaddr *) &addr, &addr_size) == -1) {
perror("Middlebox - getpeername() failed");
} else {
addr2a(&addr, csip , tmpLen);
@@ -777,7 +761,7 @@
// Version compatibility between server-client must be verified

buff[msgLen] = 0;
- if (buff[0] != 'v') { // payload does'nt start with a version indicator
+ if (buff[0] != 'v') { // payload doesn't start with a version indicator
log_println(0, "Incompatible version number");
exit(4);
}
@@ -786,6 +770,12 @@
log_println(1, "WARNING: NDT server has different version number (%s)",
&buff[1]);
}
+
+ ServerType = "Web100";
+ if (strlen(buff) > 6) {
+ if (strcmp(&buff[strlen(buff) - 6], "Web10G") == 0)
+ ServerType = "Web10G";
+ }

// Server must send a message to negotiate the test suite, and this is
// a MSG_LOGIN type of message which indicates the same set of tests as
=======================================
--- /branches/applet_usability/src/web100srv.c Wed Jul 17 14:57:34 2013 UTC
+++ /branches/applet_usability/src/web100srv.c Tue Oct 15 13:07:11 2013 UTC
@@ -544,7 +544,7 @@

case SIGHUP:
/* Initialize Web100 structures */
- count_vars = web100_init(VarFileName);
+ count_vars = tcp_stat_init(VarFileName);

/* The administrator view automatically generates a usage page for the
* NDT server. This page is then accessable to the general public.
@@ -620,8 +620,12 @@
set_debuglvl(atoi(val));
continue;
} else if (strncasecmp(key, "variable_file", 6) == 0) {
+#if USE_WEB100
snprintf(wvfn, sizeof(wvfn), "%s", val);
VarFileName = wvfn;
+#elif USE_WEB10G
+ log_println(0, "Web10G does not require variable file. Ignoring");
+#endif
continue;
} else if (strncasecmp(key, "log_file", 3) == 0) {
snprintf(lgfn, sizeof(lgfn), "%s", val);
@@ -879,14 +883,19 @@
/**
* Run all tests, process results, record them into relevant log files
*
- * @param agent pointer to web_100 agent
+ * @param agent pointer to tcp_stat agent
* @param ctlsockfd socket used for server->client communication
* @param testopt TestOptions *
* @param test_suite pointer to string indicating tests to be run
* */

-int run_test(web100_agent* agent, int ctlsockfd, TestOptions* testopt,
+int run_test(tcp_stat_agent* agent, int ctlsockfd, TestOptions* testopt,
char *test_suite) {
+#if USE_WEB100
+ tcp_stat_connection conn = NULL;
+#elif USE_WEB10G
+ tcp_stat_connection conn = -1;
+#endif
char date[32]; // date indicator
char spds[4][256]; // speed "bin" array containing counters for speeds
char logstr1[4096], logstr2[1024]; // log
@@ -894,18 +903,8 @@
char isoTime[64];

// int n; // temporary iterator variable --// commented out -> calc_linkspeed
- int Timeouts, SumRTT, CountRTT, PktsRetrans, FastRetran, DataPktsOut;
- int AckPktsOut, CurrentMSS, DupAcksIn, AckPktsIn, MaxRwinRcvd, Sndbuf;
- int CurrentCwnd, SndLimTimeRwin, SndLimTimeCwnd, SndLimTimeSender,
- DataBytesOut;
- int SndLimTransRwin, SndLimTransCwnd, SndLimTransSender, MaxSsthresh;
- int CurrentRTO, CurrentRwinRcvd, MaxCwnd, CongestionSignals, PktsOut,
- MinRTT;
- int CongAvoid, CongestionOverCount, MaxRTT, OtherReductions,
- CurTimeoutCount = 0;
- int AbruptTimeouts, SendStall, SlowStart, SubsequentTimeouts,
- ThruBytesAcked;
- int RcvWinScale, SndWinScale;
+ struct tcp_vars vars;
+
int link = CANNOT_DETERMINE_LINK; // local temporary variable indicative of
// link speed. Transmitted but unused at client end , which has a similar
// link speed variable
@@ -960,8 +959,6 @@

FILE * fp;

- web100_connection* conn;
-
// start with a clean slate of currently running test and direction
setCurrentTest(TEST_NONE);
log_println(7, "Remote host= %s", get_remotehost());
@@ -977,11 +974,11 @@
spd_index = 0;

// obtain web100 connection and check auto-tune status
- conn = web100_connection_from_socket(agent, ctlsockfd);
- autotune = web100_autotune(ctlsockfd, agent, conn);
+ conn = tcp_stat_connection_from_socket(agent, ctlsockfd);
+ autotune = tcp_stat_autotune(ctlsockfd, agent, conn);

// client needs to be version compatible. Send current version
- snprintf(buff, sizeof(buff), "v%s", VERSION);
+ snprintf(buff, sizeof(buff), "v%s", VERSION "-" TCP_STAT_NAME);
send_msg(ctlsockfd, MSG_LOGIN, buff, strlen(buff));

// initiate test with MSG_LOGIN message.
@@ -1074,86 +1071,79 @@
// ...determine number of times congestion window has been changed
if (options.cwndDecrease) {
dec_cnt = inc_cnt = same_cnt = 0;
- CwndDecrease(agent, options.s2c_logname, &dec_cnt, &same_cnt, &inc_cnt);
+ CwndDecrease(options.s2c_logname, &dec_cnt, &same_cnt, &inc_cnt);
log_println(2, "####### decreases = %d, increases = %d, no change = %d",
dec_cnt, inc_cnt, same_cnt);
}

// ...other variables
- web100_logvars(&Timeouts, &SumRTT, &CountRTT, &PktsRetrans, &FastRetran,
- &DataPktsOut, &AckPktsOut, &CurrentMSS, &DupAcksIn, &AckPktsIn,
- &MaxRwinRcvd, &Sndbuf, &CurrentCwnd, &SndLimTimeRwin,
- &SndLimTimeCwnd, &SndLimTimeSender, &DataBytesOut,
- &SndLimTransRwin, &SndLimTransCwnd, &SndLimTransSender,
- &MaxSsthresh, &CurrentRTO, &CurrentRwinRcvd, &MaxCwnd,
- &CongestionSignals, &PktsOut, &MinRTT, count_vars,
- &RcvWinScale, &SndWinScale, &CongAvoid, &CongestionOverCount,
- &MaxRTT, &OtherReductions, &CurTimeoutCount, &AbruptTimeouts,
- &SendStall, &SlowStart, &SubsequentTimeouts, &ThruBytesAcked);
+ memset(&vars, 0xFF, sizeof(vars));
+ tcp_stat_logvars(&vars, count_vars);

// end getting web100 variable values
/* if (rc == 0) { */

// section to calculate duplex mismatch
// Calculate average round trip time and convert to seconds
- rttsec = calc_avg_rtt(SumRTT, CountRTT, &avgrtt);
+ rttsec = calc_avg_rtt(vars.SumRTT, vars.CountRTT, &avgrtt);
// Calculate packet loss
- packetloss_s2c = calc_packetloss(CongestionSignals, PktsOut,
+ packetloss_s2c = calc_packetloss(vars.CongestionSignals, vars.PktsOut,
c2s_linkspeed_data);

// Calculate ratio of packets arriving out of order
- oo_order = calc_packets_outoforder(DupAcksIn, AckPktsIn);
+ oo_order = calc_packets_outoforder(vars.DupAcksIn, vars.AckPktsIn);

// calculate theoretical maximum goodput in bits
- bw_theortcl = calc_max_theoretical_throughput(CurrentMSS, rttsec,
+ bw_theortcl = calc_max_theoretical_throughput(vars.CurrentMSS, rttsec,
packetloss_s2c);

// get window sizes
- calc_window_sizes(&SndWinScale, &RcvWinScale, Sndbuf, MaxRwinRcvd,
- MaxCwnd, &rwin, &swin, &cwin);
+ calc_window_sizes(&vars.SndWinScale, &vars.RcvWinScale, vars.Sndbuf,
+ vars.MaxRwinRcvd, vars.MaxCwnd, &rwin, &swin, &cwin);

// Total test time
- totaltime = calc_totaltesttime(SndLimTimeRwin, SndLimTimeCwnd,
- SndLimTimeSender);
+ totaltime = calc_totaltesttime(vars.SndLimTimeRwin, vars.SndLimTimeCwnd,
+ vars.SndLimTimeSender);

// time spent being send-limited due to client's recv window
- rwintime = calc_sendlimited_rcvrfault(SndLimTimeRwin, totaltime);
+ rwintime = calc_sendlimited_rcvrfault(vars.SndLimTimeRwin, totaltime);

// time spent in being send-limited due to congestion window
- cwndtime = calc_sendlimited_cong(SndLimTimeCwnd, totaltime);
+ cwndtime = calc_sendlimited_cong(vars.SndLimTimeCwnd, totaltime);

// time spent in being send-limited due to own fault
- sendtime = calc_sendlimited_sndrfault(SndLimTimeSender, totaltime);
+ sendtime = calc_sendlimited_sndrfault(vars.SndLimTimeSender, totaltime);

timesec = totaltime / MEGA; // total time in microsecs

// get fraction of total test time waiting for packets to arrive
- RTOidle = calc_RTOIdle(Timeouts, CurrentRTO, timesec);
+ RTOidle = calc_RTOIdle(vars.Timeouts, vars.CurrentRTO, timesec);

// get timeout, retransmission, acks and dup acks ratios.
- tmoutsratio = (double) Timeouts / PktsOut;
- rtranratio = (double) PktsRetrans / PktsOut;
- acksratio = (double) AckPktsIn / PktsOut;
- dackratio = (double) DupAcksIn / (double) AckPktsIn;
+ tmoutsratio = (double) vars.Timeouts / vars.PktsOut;
+ rtranratio = (double) vars.PktsRetrans / vars.PktsOut;
+ acksratio = (double) vars.AckPktsIn / vars.PktsOut;
+ dackratio = (double) vars.DupAcksIn / (double) vars.AckPktsIn;

// get actual throughput in Mbps (totaltime is in microseconds)
- realthruput = calc_real_throughput(DataBytesOut, totaltime);
+ realthruput = calc_real_throughput(vars.DataBytesOut, totaltime);

// total time spent waiting
- waitsec = cal_totalwaittime(CurrentRTO, Timeouts);
+ waitsec = cal_totalwaittime(vars.CurrentRTO, vars.Timeouts);

log_println(2, "CWND limited test = %0.2f while unlimited = %0.2f", s2c2spd,
s2cspd);

// Is thruput measured with limited cwnd(midbox test) > as reported S->C test
- if (is_limited_cwnd_throughput_better(s2c2spd, s2cspd)
- && isNotMultipleTestMode(multiple))
+ if (is_limited_cwnd_throughput_better(s2c2spd, s2cspd) &&
+ isNotMultipleTestMode(multiple)) {
log_println(
2,
"Better throughput when CWND is limited, may be duplex mismatch");
- else
+ } else {
log_println(2,
"Better throughput without CWND limits - normal operation");
+ }

// remove the following line when the new detection code is ready for release
// retaining old comment above
@@ -1161,8 +1151,8 @@
old_mismatch = 1;

if (old_mismatch == 1) {
- if (detect_duplexmismatch(cwndtime, bw_theortcl, PktsRetrans, timesec,
- MaxSsthresh, RTOidle, link, s2cspd, s2c2spd,
+ if (detect_duplexmismatch(cwndtime, bw_theortcl, vars.PktsRetrans, timesec,
+ vars.MaxSsthresh, RTOidle, link, s2cspd, s2c2spd,
multiple)) {
if (is_c2s_throughputbetter(c2sspd, s2cspd)) {
// also, S->C throughput is lesser than C->S throughput
@@ -1199,7 +1189,7 @@

// Faulty hardware link heuristic.
if (detect_faultyhardwarelink(packetloss_s2c, cwndtime, timesec,
- MaxSsthresh))
+ vars.MaxSsthresh))
bad_cable = POSSIBLE_BAD_CABLE;

// test for Ethernet link (assume Fast E.)
@@ -1208,14 +1198,17 @@
link = LINK_ETHERNET;

// test for wireless link
- if (detect_wirelesslink(sendtime, realthruput, bw_theortcl, SndLimTransRwin,
- SndLimTransCwnd, rwintime, link))
+ if (detect_wirelesslink(sendtime, realthruput, bw_theortcl,
+ vars.SndLimTransRwin, vars.SndLimTransCwnd, rwintime,
+ link)) {
link = LINK_WIRELESS;
+ }

// test for DSL/Cable modem link
- if (detect_DSLCablelink(SndLimTimeSender, SndLimTransSender, realthruput,
- bw_theortcl, link))
+ if (detect_DSLCablelink(vars.SndLimTimeSender, vars.SndLimTransSender,
+ realthruput, bw_theortcl, link)) {
link = LINK_DSLORCABLE;
+ }

// full/half link duplex setting heuristic:
// receiver-limited- time > 95%,
@@ -1224,7 +1217,7 @@
// ...and the number of transitions into the 'Sender Limited' state is
// greater than 30 per second

- if (detect_halfduplex(rwintime, SndLimTransRwin, SndLimTransSender,
+ if (detect_halfduplex(rwintime, vars.SndLimTransRwin, vars.SndLimTransSender,
timesec))
half_duplex = POSSIBLE_HALF_DUPLEX;

@@ -1257,8 +1250,8 @@
send_msg(ctlsockfd, MSG_RESULTS, buff, strlen(buff));

snprintf(buff, sizeof(buff),
- "cwin: %0.4f\nrttsec: %0.6f\nSndbuf: %d\naspd: %0.5f\n"
- "CWND-Limited: %0.2f\n", cwin, rttsec, Sndbuf, aspd, s2c2spd);
+ "cwin: %0.4f\nrttsec: %0.6f\nSndbuf: %"VARtype"\naspd: %0.5f\n"
+ "CWND-Limited: %0.2f\n", cwin, rttsec, vars.Sndbuf, aspd, s2c2spd);
send_msg(ctlsockfd, MSG_RESULTS, buff, strlen(buff));

snprintf(buff, sizeof(buff),
@@ -1280,16 +1273,22 @@
log_println(9, "2. meta.clientip =%s:%s:%d", meta.client_ip, rmt_host);

memset(tmpstr, 0, sizeof(tmpstr));
- snprintf(tmpstr, sizeof(tmpstr), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,",
- (int) s2c2spd, (int) s2cspd, (int) c2sspd, Timeouts, SumRTT,
- CountRTT, PktsRetrans, FastRetran, DataPktsOut, AckPktsOut,
- CurrentMSS, DupAcksIn, AckPktsIn);
+ snprintf(tmpstr, sizeof(tmpstr), "%d,%d,%d,%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",%"VARtype",",
+ (int) s2c2spd, (int) s2cspd, (int) c2sspd, vars.Timeouts,
+ vars.SumRTT, vars.CountRTT, vars.PktsRetrans, vars.FastRetran,
+ vars.DataPktsOut, vars.AckPktsOut, vars.CurrentMSS, vars.DupAcksIn,
+ vars.AckPktsIn);
memcpy(meta.summary, tmpstr, strlen(tmpstr));
memset(tmpstr, 0, sizeof(tmpstr));
- snprintf(tmpstr, sizeof(tmpstr), "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,",
- MaxRwinRcvd, Sndbuf, MaxCwnd, SndLimTimeRwin, SndLimTimeCwnd,
- SndLimTimeSender, DataBytesOut, SndLimTransRwin, SndLimTransCwnd,
- SndLimTransSender, MaxSsthresh, CurrentRTO, CurrentRwinRcvd);
+ snprintf(tmpstr, sizeof(tmpstr), "%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype
+ ",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype",",
+ vars.MaxRwinRcvd, vars.Sndbuf, vars.MaxCwnd, vars.SndLimTimeRwin,
+ vars.SndLimTimeCwnd, vars.SndLimTimeSender, vars.DataBytesOut,
+ vars.SndLimTransRwin, vars.SndLimTransCwnd, vars.SndLimTransSender,
+ vars.MaxSsthresh, vars.CurrentRTO, vars.CurrentRwinRcvd);

strlcat(meta.summary, tmpstr, sizeof(meta.summary));
memset(tmpstr, 0, sizeof(tmpstr));
@@ -1298,17 +1297,21 @@

strlcat(meta.summary, tmpstr, sizeof(meta.summary));
memset(tmpstr, 0, sizeof(tmpstr));
- snprintf(tmpstr, sizeof(tmpstr), ",%d,%d,%d,%d,%d,%d,%d,%d,%d",
+ snprintf(tmpstr, sizeof(tmpstr), ",%d,%d,%d,%d,%"VARtype",%"VARtype
+ ",%"VARtype",%"VARtype",%d",
c2s_linkspeed_data, c2s_linkspeed_ack, s2c_linkspeed_data,
- s2c_linkspeed_ack, CongestionSignals, PktsOut, MinRTT, RcvWinScale,
- autotune);
+ s2c_linkspeed_ack, vars.CongestionSignals, vars.PktsOut, vars.MinRTT,
+ vars.RcvWinScale, autotune);

strlcat(meta.summary, tmpstr, sizeof(meta.summary));
memset(tmpstr, 0, sizeof(tmpstr));
- snprintf(tmpstr, sizeof(tmpstr), ",%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", CongAvoid,
- CongestionOverCount, MaxRTT, OtherReductions, CurTimeoutCount,
- AbruptTimeouts, SendStall, SlowStart, SubsequentTimeouts,
- ThruBytesAcked);
+ snprintf(tmpstr, sizeof(tmpstr), ",%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype,
+ vars.CongAvoid, vars.CongestionOverCount, vars.MaxRTT,
+ vars.OtherReductions, vars.CurTimeoutCount, vars.AbruptTimeouts,
+ vars.SendStall, vars.SlowStart, vars.SubsequentTimeouts,
+ vars.ThruBytesAcked);

strlcat(meta.summary, tmpstr, sizeof(meta.summary));
memset(tmpstr, 0, sizeof(tmpstr));
@@ -1327,69 +1330,89 @@
} else {
snprintf(date, sizeof(date), "%15.15s", ctime(&stime) + 4);
fprintf(fp, "%s,", date);
- fprintf(fp, "%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", rmt_host,
- (int) s2c2spd, (int) s2cspd, (int) c2sspd, Timeouts, SumRTT,
- CountRTT, PktsRetrans, FastRetran, DataPktsOut, AckPktsOut,
- CurrentMSS, DupAcksIn, AckPktsIn);
- fprintf(fp, "%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,", MaxRwinRcvd,
- Sndbuf, MaxCwnd, SndLimTimeRwin, SndLimTimeCwnd,
- SndLimTimeSender, DataBytesOut, SndLimTransRwin,
- SndLimTransCwnd, SndLimTransSender, MaxSsthresh, CurrentRTO,
- CurrentRwinRcvd);
+ fprintf(fp, "%s,%d,%d,%d,%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",", rmt_host,
+ (int) s2c2spd, (int) s2cspd, (int) c2sspd, vars.Timeouts,
+ vars.SumRTT, vars.CountRTT, vars.PktsRetrans, vars.FastRetran,
+ vars.DataPktsOut, vars.AckPktsOut, vars.CurrentMSS, vars.DupAcksIn,
+ vars.AckPktsIn);
+ fprintf(fp, "%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype","
+ "%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"
+ VARtype",%"VARtype",%"VARtype",", vars.MaxRwinRcvd,
+ vars.Sndbuf, vars.MaxCwnd, vars.SndLimTimeRwin, vars.SndLimTimeCwnd,
+ vars.SndLimTimeSender, vars.DataBytesOut, vars.SndLimTransRwin,
+ vars.SndLimTransCwnd, vars.SndLimTransSender, vars.MaxSsthresh,
+ vars.CurrentRTO, vars.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", c2s_linkspeed_data,
+ fprintf(fp, ",%d,%d,%d,%d,%"VARtype",%"VARtype",%"VARtype",%"VARtype",%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,
- AbruptTimeouts, SendStall, SlowStart, SubsequentTimeouts,
- ThruBytesAcked);
+ vars.CongestionSignals, vars.PktsOut, vars.MinRTT, vars.RcvWinScale,
+ autotune);
+ fprintf(fp, ",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype
+ ",%"VARtype",%"VARtype",%"VARtype",%"VARtype",%"VARtype,
+ vars.CongAvoid,
+ vars.CongestionOverCount, vars.MaxRTT, vars.OtherReductions,
+ vars.CurTimeoutCount, vars.AbruptTimeouts, vars.SendStall,
+ vars.SlowStart, vars.SubsequentTimeouts, vars.ThruBytesAcked);
fprintf(fp, ",%d,%d,%d\n", peaks.min, peaks.max, peaks.amount);
fclose(fp);
}
db_insert(spds, runave, cputimelog, options.s2c_logname,
options.c2s_logname, testName, testPort, date, rmt_host, s2c2spd,
- s2cspd, c2sspd, Timeouts, SumRTT, CountRTT, PktsRetrans, FastRetran,
- DataPktsOut, AckPktsOut, CurrentMSS, DupAcksIn, AckPktsIn,
- MaxRwinRcvd, Sndbuf, MaxCwnd, SndLimTimeRwin, SndLimTimeCwnd,
- SndLimTimeSender, DataBytesOut, SndLimTransRwin, SndLimTransCwnd,
- SndLimTransSender, MaxSsthresh, CurrentRTO, CurrentRwinRcvd, link,
+ s2cspd, c2sspd, vars.Timeouts, vars.SumRTT, vars.CountRTT,
+ vars.PktsRetrans, vars.FastRetran, vars.DataPktsOut,
+ vars.AckPktsOut, vars.CurrentMSS, vars.DupAcksIn, vars.AckPktsIn,
+ vars.MaxRwinRcvd, vars.Sndbuf, vars.MaxCwnd, vars.SndLimTimeRwin,
+ vars.SndLimTimeCwnd, vars.SndLimTimeSender, vars.DataBytesOut,
+ vars.SndLimTransRwin, vars.SndLimTransCwnd, vars.SndLimTransSender,
+ vars.MaxSsthresh, vars.CurrentRTO, vars.CurrentRwinRcvd, link,
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,
- peaks.amount);
+ vars.CongestionSignals, vars.PktsOut, vars.MinRTT, vars.RcvWinScale,
+ autotune, vars.CongAvoid, vars.CongestionOverCount, vars.MaxRTT,
+ vars.OtherReductions, vars.CurTimeoutCount, vars.AbruptTimeouts,
+ vars.SendStall, vars.SlowStart, vars.SubsequentTimeouts,
+ vars.ThruBytesAcked, peaks.min, peaks.max, peaks.amount);
if (usesyslog == 1) {
snprintf(
logstr1, sizeof(logstr1),
- "client_IP=%s,c2s_spd=%2.0f,s2c_spd=%2.0f,Timeouts=%d,SumRTT=%d,"
-
"CountRTT=%d,PktsRetrans=%d,FastRetran=%d,DataPktsOut=%d,AckPktsOut=%d,"
- "CurrentMSS=%d,DupAcksIn=%d,AckPktsIn=%d,",
- rmt_host, c2sspd, s2cspd, Timeouts, SumRTT, CountRTT,
- PktsRetrans, FastRetran, DataPktsOut, AckPktsOut, CurrentMSS,
- DupAcksIn, AckPktsIn);
+ "client_IP=%s,c2s_spd=%2.0f,s2c_spd=%2.0f,Timeouts=%"VARtype","
+ "SumRTT=%"VARtype","
+ "CountRTT=%"VARtype",PktsRetrans=%"VARtype","
+ "FastRetran=%"VARtype",DataPktsOut=%"VARtype","
+ "AckPktsOut=%"VARtype","
+ "CurrentMSS=%"VARtype",DupAcksIn=%"VARtype","
+ "AckPktsIn=%"VARtype",",
+ rmt_host, c2sspd, s2cspd, vars.Timeouts, vars.SumRTT, vars.CountRTT,
+ vars.PktsRetrans, vars.FastRetran, vars.DataPktsOut, vars.AckPktsOut,
+ vars.CurrentMSS, vars.DupAcksIn, vars.AckPktsIn);
snprintf(
logstr2, sizeof(logstr2),
- "MaxRwinRcvd=%d,Sndbuf=%d,MaxCwnd=%d,SndLimTimeRwin=%d,"
- "SndLimTimeCwnd=%d,SndLimTimeSender=%d,DataBytesOut=%d,"
- "SndLimTransRwin=%d,SndLimTransCwnd=%d,SndLimTransSender=%d,"
- "MaxSsthresh=%d,CurrentRTO=%d,CurrentRwinRcvd=%d,",
- MaxRwinRcvd, Sndbuf, MaxCwnd, SndLimTimeRwin, SndLimTimeCwnd,
- SndLimTimeSender, DataBytesOut, SndLimTransRwin,
- SndLimTransCwnd, SndLimTransSender, MaxSsthresh, CurrentRTO,
- CurrentRwinRcvd);
+ "MaxRwinRcvd=%"VARtype",Sndbuf=%"VARtype","
+ "MaxCwnd=%"VARtype",SndLimTimeRwin=%"VARtype","
+ "SndLimTimeCwnd=%"VARtype",SndLimTimeSender=%"VARtype","
+ "DataBytesOut=%"VARtype","
+ "SndLimTransRwin=%"VARtype",SndLimTransCwnd=%"VARtype","
+ "SndLimTransSender=%"VARtype","
+ "MaxSsthresh=%"VARtype",CurrentRTO=%"VARtype","
+ "CurrentRwinRcvd=%"VARtype",",
+ vars.MaxRwinRcvd, vars.Sndbuf, vars.MaxCwnd, vars.SndLimTimeRwin,
+ vars.SndLimTimeCwnd, vars.SndLimTimeSender, vars.DataBytesOut,
+ vars.SndLimTransRwin, vars.SndLimTransCwnd, vars.SndLimTransSender,
+ vars.MaxSsthresh, vars.CurrentRTO, vars.CurrentRwinRcvd);
strlcat(logstr1, logstr2, sizeof(logstr1));
snprintf(
logstr2, sizeof(logstr2),
"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",
+ "CongestionSignals=%"VARtype",PktsOut=%"VARtype",MinRTT=%"
+ VARtype",RcvWinScale=%"VARtype"\n",
link, mismatch, bad_cable, half_duplex, congestion, c2s_linkspeed_data,
c2s_linkspeed_ack, s2c_linkspeed_data, s2c_linkspeed_ack,
- CongestionSignals, PktsOut, MinRTT, RcvWinScale);
+ vars.CongestionSignals, vars.PktsOut, vars.MinRTT, vars.RcvWinScale);
strlcat(logstr1, logstr2, sizeof(logstr1));
syslog(LOG_FACILITY | LOG_INFO, "%s", logstr1);
closelog();
@@ -1407,15 +1430,17 @@
* updated. Otherwise the changes are lost when the client terminates.
*/
if (admin_view == 1) {
- totalcnt = calculate(date, SumRTT, CountRTT, CongestionSignals, PktsOut,
- DupAcksIn, AckPktsIn, CurrentMSS, SndLimTimeRwin,
- SndLimTimeCwnd, SndLimTimeSender, MaxRwinRcvd,
- CurrentCwnd, Sndbuf, DataBytesOut, mismatch, bad_cable,
- (int) c2sspd, (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);
+ totalcnt = calculate(date, vars.SumRTT, vars.CountRTT,
+ vars.CongestionSignals, vars.PktsOut, vars.DupAcksIn,
+ vars.AckPktsIn, vars.CurrentMSS, vars.SndLimTimeRwin,
+ vars.SndLimTimeCwnd, vars.SndLimTimeSender,
+ vars.MaxRwinRcvd, vars.CurrentCwnd, vars.Sndbuf,
+ vars.DataBytesOut, mismatch, bad_cable, (int) c2sspd,
+ (int) s2cspd, c2s_linkspeed_data, s2c_linkspeed_ack,
+ 1);
+ gen_html((int) c2sspd, (int) s2cspd, vars.MinRTT, vars.PktsRetrans,
+ vars.Timeouts, vars.Sndbuf, vars.MaxRwinRcvd, vars.CurrentCwnd,
+ mismatch, bad_cable, totalcnt, refresh);
}
shutdown(ctlsockfd, SHUT_WR);
/* shutdown(ctlsockfd, SHUT_RDWR); */
@@ -1439,7 +1464,7 @@
int i, loopcnt, t_opts = 0;
struct sockaddr_storage cli_addr;
struct sigaction new;
- web100_agent* agent;
+ tcp_stat_agent* agent;
char *lbuf = NULL, *ctime();
char buff[32], tmpstr[256];
char test_suite[16];
@@ -1535,6 +1560,10 @@
setCurrentDirn(currentDirn);
// end protocol logging

+#if USE_WEB10G
+ log_println(0, "WARNING: The Web10G NDT server is still in testing"
+ " and may contain bugs.");
+#endif
// Get server execution options
while ((c =
getopt_long(
@@ -1602,7 +1631,11 @@
admin_view = 1;
break;
case 'f':
+#if USE_WEB100
VarFileName = optarg;
+#elif USE_WEB10G
+ log_println(2, "Web10G doesn't require varfile. Ignored.");
+#endif
break;
case 'i':
device = optarg;
@@ -1804,12 +1837,17 @@
}
listenfd = I2AddrFD(listenaddr);

+ if (listenfd == -1) {
+ log_println(0, "ERROR: Socket already in use.");
+ return 0;
+ }
+
log_println(1, "server ready on port %s (family %d)", port, meta.family);

- // Initialize Web100 structures
- count_vars = web100_init(VarFileName);
+ // Initialize tcp_stat structures
+ count_vars = tcp_stat_init(VarFileName);
if (count_vars == -1) {
- log_println(0, "No web100 variables file found, terminating program");
+ log_println(0, "No Web100 variables file found, terminating program");
exit(-5);
}

@@ -2566,11 +2604,20 @@
"pid=%d", chld_pipe[0], chld_pipe[1], chld_pid);
close(listenfd);
close(chld_pipe[1]);
+#if USE_WEB100
if ((agent = web100_attach(WEB100_AGENT_TYPE_LOCAL,
NULL)) == NULL) {
web100_perror("web100_attach");
return 1;
}
+#elif USE_WEB10G
+ if (estats_nl_client_init(&agent) != NULL) {
+ log_println(0,
+ "Error: estats_client_init failed."
+ "Unable to use web10g.");
+ return 1;
+ }
+#endif

// This is the child process from the above fork(). The parent
// is in control, and will send this child a signal when it gets
@@ -2694,8 +2741,14 @@
child_sig(0);
}
close(ctlsockfd);
+#if USE_WEB100
web100_detach(agent);
- log_free();
+#elif USE_WEB10G
+ estats_nl_client_destroy(&agent);
+#endif
+ // log_free(); // Don't free the log we use it all the time
+ // log_println()
+ // Also makes valgrind angry

if (cputime && workerThreadId) {
cputimeworkerLoop = 0;
=======================================
--- /branches/applet_usability/src/web100srv.h Wed Jul 17 14:57:34 2013 UTC
+++ /branches/applet_usability/src/web100srv.h Tue Oct 15 13:07:11 2013 UTC
@@ -12,40 +12,71 @@

#include "../config.h"

+#if HAVE_LIBWEB100 && HAVE_LIBWEB10G
+
+// Prefer Web10G unless forced to use Web100
+#if defined(FORCE_WEB100)
+#define USE_WEB100 1
+#define USE_WEB10G 0
+#else
+#define USE_WEB100 0
+#define USE_WEB10G 1
+#endif
+
+#elif HAVE_LIBWEB10G
+
+#define USE_WEB100 0
+#define USE_WEB10G 1
+
+#elif HAVE_LIBWEB100
+
+#define USE_WEB100 1
+#define USE_WEB10G 0
+
+#else
+
+#define USE_WEB100 0
+#define USE_WEB10G 0
+
+#endif
+
#define _USE_BSD
-#include <stdio.h>
-#include <netdb.h>
-#include <signal.h>
-#ifdef HAVE_LIBWEB100
-#include <web100.h>
+#include <stdio.h>
+#include <netdb.h>
+#include <signal.h>
+#if USE_WEB100
+#include <web100.h>
+#endif
+#if USE_WEB10G
+#include <estats.h>
#endif
#ifdef HAVE_LIBPCAP
-#include <pcap.h>
+#include <pcap.h>
#endif
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <fcntl.h>
+#include <unistd.h>

-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <sys/errno.h>
-#include <sys/select.h>
-#include <sys/resource.h>
-#include <sys/wait.h>
-#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/errno.h>
+#include <sys/select.h>
+#include <sys/resource.h>
+#include <sys/wait.h>
+#include <sys/time.h>

-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <netinet/ip.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
+#include <netinet/ip.h>
#ifdef HAVE_NETINET_IP6_H
-#include <netinet/ip6.h>
+#include <netinet/ip6.h>
#endif
#ifdef HAVE_NET_ETHERNET_H
-#include <net/ethernet.h>
+#include <net/ethernet.h>
#endif
-#include <arpa/inet.h>
+#include <arpa/inet.h>
#include <I2util/util.h>

/* move version to configure.ac file for package name */
@@ -179,6 +210,55 @@
u_int32_t reserved[4];
};

+/* Store everything as 64-bit ints, keep this signed. Not realistically
+ * expecting any of the unsigned 64bit variables to overflow a signed
+ * 64-bit*/
+typedef int64_t tcp_stat_var;
+/* Use when printing */
+#define VARtype PRId64
+
+struct tcp_vars {
+ tcp_stat_var Timeouts;
+ tcp_stat_var SumRTT;
+ tcp_stat_var CountRTT;
+ tcp_stat_var PktsRetrans;
+ tcp_stat_var FastRetran;
+ tcp_stat_var DataPktsOut;
+ tcp_stat_var AckPktsOut;
+ tcp_stat_var CurrentMSS;
+ tcp_stat_var DupAcksIn;
+ tcp_stat_var AckPktsIn;
+ tcp_stat_var MaxRwinRcvd;
+ tcp_stat_var Sndbuf;
+ tcp_stat_var CurrentCwnd;
+ tcp_stat_var SndLimTimeRwin;
+ tcp_stat_var SndLimTimeCwnd;
+ tcp_stat_var SndLimTimeSender;
+ tcp_stat_var DataBytesOut;
+ tcp_stat_var SndLimTransRwin;
+ tcp_stat_var SndLimTransCwnd;
+ tcp_stat_var SndLimTransSender;
+ tcp_stat_var MaxSsthresh;
+ tcp_stat_var CurrentRTO;
+ tcp_stat_var CurrentRwinRcvd;
+ tcp_stat_var MaxCwnd;
+ tcp_stat_var CongestionSignals;
+ tcp_stat_var PktsOut;
+ tcp_stat_var MinRTT;
+ tcp_stat_var RcvWinScale;
+ tcp_stat_var SndWinScale;
+ tcp_stat_var CongAvoid;
+ tcp_stat_var CongestionOverCount;
+ tcp_stat_var MaxRTT;
+ tcp_stat_var OtherReductions;
+ tcp_stat_var CurTimeoutCount;
+ tcp_stat_var AbruptTimeouts;
+ tcp_stat_var SendStall;
+ tcp_stat_var SlowStart;
+ tcp_stat_var SubsequentTimeouts;
+ tcp_stat_var ThruBytesAcked;
+};
+
/* web100-pcap */
#ifdef HAVE_LIBPCAP
void init_vars(struct spdpair *cur);
@@ -192,35 +272,56 @@
#endif

/* web100-util */
-#ifdef HAVE_LIBWEB100
+
void get_iflist(void);
-int web100_init(char *VarFileName);
-int web100_autotune(int sock, web100_agent* agent, web100_connection* cn);
-void web100_middlebox(int sock, web100_agent* agent, web100_connection* cn,
+
+#if USE_WEB10G
+#define TCP_STAT_NAME "Web10G"
+typedef struct estats_nl_client tcp_stat_agent;
+typedef int tcp_stat_connection;
+typedef struct estats_val_data tcp_stat_snap;
+/* Not relevent to web10g */
+typedef void tcp_stat_group;
+/* Log currently unimplemented in web10g */
+typedef estats_record tcp_stat_log;
+#define tcp_stat_connection_from_socket web10g_connection_from_socket
+
+/* Extra Web10G functions web10g-util.c */
+int web10g_find_val(const tcp_stat_snap* data, const char* name,
+ struct estats_val* value);
+int web10g_get_val(tcp_stat_agent* client, tcp_stat_connection conn,
+ const char* name, struct estats_val* value);
+int web10g_connection_from_socket(tcp_stat_agent* client, int sockfd);
+int web10g_get_remote_addr(tcp_stat_agent* client,
+ tcp_stat_connection conn, char* out, int size);
+
+#elif USE_WEB100
+#define TCP_STAT_NAME "Web100"
+typedef web100_agent tcp_stat_agent;
+typedef web100_connection* tcp_stat_connection;
+typedef web100_snapshot tcp_stat_snap;
+/* Group only relevent to web100 */
+typedef web100_group tcp_stat_group;
+typedef web100_log tcp_stat_log;
+#define tcp_stat_connection_from_socket web100_connection_from_socket
+
+#endif
+
+int tcp_stat_autotune(int sock, tcp_stat_agent* agent, tcp_stat_connection cn);
+int tcp_stat_init(char *VarFileName);
+void tcp_stat_middlebox(int sock, tcp_stat_agent* agent, tcp_stat_connection cn,
char *results, size_t results_strlen);
-int web100_setbuff(int sock, web100_agent* agent, web100_connection* cn,
- int autotune);
-void web100_get_data_recv(int sock, web100_agent* agent, web100_connection* cn,
- int count_vars);
-int web100_get_data(web100_snapshot* snap, int ctlsock, web100_agent* agent,
- int count_vars);
-int CwndDecrease(web100_agent* agent, char* logname,
+int tcp_stat_setbuff(int sock, tcp_stat_agent* agent, tcp_stat_connection cn,
+ int autotune);/* Not used so no web10g version */
+void tcp_stat_get_data_recv(int sock, tcp_stat_agent* agent,
+ tcp_stat_connection cn, int count_vars);
+int tcp_stat_get_data(tcp_stat_snap* snap, int testsock, int ctlsock,
+ tcp_stat_agent* agent, int count_vars);
+
+int CwndDecrease(char* logname,
u_int32_t *dec_cnt, u_int32_t *same_cnt, u_int32_t *inc_cnt);
-int web100_logvars(int *Timeouts, int *SumRTT, int *CountRTT,
- int *PktsRetrans, int *FastRetran, int *DataPktsOut,
- int *AckPktsOut, int *CurrentMSS, int *DupAcksIn,
- int *AckPktsIn, int *MaxRwinRcvd, int *Sndbuf,
- int *CurrentCwnd, int *SndLimTimeRwin, int *SndLimTimeCwnd,
- int *SndLimTimeSender, int *DataBytesOut,
- int *SndLimTransRwin, int *SndLimTransCwnd,
- int *SndLimTransSender, int *MaxSsthresh, int *CurrentRTO,
- int *CurrentRwinRcvd, int *MaxCwnd, int *CongestionSignals,
- int *PktsOut, int *MinRTT, int count_vars, int *RcvWinScale,
- int *SndWinScale, int *CongAvoid, int *CongestionOverCount,
- int *MaxRTT, int *OtherReductions, int *CurTimeoutCount,
- int *AbruptTimeouts, int *SendStall, int *SlowStart,
- int *SubsequentTimeouts, int *ThruBytesAcked);
-#endif
+int tcp_stat_logvars(struct tcp_vars* vars, int count_vars);
+
int KillHung(void);
void writeMeta(int compress, int cputime, int snaplog, int tcpdump);



  • [ndt-dev] [ndt] r845 committed - Merging trunk changes into applet_usability branch, ndt, 10/15/2013

Archive powered by MHonArc 2.6.16.

Top of Page