Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1000 committed - Minor cleanups

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1000 committed - Minor cleanups


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1000 committed - Minor cleanups
  • Date: Mon, 10 Mar 2014 13:51:35 +0000

Revision: 1000
Author:

Date: Mon Mar 10 13:48:28 2014 UTC
Log: Minor cleanups


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

Modified:
/branches/aaron-tcp_stats_cleanup/src/web100-util.c
/branches/aaron-tcp_stats_cleanup/src/web100srv.c
/branches/aaron-tcp_stats_cleanup/src/web100srv.h

=======================================
--- /branches/aaron-tcp_stats_cleanup/src/web100-util.c Mon Mar 10 13:48:11 2014 UTC
+++ /branches/aaron-tcp_stats_cleanup/src/web100-util.c Mon Mar 10 13:48:28 2014 UTC
@@ -24,6 +24,12 @@
#include <estats.h>
#endif

+static struct web100_variables {
+ int defined;
+ char name[256]; // key
+ char value[256]; // value
+} web_vars[WEB100_VARS];
+
struct tcp_name {
char* web100_name;
char* web10g_name;
@@ -749,13 +755,15 @@
* 23 cannot read the value of the X_SBufMode or X_RBufMode web100_variable.
*/

-int tcp_stat_autotune(int sock, tcp_stat_agent* agent, tcp_stat_connection cn) {
+int tcp_stats_autotune_enabled(tcp_stat_agent *agent, int sock) {
#if USE_WEB100
web100_var* var;
char buf[32];
web100_group* group;
+ web100_connection *cn;
int i, j = 0;

+ cn = tcp_stats_connection_from_socket(agent, sock);
if (cn == NULL)
return (10);

=======================================
--- /branches/aaron-tcp_stats_cleanup/src/web100srv.c Mon Mar 10 13:48:11 2014 UTC
+++ /branches/aaron-tcp_stats_cleanup/src/web100srv.c Mon Mar 10 13:48:28 2014 UTC
@@ -881,7 +881,6 @@

int run_test(tcp_stat_agent* agent, int ctlsockfd, TestOptions* testopt,
char *test_suite) {
- tcp_stat_connection conn = NULL;
char date[32]; // date indicator
char spds[4][256]; // speed "bin" array containing counters for speeds
char logstr1[4096], logstr2[1024]; // log
@@ -960,8 +959,7 @@
spd_index = 0;

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

// client needs to be version compatible. Send current version
snprintf(buff, sizeof(buff), "v%s", VERSION "-" TCP_STAT_NAME);
=======================================
--- /branches/aaron-tcp_stats_cleanup/src/web100srv.h Mon Mar 10 13:48:11 2014 UTC
+++ /branches/aaron-tcp_stats_cleanup/src/web100srv.h Mon Mar 10 13:48:28 2014 UTC
@@ -170,12 +170,6 @@
u_int32_t totalcount; // total number of valid speed data bins
};

-struct web100_variables {
- int defined;
- char name[256]; // key
- char value[256]; // value
-} web_vars[WEB100_VARS];
-
struct pseudo_hdr { /* used to compute TCP checksum */
uint64_t s_addr; // source addr
uint64_t d_addr; // destination address
@@ -324,11 +318,11 @@
tcp_stat_log *tcp_stats_open_log(char *filename, tcp_stat_connection conn, tcp_stat_group *group);
void tcp_stats_close_log(tcp_stat_log *log);

+int tcp_stats_autotune_enabled(tcp_stat_agent *agent, int sock);
void tcp_stats_set_cwnd_limit(tcp_stat_agent *agent, tcp_stat_connection conn, tcp_stat_group* group, uint32_t limit);

int tcp_stats_read_var(tcp_stat_agent *agent, tcp_stat_connection conn, const char *var_name, char *buf, int bufsize);

-int tcp_stat_autotune(int sock, tcp_stat_agent* agent, tcp_stat_connection cn);
void tcp_stat_middlebox(int sock, tcp_stat_agent* agent, tcp_stat_connection cn,
char *results, size_t results_strlen);
void tcp_stat_get_data_recv(int sock, tcp_stat_agent* agent,


  • [ndt-dev] [ndt] r1000 committed - Minor cleanups, ndt, 03/10/2014

Archive powered by MHonArc 2.6.16.

Top of Page