Interactive tests – Comtrol eCos User Manual

Page 501

Advertising
background image

Chapter 36. Tests and Demonstrations

Next, in another LINUX terminal window, invoke

tcp_source

, 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, “

tcp_source 194.130.39.66

” to run the test with no additional target CPU load, or “

tcp_source

194.130.39.66 85

” to load it up to 85% used. The target load must be a multiple of 5.

tcp_echo

on the target will

print something like “

SOURCE connection from 194.130.39.13:1144

” when tcp_source is correctly invoked.

You can connect tcp_sink to one target interface and tcp_source to another, or both to the same interface. Similarly,
you can run

tcp_sink

and

tcp_source

on the same LINUX machine or different ones. TCP/IP and ARP look

after them finding one another, as intended.

nc_test_master - network characterization master

nc_test_slave - network characterization slave

These tests talk to each other to measure network performance. They can each run on either a test target or a
LINUX host computer given some customization to your local environment. As provided,

nc_test_slave

must

run on the test target, and

nc_test_master

must be run on a LINUX host, and be given the test target’s IP address

or hostname.

The tests print network performance for various packet sizes over UDP and TCP, versus various additional CPU
loads on the target.

The programs

nc6_test_slave

nc6_test_master

are additional forms which support both IPv4 and IPv6 addressing.

Interactive Tests

server_test - a very simple server example

This test simply awaits a connection on port 7734 and after accepting a connection, gets a packet (with a timeout
of a few seconds) and prints it.

The connection is then closed. We then loop to await the next connection, and so on. To use it, telnet to the target
on port 7734 then type something (quickly!)

% telnet 172.16.19.171 7734

Hello target board

and the test program will print something like:

connection from 172.16.19.13:3369

buf = "Hello target board"

ga_server_test - another very simple server example

This is a variation on the ga_server_test test with the difference being that it uses the

getaddrinfo

function to set

up its addresses. On a system with IPv6 enabled, it will listen on port 7734 for a TCP connection via either IPv4
or IPv6.

tftp_client_test - performs a tftp get and put from/to “server”

397

Advertising