/* 
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/ 

TEST NAME 

      cl3se3_6 - TCP test on IPv6

SYNOPSIS 

      sh se3_6 <-c connections> <-p port> SERVERNAME
      sh cl3_6 <-c connections> <-p port> SERVERNAME

DESCRIPTION 

      This is a TCP IPv6 test that transmits a complex pattern from a client to a
      server. The server receives and verifies the data.

OPERANDS 

      -c connections
                   This specifies the number of connections to make or accept.
		   The values may be different on client and server if, for
		   example you wanted 20 instances on one server, and 10
		   instances on each of two clients.

		   Defaults to 1.

      -p port      The TCP port to use in connections.

		   Defaults to 4004.

      SERVERNAME   Either a local host name or the IPv6 address of a machine. On
                   the client side, SERVERNAME is the host to which to connect,
                   and on the server side, SERVERNAME is the address to which
                   to listen. If a host name is specified, it must appear in
                   /etc/inet/ipnodes along with the remote machine's IPv6 address.


USAGE VARIABLES 

      RUNTIME   This environment variable specifies, in seconds, the duration 
                of the test. This variable is required only on the client side.

SETUP 

      You need two machines connected by a network, either back-to-back, or
      through a hub or switch.

OUTPUT 

      The server initially produces a single line indicating the IP address and
      port to which it is bound and listening. As each incoming connection is
      received, it shows the IP the incoming connection was from.

      After the expected number of incoming connections have been received, it
      indicates it is waiting for the child processes (one per connection) to
      complete.

      Similarly, the client indicates which server it will attempt to connect
      to, and will indicate each process as it starts.

      Finally, each child process completes and indicates the number of blocks
      (each of size 65Kb) and the exit status is reported (normally zero).

DURATION 

      24 hours

POSSIBLE CONCURRENT TESTS 

      This test can run concurrently with lsalr_6, mpflip, rcp_6, and ftpstress_6.

CAVEATS 

      * The 'cl3_6' test should be run on the client side. The 'se3_6' represents
        the server version.

      * When running the test, the server side should be executed first, before
        the client; otherwise, the test fails.

EXAMPLES 

      On the server side: 

      # ./se3_6  quanyu 
      Server quanyu port 4004 is bound
      Waiting for child processes...
      EOF 59 secs, 63992 blocks
      Process 15459 terminated, status 0
      EOF 30 secs, 77 blocks
      Process 4688 terminated, status 0
      !PASS: No failures detected on IPv6
      #


      On the client side: 

      # env RUNTIME-60 ./cl3_6 quanyu     
      Client 0 connected - starting to transmit
      Waiting for child processes...
      client 0: No errors after 60 seconds - sent 63992 blocks
      Process 1798 terminated, status 0
      !PASS: No failures detected on IPv6
      # 


REFERENCES 

      read(2), write(2), hosts(4), tcp(7P)
