home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / netper21.zip / netsh.c < prev    next >
Text File  |  1997-03-20  |  20KB  |  647 lines

  1. char    netsh_id[]="\
  2. @(#)netsh.c (c) Copyright 1993, 1994 Hewlett-Packard Company. Version 2.1";
  3.  
  4.  
  5. /****************************************************************/
  6. /*                                */
  7. /*    Global include files                    */
  8. /*                                */
  9. /****************************************************************/
  10.  
  11. #include <sys/types.h>
  12. #ifndef WIN32
  13. #include <unistd.h>
  14. #include <sys/ipc.h>
  15. #endif /* WIN32 */
  16. #include <fcntl.h>
  17. #include <errno.h>
  18. #include <signal.h>
  19. #include <stdio.h>
  20. #include <stdlib.h>
  21. #include <ctype.h>
  22.  /* the following four includes should not be needed ?*/
  23. #ifdef notdef
  24. #include <sys/time.h>
  25. #include <sys/socket.h>
  26. #include <netinet/in.h>
  27. #include <netdb.h>
  28. #endif /* notdef */
  29.  
  30. #ifndef STRINGS
  31. #include <string.h>
  32. #else /* STRINGS */
  33. #include <strings.h>
  34. #endif /* STRINGS */
  35.  
  36. #ifdef WIN32
  37. extern    int    getopt(int , char **, char *) ;
  38. #else
  39. double atof();
  40. #endif /* WIN32 */
  41.  
  42. /**********************************************************************/
  43. /*                                                                    */
  44. /*          Local Include Files                                       */
  45. /*                                                                    */
  46. /**********************************************************************/
  47.  
  48. #define  NETSH
  49. #include "netsh.h"
  50. #include "netlib.h"
  51. #include "nettest_bsd.h"
  52. #ifdef DO_UNIX
  53. #include "nettest_unix.h"
  54. #endif /* DO_UNIX */
  55. #ifdef DO_IPV6
  56. #include "nettest_ipv6.h"
  57. #endif /* DO_IPV6 */
  58. /************************************************************************/
  59. /*                                    */
  60. /*    Global constants  and macros                    */
  61. /*                                    */
  62. /************************************************************************/
  63.  
  64.  /* This define is only needed for HP-UX 7.x and earlier... */
  65. #ifdef HP
  66. #define bcopy(s,d,h) memcpy((d),(s),(h))
  67. #define bzero(p,h) memset((p),0,(h))
  68. #endif /* HP */
  69.  
  70.  /* Some of the args take optional parameters. Since we are using */
  71.  /* getopt to parse the command line, we will tell getopt that they do */
  72.  /* not take parms, and then look for them ourselves */
  73. #define GLOBAL_CMD_LINE_ARGS "A:a:b:CcdDf:F:H:hi:I:l:n:O:o:P:p:t:v:W:w:"
  74.  
  75. /************************************************************************/
  76. /*                                    */
  77. /*    Extern variables                         */
  78. /*                                    */
  79. /************************************************************************/
  80.  
  81. /*
  82. extern int errno;
  83. extern char *sys_errlist[ ];
  84. extern int sys_nerr;
  85. */
  86.  
  87. /************************************************************************/
  88. /*                                    */
  89. /*    Global variables                         */
  90. /*                                    */
  91. /************************************************************************/
  92.  
  93. /* some names and such                                                  */
  94. char    *program;        /* program invocation name        */
  95. char    username[BUFSIZ];    /* login name of user            */
  96. char    cmd_file[BUFSIZ];    /* name of the commands file        */
  97.  
  98. /* stuff to say where this test is going                                */
  99. char    host_name[HOSTNAMESIZE];    /* remote host name or ip addr  */
  100. char    test_name[64];            /* which test to run         */
  101. short    test_port;            /* where is the test waiting    */
  102.  
  103. /* the source of data for filling the buffers */
  104. char    fill_file[BUFSIZ];
  105.  
  106. /* output controlling variables                                         */
  107. int
  108.   debug,            /* debugging level */
  109.   print_headers,        /* do/don't display headers */
  110.   verbosity;        /* verbosity level */
  111.  
  112. /* cpu variables */
  113. int
  114.   local_cpu_usage,    /* you guessed it            */
  115.   remote_cpu_usage;    /* still right !            */
  116.  
  117. float                   
  118.   local_cpu_rate,
  119.   remote_cpu_rate;
  120.  
  121. int
  122.   shell_num_cpus=1;
  123.  
  124. /* the end-test conditions for the tests - either transactions, bytes,  */
  125. /* or time. different vars used for clarity - space is cheap ;-)        */
  126. int    
  127.   test_time,        /* test ends by time            */
  128.   test_len_ticks,       /* how many times will the timer go off before */
  129.             /* the test is over? */
  130.   test_bytes,        /* test ends on byte count        */
  131.   test_trans;        /* test ends on tran count        */
  132.  
  133. /* the alignment conditions for the tests                */
  134. int
  135.   local_recv_align,    /* alignment for local receives        */
  136.   local_send_align,    /* alignment for local sends        */
  137.   local_send_offset = 0,
  138.   local_recv_offset = 0,
  139.   remote_recv_align,    /* alignment for remote receives    */
  140.   remote_send_align,    /* alignment for remote sends        */
  141.   remote_send_offset = 0,
  142.   remote_recv_offset = 0;
  143.  
  144. #ifdef INTERVALS
  145. int
  146.   interval_usecs,
  147.   interval_wate,
  148.   interval_burst;
  149.  
  150. int demo_mode;
  151. double units_this_tick;
  152. #endif /* INTERVALS */
  153.  
  154. #ifdef DIRTY
  155. int    loc_dirty_count;
  156. int    loc_clean_count;
  157. int    rem_dirty_count;
  158. int    rem_clean_count;
  159. #endif /* DIRTY */
  160.  
  161.  /* some of the vairables for confidence intervals... */
  162.  
  163. int  confidence_level;
  164. int  iteration_min;
  165. int  iteration_max;
  166.  
  167. double interval;
  168.  
  169.  /* stuff to control the "width" of the buffer rings for sending and */
  170.  /* receiving data */
  171. int    send_width;
  172. int     recv_width;
  173.  
  174. char netserver_usage[] = "\n\
  175. Usage: netserver [options] \n\
  176. \n\
  177. Options:\n\
  178.     -h                Display this text\n\
  179.     -p portnum        Listen for connect requests on portnum.\n\
  180. \n";
  181.  
  182. char netperf_usage[] = "\n\
  183. Usage: netperf [global options] -- [test options] \n\
  184. \n\
  185. Global options:\n\
  186.     -a send,recv      Set the local send,recv buffer alignment\n\
  187.     -A send,recv      Set the remote send,recv buffer alignment\n\
  188.     -c [cpu_rate]     Report local CPU usage\n\
  189.     -C [cpu_rate]     Report remote CPU usage\n\
  190.     -d                Increase debugging output\n\
  191.     -f G|M|K|g|m|k    Set the output units\n\
  192.     -F fill_file      Pre-fill buffers with data from fill_file\n\
  193.     -h                Display this text\n\
  194.     -H name|ip        Specify the target machine\n\
  195.     -i max,min        Specify the max and min number of iterations (15,1)\n\
  196.     -I lvl[,intvl]    Specify confidence level (95 or 99) (99) \n\
  197.                       and confidence interval in percentage (10)\n\
  198.     -l testlen        Specify test duration (>0 secs) (<0 bytes|trans)\n\
  199.     -o send,recv      Set the local send,recv buffer offsets\n\
  200.     -O send,recv      Set the remote send,recv buffer offset\n\
  201.     -n numcpu         Set the number of processors for CPU util\n\
  202.     -p port           Specify netserver port number\n\
  203.     -P 0|1            Don't/Do display test headers\n\
  204.     -t testname       Specify test to perform\n\
  205.     -v verbosity      Specify the verbosity level\n\
  206.     -W send,recv      Set the number of send,recv buffers\n\
  207. \n\
  208. For those options taking two parms, at least one must be specified;\n\
  209. specifying one value without a comma will set both parms to that\n\
  210. value, specifying a value with a leading comma will set just the second\n\
  211. parm, a value with a trailing comma will set just the first. To set\n\
  212. each parm to unique values, specify both and separate them with a\n\
  213. comma.\n"; 
  214.  
  215.  
  216. /* This routine will return the two arguments to the calling routine. */
  217. /* If the second argument is not specified, and there is no comma, */
  218. /* then the value of the second argument will be the same as the */
  219. /* value of the first. If there is a comma, then the value of the */
  220. /* second argument will be the value of the second argument ;-) */
  221. void
  222. break_args(s, arg1, arg2)
  223. char    *s, *arg1, *arg2;
  224.  
  225. {
  226.   char *ns;
  227.   ns = strchr(s,',');
  228.   if (ns) {
  229.     /* there was a comma arg2 should be the second arg*/
  230.     *ns++ = '\0';
  231.     while ((*arg2++ = *ns++) != '\0');
  232.   }
  233.   else {
  234.     /* there was not a comma, we can use ns as a temp s */
  235.     /* and arg2 should be the same value as arg1 */
  236.     ns = s;
  237.     while ((*arg2++ = *ns++) != '\0');
  238.   };
  239.   while ((*arg1++ = *s++) != '\0');
  240. }
  241.  
  242. void
  243. set_defaults()
  244. {
  245.   
  246.   /* stuff to say where this test is going                              */
  247.   strcpy(host_name,"localhost");    /* remote host name or ip addr  */
  248.   strcpy(test_name,"TCP_STREAM");    /* which test to run         */
  249.   test_port    = 12865;            /* where is the test waiting    */
  250.   
  251.   /* output controlling variables                               */
  252.   debug            = 0;/* debugging level            */
  253.   print_headers        = 1;/* do print test headers        */
  254.   verbosity        = 1;/* verbosity level            */
  255.   /* cpu variables */
  256.   local_cpu_usage    = 0;/* measure local cpu        */
  257.   remote_cpu_usage    = 0;/* what do you think ;-)        */
  258.   
  259.   local_cpu_rate    = (float)0.0;
  260.   remote_cpu_rate    = (float)0.0;
  261.   
  262.   /* the end-test conditions for the tests - either transactions, bytes,  */
  263.   /* or time. different vars used for clarity - space is cheap ;-)        */
  264.   test_time    = 10;    /* test ends by time            */
  265.   test_bytes    = 0;    /* test ends on byte count        */
  266.   test_trans    = 0;    /* test ends on tran count        */
  267.   
  268.   /* the alignment conditions for the tests                */
  269.   local_recv_align    = 8;    /* alignment for local receives    */
  270.   local_send_align    = 8;    /* alignment for local sends    */
  271.   remote_recv_align    = 8;    /* alignment for remote receives*/
  272.   remote_send_align    = 8;    /* alignment for remote sends    */
  273.   
  274. #ifdef INTERVALS
  275.   /* rate controlling stuff */
  276.   interval_usecs  = 0;
  277.   interval_wate   = 1;
  278.   interval_burst  = 0;
  279. #endif /* INTERVALS */
  280.   
  281. #ifdef DIRTY
  282.   /* dirty and clean cache stuff */
  283.   loc_dirty_count = 0;
  284.   loc_clean_count = 0;
  285.   rem_dirty_count = 0;
  286.   rem_clean_count = 0;
  287. #endif /* DIRTY */
  288.  
  289.  /* some of the vairables for confidence intervals... */
  290.  
  291.   confidence_level = 99;
  292.   iteration_min = 1;
  293.   iteration_max = 1;
  294.   interval = 0.05; /* five percent? */
  295.  
  296.   strcpy(fill_file,"");
  297. }
  298.      
  299.  
  300. void
  301. print_netserver_usage()
  302. {
  303.   fprintf(stderr,netserver_usage);
  304. }
  305.  
  306.  
  307. void
  308. print_netperf_usage()
  309. {
  310.   fprintf(stderr,netperf_usage);
  311. }
  312.  
  313. void
  314. scan_cmd_line(argc, argv)
  315.      int    argc;
  316.      char    *argv[];
  317.  
  318. {
  319.   extern int    optind;           /* index of first unused arg     */
  320.   extern char    *optarg;      /* pointer to option string    */
  321.   
  322.   int        c;
  323.   
  324.   char    arg1[BUFSIZ],  /* argument holders        */
  325.   arg2[BUFSIZ];
  326.   
  327.   program = (char *)malloc(strlen(argv[0]) + 1);
  328.   strcpy(program, argv[0]);
  329.   
  330.   /* Go through all the command line arguments and break them */
  331.   /* out. For those options that take two parms, specifying only */
  332.   /* the first will set both to that value. Specifying only the */
  333.   /* second will leave the first untouched. To change only the */
  334.   /* first, use the form first, (see the routine break_args.. */
  335.   
  336.   while ((c= getopt(argc, argv, GLOBAL_CMD_LINE_ARGS)) != EOF) {
  337.     switch (c) {
  338.     case '?':    
  339.     case 'h':
  340.       print_netperf_usage();
  341.       exit(1);
  342.     case 'a':
  343.       /* set local alignments */
  344.       break_args(optarg,arg1,arg2);
  345.       if (arg1[0]) {
  346.     local_send_align = convert(arg1);
  347.       }
  348.       if (arg2[0])
  349.     local_recv_align = convert(arg2);
  350.       break;
  351.     case 'A':
  352.       /* set remote alignments */
  353.       break_args(optarg,arg1,arg2);
  354.       if (arg1[0]) {
  355.     remote_send_align = convert(arg1);
  356.       }
  357.       if (arg2[0])
  358.     remote_recv_align = convert(arg2);
  359.       break;
  360.     case 'd':
  361.       debug++;
  362.       break;
  363.     case 'D':
  364. #if (defined INTERVALS) && (defined __hpux)
  365.       demo_mode++;
  366. #else /* INTERVALS __hpux */
  367.       printf("Sorry, Demo Mode requires -DINTERVALS compilation \n");
  368.       printf("as well as a mechanism to dynamically select syscall \n");
  369.       printf("restart or interruption. I only know how to do this \n");
  370.       printf("for HP-UX. Please examine the code in netlib.c:catcher() \n");
  371.       printf("and let me know of more standard alternatives. \n");
  372.       printf("                             Rick Jones <raj@cup.hp.com>\n");
  373.       exit(1);
  374. #endif /* INTERVALS __hpux */
  375.       break;
  376.     case 'f':
  377.       /* set the thruput formatting */
  378.       libfmt = *optarg;
  379.       break;
  380.     case 'F':
  381.       /* set the fill_file variable for pre-filling buffers */
  382.       strcpy(fill_file,optarg);
  383.       break;
  384.     case 'i':
  385.       /* set the iterations min and max for confidence intervals */
  386.       break_args(optarg,arg1,arg2);
  387.       if (arg1[0]) {
  388.     iteration_max = convert(arg1);
  389.       }
  390.       if (arg2[0] ) {
  391.     iteration_min = convert(arg2);
  392.       }
  393.       /* limit maximum to 30 iterations */
  394.       if(iteration_max>30) iteration_max=30;
  395.       if(iteration_min>30) iteration_min=30;
  396.       break;
  397.     case 'I':
  398.       /* set the confidence level (95 or 99) and width */
  399.       break_args(optarg,arg1,arg2);
  400.       if (arg1[0]) {
  401.     confidence_level = convert(arg1);
  402.       }
  403.       if((confidence_level != 95) && (confidence_level != 99)){
  404.     printf("Only 95%% and 99%% confidence level is supported\n");
  405.     exit(1);
  406.       }
  407.       if (arg2[0] ) {
  408.     interval = (double) convert(arg2)/100;
  409.       }
  410.       break;
  411.     case 'k':
  412.       /* local dirty and clean counts */
  413. #ifdef DIRTY
  414.       break_args(optarg,arg1,arg2);
  415.       if (arg1[0]) {
  416.     loc_dirty_count = convert(arg1);
  417.       }
  418.       if (arg2[0] ) {
  419.     loc_clean_count = convert(arg2);
  420.       }
  421. #else
  422.       printf("I don't know how to get dirty.\n");
  423. #endif /* DIRTY */
  424.       break;
  425.     case 'K':
  426.       /* remote dirty and clean counts */
  427. #ifdef DIRTY
  428.       break_args(optarg,arg1,arg2);
  429.       if (arg1[0]) {
  430.     rem_dirty_count = convert(arg1);
  431.       }
  432.       if (arg2[0] ) {
  433.     rem_clean_count = convert(arg2);
  434.       }
  435. #else
  436.       printf("I don't know how to get dirty.\n");
  437. #endif /* DIRTY */
  438.       break;
  439.     case 'n':
  440.       shell_num_cpus = atoi(optarg);
  441.       break;
  442.     case 'o':
  443.       /* set the local offsets */
  444.       break_args(optarg,arg1,arg2);
  445.       if (arg1[0])
  446.     local_send_offset = convert(arg1);
  447.       if (arg2[0])
  448.     local_recv_offset = convert(arg2);
  449.       break;
  450.     case 'O':
  451.       /* set the remote offsets */
  452.       break_args(optarg,arg1,arg2);
  453.       if (arg1[0]) 
  454.     remote_send_offset = convert(arg1);
  455.       if (arg2[0])
  456.     remote_recv_offset = convert(arg2);
  457.       break;
  458.     case 'P':
  459.       /* to print or not to print, that is */
  460.       /* the header question */
  461.       print_headers = convert(optarg);
  462.       break;
  463.     case 't':
  464.       /* set the test name */
  465.       strcpy(test_name,optarg);
  466.       break;
  467.     case 'W':
  468.       /* set the "width" of the user space data buffer ring. This will */
  469.       /* be the number of send_size buffers malloc'd in the tests */  
  470.       break_args(optarg,arg1,arg2);
  471.       if (arg1[0]) 
  472.     send_width = convert(arg1);
  473.       if (arg2[0])
  474.     recv_width = convert(arg2);
  475.       break;
  476.     case 'l':
  477.       /* determine test end conditions */
  478.       /* assume a timed test */
  479.       test_time = convert(optarg);
  480.       test_bytes = test_trans = 0;
  481.       if (test_time < 0) {
  482.     test_bytes = -1 * test_time;
  483.     test_trans = test_bytes;
  484.     test_time = 0;
  485.       }
  486.       break;
  487.     case 'v':
  488.       /* say how much to say */
  489.       verbosity = convert(optarg);
  490.       break;
  491.     case 'c':
  492.       /* measure local cpu usage please. the user */
  493.       /* may have specified the cpu rate as an */
  494.       /* optional parm */
  495.       if (argv[optind] != NULL && isdigit(argv[optind][0])){
  496.     /* there was an optional parm */
  497.     local_cpu_rate = (float)atof(argv[optind]);
  498.     optind++;
  499.       }
  500.       local_cpu_usage++;
  501.       break;
  502.     case 'C':
  503.       /* measure remote cpu usage please */
  504.       if (argv[optind] != NULL && isdigit(argv[optind][0])){
  505.     /* there was an optional parm */
  506.     remote_cpu_rate = (float)atof(argv[optind]);
  507.     optind++;
  508.       }
  509.       remote_cpu_usage++;
  510.       break;
  511.     case 'p':
  512.       /* specify an alternate port number */
  513.       test_port = (short) convert(optarg);
  514.       break;
  515.     case 'H':
  516.       /* save-off the host identifying information */
  517.       strcpy(host_name,optarg);
  518.       break;
  519.     case 'w':
  520.       /* We want to send requests at a certain wate. */
  521.       /* Remember that there are 1000000 usecs in a */
  522.       /* second, and that the packet rate is */
  523.       /* expressed in packets per millisecond. */
  524. #ifdef INTERVALS
  525.       interval_wate  = convert(optarg);
  526.       interval_usecs = interval_wate * 1000;
  527. #else
  528.       fprintf(where,
  529.           "Packet rate control is not compiled in.\n");
  530. #endif
  531.       break;
  532.     case 'b':
  533.       /* we want to have a burst so many packets per */
  534.       /* interval. */
  535. #ifdef INTERVALS
  536.       interval_burst = convert(optarg);
  537. #else
  538.       fprintf(where,
  539.           "Packet burst size is not compiled in. \n");
  540. #endif /* INTERVALS */
  541.       break;
  542.     };
  543.   }
  544.   /* we have encountered a -- in global command-line */
  545.   /* processing and assume that this means we have gotten to the */
  546.   /* test specific options. this is a bit kludgy and if anyone has */
  547.   /* a better solution, i would love to see it */
  548.   if (optind != argc) {
  549.     if ((strcmp(test_name,"TCP_STREAM") == 0) || 
  550.     (strcmp(test_name,"TCP_RR") == 0) ||
  551.     (strcmp(test_name,"TCP_CRR") == 0) ||
  552. #ifdef DO_1644
  553.     (strcmp(test_name,"TCP_TRR") == 0) ||
  554. #endif /* DO_1644 */
  555. #ifdef DO_NBRR
  556.     (strcmp(test_name,"TCP_TRR") == 0) ||
  557. #endif /* DO_NBRR */
  558.     (strcmp(test_name,"UDP_STREAM") == 0) ||
  559.     (strcmp(test_name,"UDP_RR") == 0))
  560.       {
  561.     scan_sockets_args(argc, argv);
  562.       }
  563. #ifdef DO_DLPI
  564.     else if ((strcmp(test_name,"DLCO_RR") == 0) ||
  565.          (strcmp(test_name,"DLCL_RR") == 0) ||
  566.          (strcmp(test_name,"DLCO_STREAM") == 0) ||
  567.          (strcmp(test_name,"DLCL_STREAM") == 0))
  568.       {
  569.     scan_dlpi_args(argc, argv);
  570.       }
  571. #endif /* DO_DLPI */
  572. #ifdef DO_UNIX
  573.     else if ((strcmp(test_name,"STREAM_RR") == 0) ||
  574.          (strcmp(test_name,"DG_RR") == 0) ||
  575.          (strcmp(test_name,"STREAM_STREAM") == 0) ||
  576.          (strcmp(test_name,"DG_STREAM") == 0))
  577.       {
  578.     scan_unix_args(argc, argv);
  579.       }
  580. #endif /* DO_UNIX */
  581. #ifdef DO_FORE
  582.     else if ((strcmp(test_name,"FORE_RR") == 0) ||
  583.          (strcmp(test_name,"FORE_STREAM") == 0))
  584.       {
  585.     scan_fore_args(argc, argv);
  586.       }
  587. #endif /* DO_FORE */
  588. #ifdef DO_HIPPI
  589.     else if ((strcmp(test_name,"HIPPI_RR") == 0) ||
  590.          (strcmp(test_name,"HIPPI_STREAM") == 0))
  591.       {
  592.     scan_hippi_args(argc, argv);
  593.       }
  594. #endif /* DO_HIPPI */
  595. #ifdef DO_XTI
  596.     else if ((strcmp(test_name,"XTI_TCP_RR") == 0) ||
  597.          (strcmp(test_name,"XTI_TCP_STREAM") == 0) ||
  598.          (strcmp(test_name,"XTI_UDP_RR") == 0) ||
  599.          (strcmp(test_name,"XTI_UDP_STREAM") == 0))
  600.       {
  601.     scan_xti_args(argc, argv);
  602.       }
  603. #endif /* DO_XTI */
  604. #ifdef DO_LWP
  605.     else if ((strcmp(test_name,"LWPSTR_RR") == 0) ||
  606.          (strcmp(test_name,"LWPSTR_STREAM") == 0) ||
  607.          (strcmp(test_name,"LWPDG_RR") == 0) ||
  608.          (strcmp(test_name,"LWPDG_STREAM") == 0))
  609.       {
  610.     scan_lwp_args(argc, argv);
  611.       }
  612. #endif /* DO_LWP */
  613. #ifdef DO_IPV6
  614.     else if ((strcmp(test_name,"TCPIPV6_RR") == 0) ||
  615.          (strcmp(test_name,"TCPIPV6_CRR") == 0) ||
  616.          (strcmp(test_name,"TCPIPV6_STREAM") == 0) ||
  617.          (strcmp(test_name,"UDPIPV6_RR") == 0) ||
  618.          (strcmp(test_name,"UDPIPV6_STREAM") == 0))
  619.       {
  620.     scan_ipv6_args(argc, argv);
  621.       }
  622. #endif /* DO_IPV6 */
  623.   }
  624. }
  625.  
  626. void
  627. dump_globals()
  628. {
  629.   printf("Program name: %s\n", program);
  630.   printf("Local send alignment: %d\n",local_send_align);
  631.   printf("Local recv alignment: %d\n",local_recv_align);
  632.   printf("Remote send alignment: %d\n",remote_send_align);
  633.   printf("Remote recv alignment: %d\n",remote_recv_align);
  634.   printf("Report local CPU %d\n",local_cpu_usage);
  635.   printf("Report remote CPU %d\n",remote_cpu_usage);
  636.   printf("Verbosity: %d\n",verbosity);
  637.   printf("Debug: %d\n",debug);
  638.   printf("Port: %d\n",test_port);
  639.   printf("Test name: %s\n",test_name);
  640.   printf("Test bytes: %d Test time: %d Test trans: %d\n",
  641.      test_bytes,
  642.      test_time,
  643.      test_trans);
  644.   printf("Host name: %s\n",host_name);
  645.   printf("\n");
  646. }
  647.