home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / EXTRAS / UUCODE / UUPC / TEST / UPC12ES4.ZIP / UUTRAF / uutraf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-12  |  4.2 KB  |  112 lines

  1. /*
  2.  *    uutraf.h - common header for uutraf
  3.  */
  4.  
  5. #define SID_H    "@(#)uutraf:uutraf.h    1.2.2.7    92/10/23 10:26:35 (woods)"
  6. #define SID_NM    uutraf_sccsid
  7. #include <sccsid.h>
  8.  
  9. /*
  10.  * these defines are part of the sort routine to figure out how to sort the
  11.  * linked list
  12.  */
  13. #define REVERSE  00001  /* reverse the order, least to most */
  14. #define RECEIVED 00002  /* sort by received */
  15. #define XMIT     00004  /* sort by xmit */
  16. #define R_TIME   00010  /* sort by received time */
  17. #define X_TIME   00020  /* sort by xmit time */
  18. #define R_CPS    00100  /* sort by characters RECEIVED per second */
  19. #define X_CPS    00200  /* sort by characters TRANSMITTED per second */
  20. #define R_NUMB   01000  /* sort by number of RECEIVED transactions */
  21. #define X_NUMB   02000  /* sort by number of TRANSMITTED transactions */
  22.  
  23. /*
  24.  * print options
  25.  */
  26. #define HEADERS        001
  27. #define SYS_RPT        002
  28. #define PORT_RPT    004
  29. #define SUMM_RPT    010
  30. #define SYSBYPORT_OPT    020
  31.  
  32. /*
  33.  * other various things
  34.  */
  35. #ifdef HAVE_HDBUUCP        /* Most BNU (aka. HDB) systems */
  36. # define OUT    "->"  /*uucp flow direction indicator*/
  37. # define IN    "<-"  /*uucp flow direction indicator*/
  38. #else                /* Most "old" UUCP's (i.e. with SYSLOG) */
  39. # define OUT    "sent"
  40. # define IN    "received"
  41. #endif
  42.  
  43. #ifdef pyr    /* UUCP via TCP/IP on an ATT Pyramid */
  44. #define T_OUT    "t->"  /* t protocol outgoing */
  45. #define T_IN    "t<-"  /* t protocol incoming */
  46. #define F_OUT    "f->"  /* f protocol outgoing */
  47. #define F_IN    "f<-"  /* f protocol incoming */
  48. #endif
  49.  
  50. /*
  51.  * structures for storing totals and summary results
  52.  */
  53. typedef struct port {
  54.     long        p_xmit;        /* # of bytes sent on this device */
  55.     float        p_xmit_time;    /* total seconds xmit'ing on this device */
  56.     long        p_xmit_cnt;    /* total number of files sent */
  57.     long        p_recv;        /* # of bytes rec'd on this device */
  58.     float        p_recv_time;    /* total seconds rec'ing on this device */
  59.     long        p_recv_cnt;    /* total number of files received */
  60.     int        p_in_conn;    /* total number of slave connections */
  61.     int        p_out_conn;    /* total number of master connections */
  62.     int        p_lastpid;    /* pid found in previous data line */
  63.     llst_t        *p_syslst;    /* per-system summary */
  64.     char        p_dname[NAME_MAX + 1];    /* device name (not path) */
  65. } PORT;
  66.  
  67. typedef struct link {
  68.     long        l_xmit;        /* # of bytes sent to remote system */
  69.     float        l_xmit_time;     /* total seconds spent in transmit */
  70.     long        l_xmit_cnt;    /* total number of files sent */
  71.     long        l_recv;        /* # of bytes rec'd from remote system */
  72.     float        l_recv_time;     /* total seconds spent in receive */
  73.     long        l_recv_cnt;    /* total number of files received */
  74.     int        l_in_conn;    /* total number of slave connections */
  75.     int        l_out_conn;    /* total number of master connections */
  76.     int        l_lastpid;    /* pid found in previous data line */
  77.     llst_t        *l_portlst;    /* per-port summary */
  78.     char        l_sysname[1];    /* name of remote system */
  79. } LINK;
  80.  
  81. typedef struct summ {
  82.     int        syscnt;        /* total active sites */
  83.     int        devcnt;        /* total active ports */
  84.     long        bytes_recv;    /* total bytes received */
  85.     long        bytes_xmit;    /* total bytes transmitted */
  86.     float        sec_recv;    /* total seconds spent in receive */
  87.     float        sec_xmit;    /* total seconds spent in transmit */
  88.     long        num_recv;    /* total number of files received */
  89.     long        num_xmit;    /* total number of files transmitted */
  90.     long        num_in_conn;    /* total number of slave connections */
  91.     long        num_out_conn;    /* total number of master connections */
  92.     struct tm    first_rec;    /* timestamp in first record seen */
  93.     struct tm    last_rec;    /* timestamp in last record seen */
  94. } SUMM;
  95.  
  96. static
  97. char usage[]="\n\
  98. \t-H\tinclude headers in non-default report\n\
  99. \t-M\tprint merged port summary by system (implies -N)\n\
  100. \t-N\tprint nodes summary\n\
  101. \t-P\tprint ports summary\n\
  102. \t-S\tprint total summary\n\
  103. \t-V\tprint version identification\n\
  104. \t-a\tsort in ascending vs. descending order\n\
  105. \t-b[rxb]\tsort by total bytes rec'd, xmit'ed, or both\n\
  106. \t-c[rxb]\tsort by chars per second rec'd, xmit'ed, or both\n\
  107. \t-f[rxb]\tsort by # of files rec'd, xmit'ed, or both\n\
  108. \t-h\tprint this help message\n\
  109. \t-n\tsort by {system,port} name (must be used alone)\n\
  110. \t-s\tuse standard input instead of default xferstats file\n\
  111. \t-t[rxb]\tsort by total clock time in rec, xmit, or both";
  112.