This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to allow net tests to run under cygwin


Michael Checky wrote:
I've attached a patch file to allow the net tests to compile and run under
cygwin.  I don't have access to GNU/Linux, so I hope I haven't broken
anything.  As far as I can tell, I haven't though.

Yes, it works fine on Linux, and I've committed your patch. Actually my linux also had problems with "bool" too.


But given that, it's only right to rename the tests in fact, so I'll apply the attached patch. Certainly, it would probably have worked on *BSD anyway, so there's no reason for people to think it's linux-specific.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/ChangeLog,v
retrieving revision 1.29
diff -u -5 -p -r1.29 ChangeLog
--- ChangeLog	11 Apr 2003 20:47:19 -0000	1.29
+++ ChangeLog	11 Apr 2003 21:00:15 -0000
@@ -1,5 +1,16 @@
+2003-04-11  Jonathan Larmour  <jifl at eCosCentric dot com>
+
+	* tests/linux_echo.c: Renamed to....
+	* tests/host_echo.c: this new file. Change comment to indicate this.
+
+	* tests/make.linux: Renamed to....
+	* tests/make.host: this new file. Change comment to indicate this.
+	Also linux_echo -> host_echo, and add clean target.
+
+	* doc/tcpip.sgml: Reflect above.
+
 2003-04-11  Michael Checky  <Michael_Checky at Thermoking dot com>
 
 	* tests/nc_test_framework.h: deleted '#include <net/route.h>'.
 	* tests/linux_echo.c: added '#include <netinet/in_systm.h>',
 	deleted '#include <net/route.h>'.
Index: doc/tcpip.sgml
===================================================================
RCS file: /cvs/ecos/ecos-opt/net/net/common/current/doc/tcpip.sgml,v
retrieving revision 1.3
diff -u -5 -p -r1.3 tcpip.sgml
--- doc/tcpip.sgml	4 Jan 2003 18:46:40 -0000	1.3
+++ doc/tcpip.sgml	11 Apr 2003 21:00:16 -0000
@@ -244,30 +244,30 @@ purpose networks unless protected by a s
 <TITLE>Performance Test</TITLE>
 <PROGRAMLISTING><EMPHASIS>tcp_echo</EMPHASIS>      - data forwarding program for performance test</PROGRAMLISTING>
 <PARA><command>tcp_echo</command> is one
 part of the standard performance test we use.  The other parts are
 host programs <LITERAL>tcp_source</LITERAL> and <LITERAL>tcp_sink</LITERAL>.
- To make these (under LINUX) cd to the tests source directory in
-the eCos repository and type &ldquo;<LITERAL>make -f make.linux</LITERAL>&rdquo; -
+ To make these (under your <emphasis>HOST</emphasis> system) cd to the tests source directory in
+the eCos repository and type &ldquo;<LITERAL>make -f make.host</LITERAL>&rdquo; -
 this should build <LITERAL>tcp_source</LITERAL> and <LITERAL>tcp_sink</LITERAL>.</PARA>
-<PARA>The LINUX program &ldquo;<LITERAL>tcp_source</LITERAL>&rdquo; sends
+<PARA>The host program &ldquo;<LITERAL>tcp_source</LITERAL>&rdquo; sends
 data to the target.  On the target, &ldquo;<LITERAL>tcp_echo</LITERAL>&rdquo; sends
 it onwards to &ldquo;<LITERAL>tcp_sink</LITERAL>&rdquo; running
-on LINUX.  So the target must receive and send on all the data that <LITERAL>tcp_source</LITERAL> sends
+on your host.  So the target must receive and send on all the data that <LITERAL>tcp_source</LITERAL> sends
 it; the time taken for this is measured and the data rate is calculated.</PARA>
 <PARA>To invoke the test, first start <LITERAL>tcp_echo</LITERAL> on
 the target board and wait for it to become quiescent - it will report
 work to calibrate a CPU load which can be used to simulate real
 operating conditions for the stack.</PARA>
-<PARA>Then on your LINUX machine, in one terminal window, invoke <LITERAL>tcp_sink</LITERAL> giving
+<PARA>Then on your host machine, in one terminal window, invoke <LITERAL>tcp_sink</LITERAL> giving
 it the IP address (or hostname) of one interface of the target board.
  For example &ldquo;<LITERAL>tcp_sink 10.130.39.66</LITERAL>&rdquo;.
  <LITERAL>tcp_echo</LITERAL> on the target
 will print something like &ldquo;<LITERAL>SINK connection
 from 10.130.39.13:1143</LITERAL>&rdquo; when <LITERAL>tcp_sink</LITERAL> is
 correctly invoked.</PARA>
-<PARA>Next, in another LINUX terminal window, invoke <LITERAL>tcp_source</LITERAL>,
+<PARA>Next, in another host terminal window, invoke <LITERAL>tcp_source</LITERAL>,
 giving it the IP address (or hostname) of an interface of the target
 board, and optionally a background load to apply to the target while
 the test runs.  For example, &ldquo;<LITERAL>tcp_source
 194.130.39.66</LITERAL>&rdquo; to run the test with no
 additional target CPU load, or &ldquo;<LITERAL>tcp_source
@@ -277,19 +277,19 @@ the target will print something like &ld
 connection from 194.130.39.13:1144</LITERAL>&rdquo; when
 tcp_source is correctly invoked.</PARA>
 <PARA>You can connect tcp_sink to one target interface
 and tcp_source to another, or both to the same interface.
  Similarly, you can run <LITERAL>tcp_sink</LITERAL> and <LITERAL>tcp_source</LITERAL> on
-the same LINUX machine or different ones.  TCP/IP and ARP
+the same host machine or different ones.  TCP/IP and ARP
 look after them finding one another, as intended.</PARA>
 <PROGRAMLISTING><EMPHASIS>nc_test_master</EMPHASIS> - network characterization master
 <EMPHASIS>nc_test_slave</EMPHASIS> - network characterization slave</PROGRAMLISTING>
 <PARA>These tests talk to each other to measure network performance.
-They can each run on either a test target or a LINUX host computer
+They can each run on either a test target or a host computer
 given some customization to your local environment. As provided, <literal>nc_test_slave</literal> must
 run on the test target, and <literal>nc_test_master</literal> must
-be run on a LINUX host, and be given the test target's
+be run on a host computer, and be given the test target's
 IP address or hostname.</PARA>
 <PARA>The tests print network performance for various packet sizes
 over UDP and TCP, versus various additional CPU loads on the target.</PARA>
 <PARA>
 The programs <PROGRAMLISTING><EMPHASIS>nc6_test_slave</EMPHASIS>
Index: tests/host_echo.c
===================================================================
RCS file: tests/host_echo.c
diff -N tests/host_echo.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/host_echo.c	11 Apr 2003 21:00:16 -0000
@@ -0,0 +1,281 @@
+//==========================================================================
+//
+//      tests/host_echo.c
+//
+//      Simple TCP throughput test - echo component FOR *HOST*
+//      * CAUTION: host, i.e. non eCos, only *
+//
+//==========================================================================
+//####BSDCOPYRIGHTBEGIN####
+//
+// -------------------------------------------
+//
+// Portions of this software may have been derived from OpenBSD or other sources,
+// and are covered by the appropriate copyright disclaimers included herein.
+//
+// -------------------------------------------
+//
+//####BSDCOPYRIGHTEND####
+//==========================================================================
+//#####DESCRIPTIONBEGIN####
+//
+// Author(s):    gthomas
+// Contributors: gthomas
+// Date:         2000-01-10
+// Purpose:      
+// Description:  This is the middle part of a three part test.  The idea is
+//   to test the throughput of box in a configuration like this:
+//
+//      +------+   port   +----+     port    +----+
+//      |SOURCE|=========>|ECHO|============>|SINK|
+//      +------+   9990   +----+     9991    +----+
+// 
+//
+//####DESCRIPTIONEND####
+//
+//==========================================================================
+
+#undef _KERNEL
+#include <stdlib.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <sys/ioctl.h>
+#include <sys/errno.h>
+#include <sys/time.h>
+
+#include <net/if.h>
+#include <netinet/in_systm.h>
+#include <netinet/in.h>
+#include <netinet/ip.h>
+#include <netinet/ip_icmp.h>
+
+#include <netdb.h>
+
+#define true 1
+#define false 1
+
+#define TNR_ON()
+#define TNR_OFF()
+
+#define diag_printf printf
+
+void
+pexit(char *s)
+{
+    perror(s);
+    exit(1);
+}
+
+
+#define SOURCE_PORT 9990
+#define SINK_PORT   9991
+
+#define MAX_BUF 8192
+static unsigned char data_buf[MAX_BUF];
+
+struct test_params {
+    long nbufs;
+    long bufsize;
+    long load;
+};
+
+struct test_status {
+    long ok;
+};
+
+int max( int a, int b ) { return (a>b)?a:b; }
+int min( int a, int b ) { return (a<b)?a:b; }
+
+
+int
+do_read(int s, void *_buf, int len)
+{
+    int total, slen, rlen;
+    unsigned char *buf = (unsigned char *)_buf;
+    total = 0;
+    rlen = len;
+    while (total < len) {
+        slen = read(s, buf, rlen);
+        if (slen != rlen) {
+            if (slen < 0) {
+                diag_printf("Error after reading %d bytes\n", total);
+                return -1;
+            }
+            rlen -= slen;
+            buf += slen;
+        }
+        total += slen;
+    }
+    return total;
+}
+
+int
+do_write(int s, void *_buf, int len)
+{
+    int total, slen, rlen;
+    unsigned char *buf = (unsigned char *)_buf;
+    total = 0;
+    rlen = len;
+    while (total < len) {
+        slen = write(s, buf, rlen);
+        if (slen != rlen) {
+            if (slen < 0) {
+                diag_printf("Error after writing %d bytes\n", total);
+                return -1;
+            }
+            rlen -= slen;
+            buf += slen;
+        }
+        total += slen;
+    }
+    return total;
+}
+
+static void
+echo_test(void * p)
+{
+    int s_source, s_sink, e_source, e_sink;
+    struct sockaddr_in e_source_addr, e_sink_addr, local;
+    int one = 1;
+    fd_set in_fds;
+    int i, num, len;
+    struct test_params params,nparams;
+    struct test_status status,nstatus;
+
+    s_source = socket(AF_INET, SOCK_STREAM, 0);
+    if (s_source < 0) {
+        pexit("stream socket");
+    }
+    if (setsockopt(s_source, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) {
+        pexit("setsockopt /source/ SO_REUSEADDR");
+    }
+    memset(&local, 0, sizeof(local));
+    local.sin_family = AF_INET;
+//    local.sin_len = sizeof(local);
+    local.sin_port = ntohs(SOURCE_PORT);
+    local.sin_addr.s_addr = INADDR_ANY;
+    if(bind(s_source, (struct sockaddr *) &local, sizeof(local)) < 0) {
+        pexit("bind /source/ error");
+    }
+    listen(s_source, SOMAXCONN);
+
+    s_sink = socket(AF_INET, SOCK_STREAM, 0);
+    if (s_sink < 0) {
+        pexit("stream socket");
+    }
+    memset(&local, 0, sizeof(local));
+    local.sin_family = AF_INET;
+//    local.sin_len = sizeof(local);
+    local.sin_port = ntohs(SINK_PORT);
+    local.sin_addr.s_addr = INADDR_ANY;
+    if(bind(s_sink, (struct sockaddr *) &local, sizeof(local)) < 0) {
+        pexit("bind /sink/ error");
+    }
+    if (setsockopt(s_sink, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) {
+        pexit("setsockopt /sink/ SO_REUSEADDR");
+    }
+    listen(s_sink, SOMAXCONN);
+
+    e_source = 0;  e_sink = 0;
+    while (true) {
+        // Wait for a connection on either of the ports
+        FD_ZERO(&in_fds);
+        FD_SET(s_source, &in_fds);
+        FD_SET(s_sink, &in_fds);
+        num = select(max(s_sink,s_source)+1, &in_fds, 0, 0, 0);
+        if (FD_ISSET(s_source, &in_fds)) {
+            len = sizeof(e_source_addr);
+            if ((e_source = accept(s_source, (struct sockaddr *)&e_source_addr, &len)) < 0) {
+                pexit("accept /source/");
+            }
+            diag_printf("SOURCE connection from %s:%d\n", 
+                        inet_ntoa(e_source_addr.sin_addr), ntohs(e_source_addr.sin_port));
+        }
+        if (FD_ISSET(s_sink, &in_fds)) {
+            len = sizeof(e_sink_addr);
+            if ((e_sink = accept(s_sink, (struct sockaddr *)&e_sink_addr, &len)) < 0) {
+                pexit("accept /sink/");
+            }
+            diag_printf("SINK connection from %s:%d\n", 
+                        inet_ntoa(e_sink_addr.sin_addr), ntohs(e_sink_addr.sin_port));
+        }
+        // Continue with test once a connection is established in both directions
+        if ((e_source != 0) && (e_sink != 0)) {
+            break;
+        }
+    }
+
+    // Wait for "source" to tell us the testing paramters
+    if (do_read(e_source, &nparams, sizeof(nparams)) != sizeof(nparams)) {
+        pexit("Can't read initialization parameters");
+    }
+  
+    params.nbufs = ntohl(nparams.nbufs);
+    params.bufsize = ntohl(nparams.bufsize);
+    params.load = ntohl(nparams.load);
+  
+    diag_printf("Using %d buffers of %d bytes each, %d%% background load\n", 
+                params.nbufs, params.bufsize, params.load);
+
+    // Tell the sink what the parameters are
+    if (do_write(e_sink, &nparams, sizeof(nparams)) != sizeof(nparams)) {
+        pexit("Can't write initialization parameters");
+    }
+
+    status.ok = 1;
+    nstatus.ok = htonl(status.ok);
+  
+    // Tell the "source" to start - we're all connected and ready to go!
+    if (do_write(e_source, &nstatus, sizeof(nstatus)) != sizeof(nstatus)) {
+        pexit("Can't send ACK to 'source' host");
+    }
+
+    TNR_ON();
+
+    // Echo the data from the source to the sink hosts
+    for (i = 0;  i < params.nbufs;  i++) {
+        if ((len = do_read(e_source, data_buf, params.bufsize)) != params.bufsize) {
+            TNR_OFF();
+            diag_printf("Can't read buf #%d: ", i+1);
+            if (len < 0) {
+                perror("I/O error");
+            } else {
+                diag_printf("short read - only %d bytes\n", len);
+            }
+            TNR_ON();
+        }
+        if ((len = do_write(e_sink, data_buf, params.bufsize)) != params.bufsize) {
+            TNR_OFF();
+            diag_printf("Can't write buf #%d: ", i+1);
+            if (len < 0) {
+                perror("I/O error");
+            } else {
+                diag_printf("short write - only %d bytes\n", len);
+            }
+            TNR_ON();
+        }
+    }
+
+    TNR_OFF();
+
+    // Wait for the data to drain and the "sink" to tell us all is OK.
+    if (do_read(e_sink, &status, sizeof(status)) != sizeof(status)) {
+        pexit("Can't receive ACK from 'sink' host");
+    }
+
+}
+
+
+int
+main(int argc, char *argv[])
+{
+    echo_test(argv[1]);
+    return 0;
+}
+
+
+// EOF
+
Index: tests/linux_echo.c
===================================================================
RCS file: tests/linux_echo.c
diff -N tests/linux_echo.c
--- tests/linux_echo.c	11 Apr 2003 20:47:20 -0000	1.2
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,281 +0,0 @@
-//==========================================================================
-//
-//      tests/linux_echo.c
-//
-//      Simple TCP throughput test - echo component FOR LINUX HOST
-//      * CAUTION: host, i.e. non eCos, only *
-//
-//==========================================================================
-//####BSDCOPYRIGHTBEGIN####
-//
-// -------------------------------------------
-//
-// Portions of this software may have been derived from OpenBSD or other sources,
-// and are covered by the appropriate copyright disclaimers included herein.
-//
-// -------------------------------------------
-//
-//####BSDCOPYRIGHTEND####
-//==========================================================================
-//#####DESCRIPTIONBEGIN####
-//
-// Author(s):    gthomas
-// Contributors: gthomas
-// Date:         2000-01-10
-// Purpose:      
-// Description:  This is the middle part of a three part test.  The idea is
-//   to test the throughput of box in a configuration like this:
-//
-//      +------+   port   +----+     port    +----+
-//      |SOURCE|=========>|ECHO|============>|SINK|
-//      +------+   9990   +----+     9991    +----+
-// 
-//
-//####DESCRIPTIONEND####
-//
-//==========================================================================
-
-#undef _KERNEL
-#include <stdlib.h>
-#include <unistd.h>
-#include <stdio.h>
-
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/errno.h>
-#include <sys/time.h>
-
-#include <net/if.h>
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-
-#include <netdb.h>
-
-#define true 1
-#define false 1
-
-#define TNR_ON()
-#define TNR_OFF()
-
-#define diag_printf printf
-
-void
-pexit(char *s)
-{
-    perror(s);
-    exit(1);
-}
-
-
-#define SOURCE_PORT 9990
-#define SINK_PORT   9991
-
-#define MAX_BUF 8192
-static unsigned char data_buf[MAX_BUF];
-
-struct test_params {
-    long nbufs;
-    long bufsize;
-    long load;
-};
-
-struct test_status {
-    long ok;
-};
-
-int max( int a, int b ) { return (a>b)?a:b; }
-int min( int a, int b ) { return (a<b)?a:b; }
-
-
-int
-do_read(int s, void *_buf, int len)
-{
-    int total, slen, rlen;
-    unsigned char *buf = (unsigned char *)_buf;
-    total = 0;
-    rlen = len;
-    while (total < len) {
-        slen = read(s, buf, rlen);
-        if (slen != rlen) {
-            if (slen < 0) {
-                diag_printf("Error after reading %d bytes\n", total);
-                return -1;
-            }
-            rlen -= slen;
-            buf += slen;
-        }
-        total += slen;
-    }
-    return total;
-}
-
-int
-do_write(int s, void *_buf, int len)
-{
-    int total, slen, rlen;
-    unsigned char *buf = (unsigned char *)_buf;
-    total = 0;
-    rlen = len;
-    while (total < len) {
-        slen = write(s, buf, rlen);
-        if (slen != rlen) {
-            if (slen < 0) {
-                diag_printf("Error after writing %d bytes\n", total);
-                return -1;
-            }
-            rlen -= slen;
-            buf += slen;
-        }
-        total += slen;
-    }
-    return total;
-}
-
-static void
-echo_test(void * p)
-{
-    int s_source, s_sink, e_source, e_sink;
-    struct sockaddr_in e_source_addr, e_sink_addr, local;
-    int one = 1;
-    fd_set in_fds;
-    int i, num, len;
-    struct test_params params,nparams;
-    struct test_status status,nstatus;
-
-    s_source = socket(AF_INET, SOCK_STREAM, 0);
-    if (s_source < 0) {
-        pexit("stream socket");
-    }
-    if (setsockopt(s_source, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) {
-        pexit("setsockopt /source/ SO_REUSEADDR");
-    }
-    memset(&local, 0, sizeof(local));
-    local.sin_family = AF_INET;
-//    local.sin_len = sizeof(local);
-    local.sin_port = ntohs(SOURCE_PORT);
-    local.sin_addr.s_addr = INADDR_ANY;
-    if(bind(s_source, (struct sockaddr *) &local, sizeof(local)) < 0) {
-        pexit("bind /source/ error");
-    }
-    listen(s_source, SOMAXCONN);
-
-    s_sink = socket(AF_INET, SOCK_STREAM, 0);
-    if (s_sink < 0) {
-        pexit("stream socket");
-    }
-    memset(&local, 0, sizeof(local));
-    local.sin_family = AF_INET;
-//    local.sin_len = sizeof(local);
-    local.sin_port = ntohs(SINK_PORT);
-    local.sin_addr.s_addr = INADDR_ANY;
-    if(bind(s_sink, (struct sockaddr *) &local, sizeof(local)) < 0) {
-        pexit("bind /sink/ error");
-    }
-    if (setsockopt(s_sink, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one))) {
-        pexit("setsockopt /sink/ SO_REUSEADDR");
-    }
-    listen(s_sink, SOMAXCONN);
-
-    e_source = 0;  e_sink = 0;
-    while (true) {
-        // Wait for a connection on either of the ports
-        FD_ZERO(&in_fds);
-        FD_SET(s_source, &in_fds);
-        FD_SET(s_sink, &in_fds);
-        num = select(max(s_sink,s_source)+1, &in_fds, 0, 0, 0);
-        if (FD_ISSET(s_source, &in_fds)) {
-            len = sizeof(e_source_addr);
-            if ((e_source = accept(s_source, (struct sockaddr *)&e_source_addr, &len)) < 0) {
-                pexit("accept /source/");
-            }
-            diag_printf("SOURCE connection from %s:%d\n", 
-                        inet_ntoa(e_source_addr.sin_addr), ntohs(e_source_addr.sin_port));
-        }
-        if (FD_ISSET(s_sink, &in_fds)) {
-            len = sizeof(e_sink_addr);
-            if ((e_sink = accept(s_sink, (struct sockaddr *)&e_sink_addr, &len)) < 0) {
-                pexit("accept /sink/");
-            }
-            diag_printf("SINK connection from %s:%d\n", 
-                        inet_ntoa(e_sink_addr.sin_addr), ntohs(e_sink_addr.sin_port));
-        }
-        // Continue with test once a connection is established in both directions
-        if ((e_source != 0) && (e_sink != 0)) {
-            break;
-        }
-    }
-
-    // Wait for "source" to tell us the testing paramters
-    if (do_read(e_source, &nparams, sizeof(nparams)) != sizeof(nparams)) {
-        pexit("Can't read initialization parameters");
-    }
-  
-    params.nbufs = ntohl(nparams.nbufs);
-    params.bufsize = ntohl(nparams.bufsize);
-    params.load = ntohl(nparams.load);
-  
-    diag_printf("Using %d buffers of %d bytes each, %d%% background load\n", 
-                params.nbufs, params.bufsize, params.load);
-
-    // Tell the sink what the parameters are
-    if (do_write(e_sink, &nparams, sizeof(nparams)) != sizeof(nparams)) {
-        pexit("Can't write initialization parameters");
-    }
-
-    status.ok = 1;
-    nstatus.ok = htonl(status.ok);
-  
-    // Tell the "source" to start - we're all connected and ready to go!
-    if (do_write(e_source, &nstatus, sizeof(nstatus)) != sizeof(nstatus)) {
-        pexit("Can't send ACK to 'source' host");
-    }
-
-    TNR_ON();
-
-    // Echo the data from the source to the sink hosts
-    for (i = 0;  i < params.nbufs;  i++) {
-        if ((len = do_read(e_source, data_buf, params.bufsize)) != params.bufsize) {
-            TNR_OFF();
-            diag_printf("Can't read buf #%d: ", i+1);
-            if (len < 0) {
-                perror("I/O error");
-            } else {
-                diag_printf("short read - only %d bytes\n", len);
-            }
-            TNR_ON();
-        }
-        if ((len = do_write(e_sink, data_buf, params.bufsize)) != params.bufsize) {
-            TNR_OFF();
-            diag_printf("Can't write buf #%d: ", i+1);
-            if (len < 0) {
-                perror("I/O error");
-            } else {
-                diag_printf("short write - only %d bytes\n", len);
-            }
-            TNR_ON();
-        }
-    }
-
-    TNR_OFF();
-
-    // Wait for the data to drain and the "sink" to tell us all is OK.
-    if (do_read(e_sink, &status, sizeof(status)) != sizeof(status)) {
-        pexit("Can't receive ACK from 'sink' host");
-    }
-
-}
-
-
-int
-main(int argc, char *argv[])
-{
-    echo_test(argv[1]);
-    return 0;
-}
-
-
-// EOF
-
Index: tests/make.host
===================================================================
RCS file: tests/make.host
diff -N tests/make.host
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ tests/make.host	11 Apr 2003 21:00:16 -0000
@@ -0,0 +1,30 @@
+#
+# Simple *HOST SIDE* makefile for network tests
+#
+
+CC = cc
+CFLAGS = -O2 -g
+
+ALL = nc_test_master nc_test_slave tcp_source tcp_sink host_echo
+ALL += nc6_test_master nc6_test_slave
+
+all: ${ALL}
+
+clean:
+	rm -f $(ALL)
+
+nc_test_master: nc_test_framework.h nc_test_master.c
+	$(CC) -o $@ ${CFLAGS} nc_test_master.c
+
+nc_test_slave: nc_test_framework.h nc_test_slave.c
+	$(CC) -o $@ ${CFLAGS} nc_test_slave.c
+
+tcp_source: tcp_source.c
+	$(CC) -o $@ ${CFLAGS} tcp_source.c
+
+tcp_sink: tcp_sink.c
+	$(CC) -o $@ ${CFLAGS} tcp_sink.c
+
+host_echo: host_echo.c
+	$(CC) -o $@ ${CFLAGS} host_echo.c
+
Index: tests/make.linux
===================================================================
RCS file: tests/make.linux
diff -N tests/make.linux
--- tests/make.linux	20 May 2002 22:25:05 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,27 +0,0 @@
-#
-# Simple Linux makefile for network tests (host side)
-#
-
-CC = cc
-CFLAGS = -O2 -g
-
-ALL = nc_test_master nc_test_slave tcp_source tcp_sink linux_echo
-ALL += nc6_test_master nc6_test_slave
-
-all: ${ALL}
-
-nc_test_master: nc_test_framework.h nc_test_master.c
-	$(CC) -o $@ ${CFLAGS} nc_test_master.c
-
-nc_test_slave: nc_test_framework.h nc_test_slave.c
-	$(CC) -o $@ ${CFLAGS} nc_test_slave.c
-
-tcp_source: tcp_source.c
-	$(CC) -o $@ ${CFLAGS} tcp_source.c
-
-tcp_sink: tcp_sink.c
-	$(CC) -o $@ ${CFLAGS} tcp_sink.c
-
-linux_echo: linux_echo.c
-	$(CC) -o $@ ${CFLAGS} linux_echo.c
-

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]