home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 239.lha / amiga / src / client / statdnet.c < prev   
C/C++ Source or Header  |  1989-05-02  |  613b  |  42 lines

  1.  
  2. /*
  3.  *  STATDNET.C
  4.  *
  5.  *  DNET (c)Copyright 1988, Matthew Dillon, All Rights Reserved.
  6.  *
  7.  *  STATDNET [-Nnet]
  8.  *
  9.  */
  10.  
  11. #include <stdio.h>
  12. #include "/version.h"
  13.  
  14. char buf[2048];
  15.  
  16. main(ac,av)
  17. char *av[];
  18. {
  19.     int ok;
  20.     char *host = NULL;
  21.  
  22.     printf("StatDNet V%s%s\n", VERSION, STATDNET_VERSION);
  23.  
  24.     {
  25.     register short i;
  26.     for (i = 1; i < ac; ++i) {
  27.         if (strncmp(av[i], "-N", 2) == 0) {
  28.         host = av[i] + 2;
  29.         continue;
  30.         }
  31.     }
  32.     }
  33.     fflush(stdout);
  34.     buf[0] = 0;
  35.     ok = DStat(host, buf, 2048);
  36.     if (ok)
  37.     write(1, buf, strlen(buf));
  38.     else
  39.     puts("DNET master port for network not found");
  40. }
  41.  
  42.