Skip to Content.
Sympa Menu

ndt-users - NDT 3.3.12: Trying to compile web100clt on Solaris 10

Subject: ndt-users list created

List archive

NDT 3.3.12: Trying to compile web100clt on Solaris 10


Chronological Thread 
  • From: Simon Leinen <>
  • To: Richard Carlson <>
  • Cc: , jeremian <>
  • Subject: NDT 3.3.12: Trying to compile web100clt on Solaris 10
  • Date: Thu, 24 Aug 2006 17:35:42 +0200

As I said in my last message, it has become more difficult to build a
web100clt on non-Linux systems. This is a pity because the
command-line client can come in handy on non-Linux systems.

The main problem is that some source file components of web100clt now
include "web100srv.h" indirectly through "testoptions.h". Web100srv.h
is probably hopeless on non-Linux systems, so I commented out the
#include "web100srv.h" in "testoptions.h". This means that some of
the prototypes in that file had to be removed as well, and that I had
to duplicate the #define's for VIEW_DIFF and BUFFSIZE in the client
components. BUFFSIZE might fit better in "network.h" (if you like
fixed-size message limits at all, they can be shared between the
client and server sides of the protocol). I don't know about
VIEW_DIFF - that doesn't seem to be used in the server code anyway, so
maybe it shouldn't be in "web100srv.h" either.

The other diffs are for

* missing #includes, notably <signal.h>
* looking for socket() in -lsocket, getaddrinfo() in -lnsl
* index()->strchr() (well, since you #include <string.h>...)

The remaining problem is that I don't know how to emulate
ioctl(SIOCOUTQ) on Solaris (or other systems that don't have that
ioctl). If anyone has an idea... for now I just have the function
return zero for the file descriptor's outbound queue size.

Regards,
--
Simon.

--- I2util/configure.ac 2006/08/24 14:23:37 1.1
+++ I2util/configure.ac 2006/08/24 14:29:18
@@ -71,7 +71,9 @@
# Checks for library functions.
AC_FUNC_MALLOC
AC_FUNC_STRFTIME
-AC_CHECK_FUNCS([memset strdup strerror strtol strtoul socket getaddrinfo])
+AC_SEARCH_LIBS(getaddrinfo,nsl)
+AC_SEARCH_LIBS(socket,socket)
+AC_CHECK_FUNCS([memset strdup strerror strtol strtoul getaddrinfo socket])

AC_SUBST(ac_aux_dir)
AC_OUTPUT([Makefile I2util/Makefile aespasswd/Makefile doc/Makefile],
--- src/web100clt.c 2006/08/24 14:40:51 1.1
+++ src/web100clt.c 2006/08/24 14:44:16
@@ -17,6 +17,10 @@
#include "test_sfw.h"
#include "clt_tests.h"

+#ifndef VIEW_DIFF
+#define VIEW_DIFF 0.1
+#endif
+
extern int h_errno;

int Randomize, failed, cancopy;
@@ -133,7 +137,7 @@
if (sysvar == NULL)
break;
sysval = strtok(NULL, "\n");
- if (index(sysval, '.') == NULL) {
+ if (strchr(sysval, '.') == NULL) {
i = atoi(sysval);
save_int_values(sysvar, i);
log_println(7, "Stored %d [%s] in %s", i, sysval, sysvar);
--- src/testoptions.h 2006/08/24 14:41:48 1.1
+++ src/testoptions.h 2006/08/24 14:42:26
@@ -9,7 +9,7 @@
#ifndef _JS_TESTOPTIONS_H
#define _JS_TESTOPTIONS_H

-#include "web100srv.h"
+/* #include "web100srv.h" */

#define TEST_NONE 0
#define TEST_MID (1L << 0)
@@ -39,13 +39,6 @@
} TestOptions;

int initialize_tests(int ctlsockfd, TestOptions* options, int conn_options);
-int test_mid(int ctlsockfd, web100_agent* agent, TestOptions* options, int
conn_options, double* s2c2spd);
-int test_c2s(int ctlsockfd, web100_agent* agent, TestOptions* options, int
conn_options, double* c2sspd,
- int set_buff, int window, int autotune, char* device, int limit,
- int record_reverse, int count_vars, char spds[4][256], int* spd_index);
-int test_s2c(int ctlsockfd, web100_agent* agent, TestOptions* options, int
conn_options, double* s2cspd,
- int set_buff, int window, int autotune, char* device, int limit, int
experimental,
- char* logname, char spds[4][256], int* spd_index, int count_vars);
int getCurrentTest();
void setCurrentTest(int testId);

--- src/test_sfw_clt.c 2006/08/24 14:45:41 1.1
+++ src/test_sfw_clt.c 2006/08/24 14:46:32
@@ -8,6 +8,7 @@

#include <assert.h>
#include <pthread.h>
+#include <signal.h>

#include "test_sfw.h"
#include "logging.h"
@@ -15,6 +16,10 @@
#include "network.h"
#include "utils.h"

+#ifndef BUFFSIZE
+# define BUFFSIZE 8192
+#endif
+
static int c2s_result = SFW_NOTTESTED;
static int s2c_result = SFW_NOTTESTED;
static int testTime;
--- src/test_mid_clt.c 2006/08/24 14:46:51 1.1
+++ src/test_mid_clt.c 2006/08/24 14:46:54
@@ -12,6 +12,10 @@
#include "protocol.h"
#include "utils.h"

+#ifndef BUFFSIZE
+# define BUFFSIZE 8192
+#endif
+
int
test_mid_clt(int ctlSocket, char tests, char* host, int conn_options, int
buf_size, char* tmpstr2)
{
--- src/test_c2s_clt.c 2006/08/24 14:47:26 1.1
+++ src/test_c2s_clt.c 2006/08/24 14:48:05
@@ -7,6 +7,7 @@
*/

#include <ctype.h>
+#include <signal.h>

#include "clt_tests.h"
#include "logging.h"
@@ -14,6 +15,10 @@
#include "protocol.h"
#include "utils.h"

+#ifndef BUFFSIZE
+# define BUFFSIZE 8192
+#endif
+
int pkts, lth;
int sndqueue;
double spdout, c2sspd;
--- src/test_s2c_clt.c 2006/08/24 14:47:35 1.1
+++ src/test_s2c_clt.c 2006/08/24 14:47:37
@@ -12,6 +12,10 @@
#include "protocol.h"
#include "utils.h"

+#ifndef BUFFSIZE
+# define BUFFSIZE 8192
+#endif
+
int ssndqueue, sbytes;
double spdin, s2cspd;

--- src/utils.c 2006/08/24 14:48:29 1.1
+++ src/utils.c 2006/08/24 14:53:42
@@ -148,10 +148,14 @@
int
sndq_len(int fd)
{
+#ifdef SIOCOUTQ
int length = -1;

if (ioctl(fd, SIOCOUTQ, &length)) {
return -1;
}
return length;
+#else
+ return 0;
+#endif
}



Archive powered by MHonArc 2.6.16.

Top of Page