home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / unix / volume26 / uutraf / part01 < prev    next >
Encoding:
Text File  |  1993-05-07  |  51.4 KB  |  1,653 lines

  1. Newsgroups: comp.sources.unix
  2. From: decvax!concert.net!woods%robohack (Greg A. Woods)
  3. Subject: v26i236: uutraf - UUCP Traffic Analysis and Reporting, Part01/04
  4. Sender: unix-sources-moderator@efficacy.home.vix.com
  5. Approved: vixie@efficacy.home.vix.com
  6.  
  7. Submitted-By: decvax!concert.net!woods%robohack (Greg A. Woods)
  8. Posting-Number: Volume 26, Issue 236
  9. Archive-Name: uutraf/part01
  10.  
  11. UUTRAF - UUCP Traffic Analysis and Reporting
  12.  
  13.     decvax!concert.net!woods%robohack (Greg A. Woods)
  14.  
  15. OVERVIEW
  16.  
  17. Uutraf is a program that analyzes the output of uucico log files, and
  18. produces a summary of activity.  It works with both old style UUCP and
  19. AT&T's BNU or HoneyDanBer UUCP.  It requires no special privileges to
  20. execute.  It makes no shell calls.
  21.  
  22. ( The old-style SYSLOG parsing code for systems other than ULTRIX 4.2
  23.   may not work so well just now.... --woods )
  24.  
  25. Uutraf is similar to, but more extensive than, the "uusub" utility
  26. that was supplied with AT&T UNIX System V's running the old-style UUCP.
  27.  
  28. Note that while HDB-UUCP does record a user-name for each transfer,
  29. this user name may be either a local name, or a remote name, and it is
  30. impossible to tell which without knowing which system the request was
  31. originally submitted from (which is only possible by matching up the
  32. PID to the uucico logs, and then tracing back through the uucp and uux
  33. logs for the given system in an attempt to match the job to a request).
  34. As a result, uutraf does not attempt to report statistics by user.
  35.  
  36.     Greg Hackney
  37.     Southwestern Bell Telephone Co.
  38.     hack@texbell.swbt.com    # no longer valid....
  39.     Dallas, Texas
  40.  
  41.     Greg A. Woods
  42.     Elegant Communications Inc.
  43.     woods@Elegant.COM, woods@robohack.UUCP
  44.     Toronto, Ontario
  45.  
  46. #! /bin/sh
  47. # This is a shell archive.  Remove anything before this line, then unpack
  48. # it by saving it into a file and typing "sh file".  To overwrite existing
  49. # files, type "sh file -c".  You can also feed this as standard input via
  50. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  51. # will see the following message at the end:
  52. #        "End of archive 1 (of 4)."
  53. # Contents:  CHANGES CREDITS Letter Letter-1.2 MANIFEST README RELEASES
  54. #   defs.h-dist externsrc.shar patchlevel.h pdstrtok.c uutraf.1
  55. #   uutraf.h version.c version.h
  56. # Wrapped by woods@robohack on Sun Nov  8 16:38:09 1992
  57. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  58. if test -f 'CHANGES' -a "${1}" != "-c" ; then 
  59.   echo shar: Will not clobber existing file \"'CHANGES'\"
  60. else
  61. echo shar: Extracting \"'CHANGES'\" \(9628 characters\)
  62. sed "s/^X//" >'CHANGES' <<'END_OF_FILE'
  63. XChanges for Release dated:  92/11/08-16:36:33
  64. X-------------------------------------------------------------------------------
  65. X@(#)uutraf:CREDITS    D 1.1.1.4 92/10/12 14:58:38 woods 5 4    (woods)
  66. X    add a version id, fix Georg's name, etc.
  67. X
  68. X@(#)uutraf:CREDITS    D 1.1.1.3 92/08/27 02:16:44 woods 4 3    (woods)
  69. X    added beta-testers, + Robert
  70. X
  71. X@(#)uutraf:CREDITS    D 1.1.1.2 92/07/12 15:20:22 woods 3 2    (woods)
  72. X    cleanup, added my bit...
  73. X
  74. X@(#)uutraf:CREDITS    D 1.1.1.1 90/07/15 19:41:07 woods 2 1    (woods)
  75. X    final cleanups for new functionality and list library.
  76. X
  77. X@(#)uutraf:CREDITS    D 1.1 90/07/15 19:33:23 woods 1 0    (woods)
  78. X    date and time created 90/07/15 19:33:23 by woods
  79. X
  80. X@(#)uutraf:Makefile    D 1.2.2.9 92/11/08 16:35:41 woods 15 14    (woods)
  81. X    few more fixes for "make dist" to work
  82. X
  83. X@(#)uutraf:Makefile    D 1.2.2.8 92/10/23 10:19:38 woods 14 13    (woods)
  84. X    cleanup of dist/shar stuff, added version id files
  85. X
  86. X@(#)uutraf:Makefile    D 1.2.2.7 92/10/12 15:00:07 woods 13 12    (woods)
  87. X    add new comments from smail-2's Makeguts,
  88. Xadd new dist stuff from smail too!
  89. X
  90. X@(#)uutraf:Makefile    D 1.2.2.6 92/08/09 16:26:07 woods 12 11    (woods)
  91. X    bug in sed line
  92. X
  93. X@(#)uutraf:Makefile    D 1.2.2.5 92/08/09 13:03:55 woods 11 10    (woods)
  94. X    more hints, better dist & shar stuff
  95. X
  96. X@(#)uutraf:Makefile    D 1.2.2.4 92/07/12 15:30:34 woods 10 9    (woods)
  97. X    and we're ready for the next release?
  98. X
  99. X@(#)uutraf:Makefile    D 1.2.2.3 92/07/06 00:04:14 woods 9 8    (woods)
  100. X    fixes and updates in prep. for new release
  101. X
  102. X@(#)uutraf:Makefile    D 1.2.2.2 92/02/16 22:18:46 woods 8 7    (woods)
  103. X    oops, forgot sccsid.h
  104. X
  105. X@(#)uutraf:Makefile    D 1.2.2.1 92/02/16 22:07:49 woods 7 6    (woods)
  106. X    added '# Con' field and '-M' option
  107. X
  108. X@(#)uutraf:Makefile    D 1.2.1.4 91/04/26 00:09:25 woods 6 5    (woods)
  109. X    adjust to use installed libdlst.a and list.h
  110. X
  111. X@(#)uutraf:Makefile    D 1.2.1.3 90/07/15 19:40:50 woods 5 4    (woods)
  112. X    final cleanups for new functionality and list library.
  113. X
  114. X@(#)uutraf:Makefile    D 1.2.1.2 90/07/15 13:52:48 woods 4 3    (woods)
  115. X    integraged new list library
  116. X
  117. X@(#)uutraf:Makefile    D 1.2.1.1 90/07/14 14:16:54 woods 3 2    (woods)
  118. X    retrofit good stuff from 1.2 update to 1.1.1.2
  119. X
  120. X@(#)uutraf:Makefile    D 1.2 90/07/14 14:15:21 woods 2 1    (woods)
  121. X    1.2 update
  122. X
  123. X@(#)uutraf:uutraf.1    D 1.1.2.7 92/10/23 10:21:28 woods 10 9    (woods)
  124. X    minor grammatical fixes,
  125. Xadded -V option description
  126. X
  127. X@(#)uutraf:uutraf.1    D 1.1.2.6 92/10/12 15:03:20 woods 9 8    (woods)
  128. X    clean up CREDITS, fix Georg's name.
  129. X
  130. X@(#)uutraf:uutraf.1    D 1.1.2.5 92/08/27 02:21:44 woods 8 7    (woods)
  131. X    more notes, more ack's.
  132. X
  133. X@(#)uutraf:uutraf.1    D 1.1.2.4 92/08/26 00:01:13 woods 7 6    (woods)
  134. X    one more wee bug listed,
  135. Xadded e-mail for bug reports
  136. X
  137. X@(#)uutraf:uutraf.1    D 1.1.2.3 92/08/09 13:08:57 woods 6 5    (woods)
  138. X    moved #ident to top, added L.Wall's handy strings
  139. X
  140. X@(#)uutraf:uutraf.1    D 1.1.2.2 92/07/12 15:40:15 woods 5 4    (woods)
  141. X    standard prologue...
  142. X
  143. X@(#)uutraf:uutraf.1    D 1.1.2.1 92/02/16 22:07:54 woods 4 3    (woods)
  144. X    added '# Con' field and '-M' option
  145. X
  146. X@(#)uutraf:uutraf.1    D 1.1.1.2 91/04/26 07:42:15 woods 3 2    (woods)
  147. X    fixed sorting, cleaned up boundary condidions
  148. X
  149. X@(#)uutraf:uutraf.1    D 1.1.1.1 90/07/15 19:40:55 woods 2 1    (woods)
  150. X    final cleanups for new functionality and list library.
  151. X
  152. X@(#)uutraf:uutraf.1    D 1.1 90/07/15 18:00:57 woods 1 0    (woods)
  153. X    date and time created 90/07/15 18:00:57 by woods
  154. X
  155. X@(#)uutraf:uutraf.c    D 1.2.2.8 92/10/23 10:23:03 woods 16 15    (woods)
  156. X    fixed bug where node/device counts not being done if showing only summary
  157. X*** CHANGED *** 92/10/23 10:24:53 woods
  158. Xadded version ID option (-V),
  159. Xadded usage error messages for options
  160. X
  161. X@(#)uutraf:uutraf.c    D 1.2.2.7 92/10/12 15:06:08 woods 15 14    (woods)
  162. X    add Robert Story's time-range code for the report header
  163. X
  164. X@(#)uutraf:uutraf.c    D 1.2.2.6 92/08/27 02:26:49 woods 14 13    (woods)
  165. X    support for type changes of "bytes" to long, and "time" to float,
  166. Xfixes for ULTRIX 4.2 SYSLOG format
  167. X
  168. X@(#)uutraf:uutraf.c    D 1.2.2.5 92/08/26 00:04:24 woods 13 12    (woods)
  169. X    made CPS fields 1 wider, hours 1 narrower, summary total time in HH:MM:SS
  170. X
  171. X@(#)uutraf:uutraf.c    D 1.2.2.4 92/08/09 14:54:16 woods 12 11    (woods)
  172. X    clarified BSD vs. HDB-UUCP confusion, and pyr vs. pyramid
  173. X
  174. X@(#)uutraf:uutraf.c    D 1.2.2.3 92/07/12 15:27:13 woods 11 10    (woods)
  175. X    portability for fun and profit! 
  176. Xbug fix in sscanf() spec.
  177. X
  178. X@(#)uutraf:uutraf.c    D 1.2.2.2 92/07/05 23:56:41 woods 10 9    (woods)
  179. X    bug fixes (missing 0 for some printf()s), portability fixes
  180. X
  181. X@(#)uutraf:uutraf.c    D 1.2.2.1 92/02/16 22:07:59 woods 9 8    (woods)
  182. X    added '# Con' field and '-M' option
  183. X
  184. X@(#)uutraf:uutraf.c    D 1.2.1.4 91/04/26 07:42:20 woods 8 7    (woods)
  185. X    fixed sorting, cleaned up boundary condidions
  186. X
  187. X@(#)uutraf:uutraf.c    D 1.2.1.3 90/07/15 19:40:27 woods 7 6    (woods)
  188. X    final cleanups for new functionality and list library.
  189. X
  190. X@(#)uutraf:uutraf.c    D 1.2.1.2 90/07/15 13:52:24 woods 6 5    (woods)
  191. X    integraged new list library
  192. X
  193. X@(#)uutraf:uutraf.c    D 1.2.1.1 90/07/14 14:16:30 woods 5 2    (woods)
  194. X    retrofit good stuff from 1.2 update to 1.1.1.2
  195. X
  196. X@(#)uutraf:uutraf.c    D 1.1.1.2 90/07/14 13:10:20 woods 4 3    (woods)
  197. X    added device reporting, removed broken sorting stuff
  198. X
  199. X@(#)uutraf:uutraf.c    D 1.1.1.1 90/07/14 13:09:12 woods 3 1    (woods)
  200. X    initial cleanup and enhancements
  201. X
  202. X@(#)uutraf:uutraf.c    D 1.2 90/07/14 13:07:02 woods 2 1    (woods)
  203. X    1.2 update
  204. X
  205. X@(#)uutraf:uutraf.c    D 1.1 90/07/14 13:05:44 woods 1 0    (woods)
  206. X    date and time created 90/07/14 13:05:44 by woods
  207. X
  208. X@(#)uutraf:README    D 1.1.2.7 92/11/08 16:26:00 woods 9 8    (woods)
  209. X    fixed order of compile instructions,
  210. Xfixed spelling/grammar,
  211. Xadded instructions for Pyramid OSx & DC/OSx.
  212. X
  213. X@(#)uutraf:README    D 1.1.2.6 92/10/23 10:25:50 woods 8 7    (woods)
  214. X    updated comments on AIX v3
  215. X
  216. X@(#)uutraf:README    D 1.1.2.5 92/10/12 15:01:45 woods 7 6    (woods)
  217. X    fix instructions re extern*.shar,
  218. Xnew hints,
  219. Xminor twiddles.
  220. X
  221. X@(#)uutraf:README    D 1.1.2.4 92/08/27 02:18:17 woods 6 5    (woods)
  222. X    ULTRIX 4.2 SYSLOG works again, notes about pyr, ultrix
  223. X
  224. X@(#)uutraf:README    D 1.1.2.3 92/08/26 00:06:28 woods 5 4    (woods)
  225. X    notes about SCO crud, hack' address going bad, NEC EWS/UX 4.0
  226. X
  227. X@(#)uutraf:README    D 1.1.2.2 92/08/09 13:10:58 woods 4 3    (woods)
  228. X    more hints, etc. & cleanup for submission
  229. X
  230. X@(#)uutraf:README    D 1.1.2.1 92/07/06 00:04:24 woods 3 2    (woods)
  231. X    fixes and updates in prep. for new release
  232. X
  233. X@(#)uutraf:README    D 1.1.1.1 90/07/15 19:41:04 woods 2 1    (woods)
  234. X    final cleanups for new functionality and list library.
  235. X
  236. X@(#)uutraf:README    D 1.1 90/07/15 19:31:34 woods 1 0    (woods)
  237. X    date and time created 90/07/15 19:31:34 by woods
  238. X
  239. X@(#)uutraf:uutraf.h    D 1.2.2.7 92/10/23 10:26:35 woods 14 13    (woods)
  240. X    added strings for -V and -h options to usage message
  241. X
  242. X@(#)uutraf:uutraf.h    D 1.2.2.6 92/10/12 15:04:19 woods 13 12    (woods)
  243. X    add first_rec and last_rec elements for timestamps in summary struct
  244. X
  245. X@(#)uutraf:uutraf.h    D 1.2.2.5 92/08/27 02:19:37 woods 12 11    (woods)
  246. X    rstory's patch to switch time units to float,
  247. Xswitch bytes back to longs too
  248. X
  249. X@(#)uutraf:uutraf.h    D 1.2.2.4 92/08/26 00:02:03 woods 11 10    (woods)
  250. X    converted counts of seconds from time_t to long
  251. X
  252. X@(#)uutraf:uutraf.h    D 1.2.2.3 92/08/09 13:05:02 woods 10 9    (woods)
  253. X    cleanup for BSD vs. HAVE_HDBUUCP and pyr vs. pyramid
  254. X
  255. X@(#)uutraf:uutraf.h    D 1.2.2.2 92/07/06 00:01:48 woods 9 8    (woods)
  256. X    portability stuff moved to common headers
  257. X
  258. X@(#)uutraf:uutraf.h    D 1.2.2.1 92/02/16 22:08:20 woods 8 7    (woods)
  259. X    added '# Con' field and '-M' option
  260. X
  261. X@(#)uutraf:uutraf.h    D 1.2.1.3 90/07/15 19:40:45 woods 7 6    (woods)
  262. X    final cleanups for new functionality and list library.
  263. X
  264. X@(#)uutraf:uutraf.h    D 1.2.1.2 90/07/15 13:52:40 woods 6 5    (woods)
  265. X    integraged new list library
  266. X
  267. X@(#)uutraf:uutraf.h    D 1.2.1.1 90/07/14 14:16:45 woods 5 2    (woods)
  268. X    retrofit good stuff from 1.2 update to 1.1.1.2
  269. X
  270. X@(#)uutraf:uutraf.h    D 1.1.1.2 90/07/14 13:10:34 woods 4 3    (woods)
  271. X    added device reporting, removed broken sorting stuff
  272. X
  273. X@(#)uutraf:uutraf.h    D 1.1.1.1 90/07/14 13:09:22 woods 3 1    (woods)
  274. X    initial cleanup and enhancements
  275. X
  276. X@(#)uutraf:uutraf.h    D 1.2 90/07/14 13:07:10 woods 2 1    (woods)
  277. X    1.2 update
  278. X
  279. X@(#)uutraf:uutraf.h    D 1.1 90/07/14 13:05:47 woods 1 0    (woods)
  280. X    date and time created 90/07/14 13:05:47 by woods
  281. X
  282. X@(#)uutraf:defs.h-dist    D 1.2.2.5 92/10/23 10:27:14 woods 11 10    (woods)
  283. X    fixed default STATFILE location for AIX
  284. X
  285. X@(#)uutraf:defs.h-dist    D 1.2.2.4 92/08/27 02:23:35 woods 10 9    (woods)
  286. X    support for ULTRIX 4.2?
  287. X
  288. X@(#)uutraf:defs.h-dist    D 1.2.2.3 92/08/09 13:09:48 woods 9 8    (woods)
  289. X    fixes to clear up BSD vs. HDBUUCP confusion
  290. X
  291. X@(#)uutraf:defs.h-dist    D 1.2.2.2 92/07/06 00:03:40 woods 8 7    (woods)
  292. X    fixes for AIX
  293. X
  294. X@(#)uutraf:defs.h-dist    D 1.2.2.1 92/02/16 22:08:27 woods 7 6    (woods)
  295. X    added '# Con' field and '-M' option
  296. X
  297. X@(#)uutraf:defs.h-dist    D 1.2.1.3 90/07/15 19:40:59 woods 6 5    (woods)
  298. X    final cleanups for new functionality and list library.
  299. X
  300. X@(#)uutraf:defs.h-dist    D 1.2.1.2 90/07/15 13:52:45 woods 5 4    (woods)
  301. X    integraged new list library
  302. X
  303. X@(#)uutraf:defs.h-dist    D 1.2.1.1 90/07/14 14:16:49 woods 4 2    (woods)
  304. X    retrofit good stuff from 1.2 update to 1.1.1.2
  305. X
  306. X@(#)uutraf:defs.h-dist    D 1.1.1.1 90/07/14 13:13:46 woods 3 1    (woods)
  307. X    cleanup and enhancements, including device reporting
  308. X
  309. X@(#)uutraf:defs.h-dist    D 1.2 90/07/14 13:07:43 woods 2 1    (woods)
  310. X    1.2 update
  311. X
  312. X@(#)uutraf:defs.h-dist    D 1.1 90/07/14 13:07:19 woods 1 0    (woods)
  313. X    date and time created 90/07/14 13:07:19 by woods
  314. X
  315. X@(#)uutraf:version.c    D 1.1 92/10/12 15:09:06 woods 1 0    (woods)
  316. X    date and time created 92/10/12 15:09:06 by woods
  317. X
  318. X@(#)uutraf:version.h    D 1.2 92/10/12 16:06:30 woods 2 1    (woods)
  319. X    version_id didn't work anyway....
  320. X
  321. X@(#)uutraf:version.h    D 1.1 92/10/12 15:09:08 woods 1 0    (woods)
  322. X    date and time created 92/10/12 15:09:08 by woods
  323. X
  324. X@(#)uutraf:patchlevel.h    D 1.1 92/10/12 15:09:12 woods 1 0    (woods)
  325. X    date and time created 92/10/12 15:09:12 by woods
  326. X
  327. X----
  328. X
  329. END_OF_FILE
  330. if test 9628 -ne `wc -c <'CHANGES'`; then
  331.     echo shar: \"'CHANGES'\" unpacked with wrong size!
  332. fi
  333. # end of 'CHANGES'
  334. fi
  335. if test -f 'CREDITS' -a "${1}" != "-c" ; then 
  336.   echo shar: Will not clobber existing file \"'CREDITS'\"
  337. else
  338. echo shar: Extracting \"'CREDITS'\" \(1295 characters\)
  339. sed "s/^X//" >'CREDITS' <<'END_OF_FILE'
  340. X#ident    "@(#)uutraf:CREDITS    1.1.1.4    92/10/12 14:58:38 (woods)"
  341. X
  342. XOriginal Author:
  343. X
  344. X    Greg Hackney
  345. X    Southwestern Bell Telephone Co.
  346. X    hack@texbell.swbt.com
  347. X    Dallas, Texas
  348. X
  349. XAcknowledgements:
  350. X
  351. XDoug Davis, doug@letni.uucp
  352. XDavid Butler, gdb@ninja.uucp
  353. X    - Added the sorting routines, plus other major work
  354. X
  355. XBud Hovell, bhh@whizz.uucp
  356. X    - Reworked the printout for readability and precision
  357. X
  358. XDavid Kaelbing, drk@igor.uu.net
  359. X    - Made it work with Sun's version of UUCP
  360. X
  361. XJoe Garvey, garvey%cmic@mips.com
  362. X    - Fixed core dumps on empty files
  363. X
  364. XGreg A. Woods, woods@robohack.uucp woods@elegant.com
  365. X    - Re-wrote the internals using a new linked-list library.
  366. X    The library is a re-write of an idea presented in "Object
  367. X    Oriented Programming in C", David Brumbaugh; The C Users
  368. X    Journal; July 1990, Vol. 8, No. 7.  Use as you see fit.
  369. X    - added '# of connections with work' tally
  370. X    - cleaned up output format
  371. X    - added per-ports report(s)
  372. X
  373. XD'Arcy Cain, darcy@druid.com
  374. X    - avid beta tester [ESIX V.3 and V.4]
  375. X
  376. XGeorg S. Nikodym, georgn@noweh.com
  377. X    - avid beta tester [SCO XENIX, SunOS 4.1.2, Solaris 2.0(sparc)]
  378. X
  379. XBill Duncan, bduncan@ve3ied.uucp
  380. X    - avid beta tester [SCO XENIX]
  381. X
  382. XRobert Story, rstory@elegant.com
  383. X    - fixed precision problems with high-speed (TCP/IP) links
  384. X    - tested on SCO UNIX
  385. X    - added report period summary
  386. X
  387. END_OF_FILE
  388. if test 1295 -ne `wc -c <'CREDITS'`; then
  389.     echo shar: \"'CREDITS'\" unpacked with wrong size!
  390. fi
  391. # end of 'CREDITS'
  392. fi
  393. if test -f 'Letter' -a "${1}" != "-c" ; then 
  394.   echo shar: Will not clobber existing file \"'Letter'\"
  395. else
  396. echo shar: Extracting \"'Letter'\" \(946 characters\)
  397. sed "s/^X//" >'Letter' <<'END_OF_FILE'
  398. XFrom ecicrl!lsuc!attcan!uunet!samsung!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!rutgers!texbell!news1 Mon Nov  6 10:32:42 EST 1989
  399. XFrom: news1@texbell.swbt.com (Greg Hackney)
  400. XNewsgroups: alt.sources
  401. XSubject: uutraf - UUCP statistics for HoneyDanBer
  402. XMessage-ID: <621@texbell.swbt.com>
  403. XDate: 5 Nov 89 21:26:57 GMT
  404. XLines: 899
  405. X
  406. X
  407. Xuutraf - Produces UUCP transfer statistics - HoneyDanBer (BNU) UUCP only
  408. X
  409. XThe program summarizes the output of the UUCP 'xferstats' program,
  410. Xand gives the transfer statistics by system, giving such things as
  411. Xthe average transmission speed, connect time, and the volume of traffic.
  412. X
  413. XCommand line options can be specified for sorting the output by volume,
  414. Xconnect time, xfer rates, etc. For speed and security, the program is
  415. XC (no shell calls), and requires no special privileges to run.
  416. X
  417. XThanks to Doug Davis and David Butler for the sorting functions and
  418. Xother stuff they did.
  419. X--
  420. XGreg Hackney
  421. Xhack@texbell.swbt.com
  422. X
  423. END_OF_FILE
  424. if test 946 -ne `wc -c <'Letter'`; then
  425.     echo shar: \"'Letter'\" unpacked with wrong size!
  426. fi
  427. # end of 'Letter'
  428. fi
  429. if test -f 'Letter-1.2' -a "${1}" != "-c" ; then 
  430.   echo shar: Will not clobber existing file \"'Letter-1.2'\"
  431. else
  432. echo shar: Extracting \"'Letter-1.2'\" \(908 characters\)
  433. sed "s/^X//" >'Letter-1.2' <<'END_OF_FILE'
  434. XFrom nebulus!telly!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!sun-barr!newstop!texsun!texbell!news1 Sun Feb  4 10:42:49 EST 1990
  435. XFrom: news1@texbell.swbt.com (Greg Hackney)
  436. XNewsgroups: alt.sources
  437. XSubject: uutraf 1.2 (for BSD and BNU UUCP)
  438. XMessage-ID: <7@texbell.swbt.com>
  439. XDate: 3 Feb 90 02:36:33 GMT
  440. XReply-To: hack@texbell.swbt.com (Greg Hackney)
  441. XDistribution: alt
  442. XOrganization: texbell gateway, dallas
  443. XLines: 1077
  444. X
  445. X
  446. Xuutraf analyzes uucico log files, and produces a summarized report.
  447. XIt helps in keeping track of UUCP volume and transfer rates.
  448. X
  449. XIt now includes support for BSD UUCP systems as well as
  450. XHoneyDanBer/BNU UUCP. Plus, the report format has been improved.
  451. X
  452. Xuutraf is know to work on a Pyramid, NCR Tower, Sequent Balance, Sun 3/50,
  453. XCompaq running SCO Xenix, and AT&T 3B2.
  454. X--
  455. XGreg Hackney
  456. XSouthwestern Bell Telephone Co.
  457. XDallas, Texas
  458. Xhack@texbell.swbt.com
  459. X
  460. X
  461. END_OF_FILE
  462. if test 908 -ne `wc -c <'Letter-1.2'`; then
  463.     echo shar: \"'Letter-1.2'\" unpacked with wrong size!
  464. fi
  465. # end of 'Letter-1.2'
  466. fi
  467. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  468.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  469. else
  470. echo shar: Extracting \"'MANIFEST'\" \(703 characters\)
  471. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  472. X   File Name        Archive #    Description
  473. X-----------------------------------------------------------
  474. X dlst.shar                  4    
  475. X CHANGES                    1    
  476. X CREDITS                    1    
  477. X Letter                     1    
  478. X Letter-1.2                 1    
  479. X MANIFEST                   1    This shipping list
  480. X Makefile-dist              2    
  481. X README                     1    
  482. X RELEASES                   1    
  483. X defs.h-dist                1    
  484. X externhdr.shar             2    
  485. X externsrc.shar             1    
  486. X patchlevel.h               1    
  487. X pdstrtok.c                 1    
  488. X uutraf.1                   1    
  489. X uutraf.c                   3    
  490. X uutraf.h                   1    
  491. X version.c                  1    
  492. X version.h                  1    
  493. END_OF_FILE
  494. if test 703 -ne `wc -c <'MANIFEST'`; then
  495.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  496. fi
  497. # end of 'MANIFEST'
  498. fi
  499. if test -f 'README' -a "${1}" != "-c" ; then 
  500.   echo shar: Will not clobber existing file \"'README'\"
  501. else
  502. echo shar: Extracting \"'README'\" \(6725 characters\)
  503. sed "s/^X//" >'README' <<'END_OF_FILE'
  504. XArchive-Name: uutraf
  505. XSubmitted-By: (Greg A. Woods) woods@robohack.UUCP
  506. XEnvironment: UUCP on any UNIX
  507. X
  508. X
  509. X        UUTRAF - UUCP Traffic Analysis and Reporting
  510. X
  511. XOVERVIEW
  512. X
  513. XUutraf is a program that analyzes the output of uucico log files, and
  514. Xproduces a summary of activity.  It works with both old style UUCP and
  515. XAT&T's BNU or HoneyDanBer UUCP.  It requires no special privileges to
  516. Xexecute.  It makes no shell calls.
  517. X
  518. X[ The old-style SYSLOG parsing code for systems other than ULTRIX 4.2
  519. Xmay not work so well just now.... --woods ]
  520. X
  521. XUutraf is similar to, but more extensive than, the "uusub" utility
  522. Xthat was supplied with AT&T UNIX System V's running the old-style UUCP.
  523. X
  524. XNote that while HDB-UUCP does record a user-name for each transfer,
  525. Xthis user name may be either a local name, or a remote name, and it is
  526. Ximpossible to tell which without knowing which system the request was
  527. Xoriginally submitted from (which is only possible by matching up the
  528. XPID to the uucico logs, and then tracing back through the uucp and uux
  529. Xlogs for the given system in an attempt to match the job to a request).
  530. XAs a result, uutraf does not attempt to report statistics by user.
  531. X
  532. X
  533. XTO COMPILE
  534. X
  535. X
  536. XCopy the file "externhdr.shar" into the directory where you keep
  537. Xsource for local header files (eg.: ../head), and unshar it.  Then
  538. Xcopy the enclosed header files into your local include directory.
  539. X
  540. XSysdefs.h in particularly, and libc.h to a lesser extent, may require
  541. Xmodification to suit your local system's compiler environment.
  542. X(Please send any changes to the authors, thanks!)
  543. X
  544. X[These header files are used for several projects and are maintained
  545. Xseparately on one of the author's machines.  He recommends you should
  546. Xupdate your local include directory should you run across any newer
  547. Xversion(s).  Future patches will also be kept separate for these
  548. Xfiles, and may even appear separately from packages that use them.]
  549. X
  550. X[[Also note that if you do not install these header files, along with
  551. Xdlst.h, in a local include directory, and if you have a non-standard
  552. Xpre-processor (cpp), you'll likely have to set INCDIR to '.' in the
  553. XMakefile and copy dlst.h into the uutraf source directory.]]
  554. X
  555. XGo back to where you unpacked the uutraf shar file.
  556. X
  557. XCopy the file "dlst.shar" into a new sub-directory wherever you keep
  558. Xthe sources for your local libraries (eg.: ../lib/dlst), unshar it and
  559. Xread the enclosed file "README", then build and install as per the
  560. Xinstructions in the README.  You'll need libdlst.a and dlst.h in
  561. Xappropriate local places to compile and link uutraf itself.
  562. X
  563. XGo back to where you unpacked the uutraf shar file.
  564. X
  565. XIf your system needs strtok(3c) and/or getopt(3c), unshar the file
  566. X"externsrc.shar" in the current directory.  [You may wish to use
  567. Xeither the strtok.c from this shar, or the pdstrtok.c included in the
  568. Xmaster shar.  Make your decision and rename as appropriate.]
  569. X
  570. XCopy "Makefile-dist" to "Makefile" and edit: SYSTYPE, OPTIM, CFLAGS,
  571. XLDFLAGS, LIBS, BIN, and MAN.
  572. X
  573. X
  574. XNOTES & HINTS:
  575. X
  576. X    - AT&T 3b1 (or UNIX PC, or 7300) are truly just SYSVR2.
  577. X
  578. X    - Some SysVr4's may need both SYSVR4 & _POSIX_SOURCE, though
  579. X      Solaris 2.0 seems to need only SYSVR4 in pure ANSI mode.
  580. X
  581. X    - Beta SysVr4's may need USE_STDLIB too (non-ANSI C compiler,
  582. X      eg. NEC EWS/UP 4800's running UX 4.0 at least up to release
  583. X      5.1, which also needs DUMB_VOID).
  584. X
  585. X    - AIX v3.x users should use _POSIX_SOURCE, and must compile
  586. X      *outside* of the BSD compatibility environment, as that
  587. X      defines _BSD, and makes a real mess of the system include
  588. X      files.
  589. X
  590. X    - SunOS 4.1.2 with acc doesn't like _POSIX_SOURCE either, and
  591. X      also seems to have trouble with __STDC__.  Solaris 2.0
  592. X      [sparc] is happy with just -DSYSVR4.
  593. X
  594. X    - If you're not SYSVR3, you'll need to remove the "-lc_s" (and
  595. X      probably the "-lmalloc" too) from the definition of LIBS, and
  596. X      may want to add in your own systems shared library option,
  597. X      if necessary.
  598. X
  599. X    - SCO UNIX needs SYSVR3 & _POSIX_SOURCE, even though I don't
  600. X      see how it can claim 1003.1 conformance....
  601. X
  602. X    - Modern version of Pyramid OSx (i.e. the old Dual Universe
  603. X      OS) works best if compiled in the "att" universe with
  604. X      -D_POSIX_SOURCE -ZPOSIX -Xt (POSIX & ANSI-C with
  605. X      compatibility).  You'll also have to change the
  606. X      '-L$(LIBDIR)' option in $(LDFLAGS) to '-Wl,-L$(LIBDIR)' to
  607. X      find the right local libraries (i.e.  path to libdlst.a).
  608. X      Also check code surrounded by "#ifdef pyr", especially if
  609. X      you run UUCP over TCP/IP.
  610. X
  611. X    - Older versions of Pyramid OSx may work in the "ucb" universe
  612. X      if compiled with -DBSD, though there may be problems with
  613. X      the typedefs in <sysdefs.h>.  Also check code surrounded by
  614. X      "#ifdef pyr", especially if you run UUCP over TCP/IP.
  615. X
  616. X    - Older systems may need BSDOBJS uncommented.
  617. X
  618. X    - Most versions of the UNIX PCC compiler will need DUMB_VOID.
  619. X
  620. X    - DEBUG, OPTIM, & SDB should be set for defaults, and then
  621. X      modified on the command line for debugging, etc.
  622. X
  623. XFinally, copy "defs.h-dist" to "defs.h" and edit to suit.
  624. X
  625. XWe assume "pyr" will be defined on Pyramid OSx machines (you may need
  626. Xto fix this for DC/OSx, as that one has HDB-UUCP, as it may cause
  627. Xclashes, since the ifdef'ed code was meant to support Pyramid's weird
  628. Xidea of identifying TCP transfers in the SYSLOG file).  This code
  629. Xcompiles on both OSx and DC/OSx, but has only been run on a valid data
  630. Xfile on DC/OSx.
  631. X
  632. XWe assume either "ultrix" or "__ultrix__" will be defined on ULTRIX
  633. Xmachines.  This code has not actually been compiled on ULTRIX, but the
  634. XSYSLOG parsing does work for ULTRIX 4.2 UUCP logs.
  635. X
  636. XIf you don't have HoneyDanBer-UUCP, and you're not running ULTRIX 4.2,
  637. Xyou may have to fix some of the parsing in uutraf.c:procfile() to
  638. Xhandle your system's /{usr,var}/spool/uucp/SYSLOG format.  (Please
  639. Xsend changes back to the authors.)
  640. X
  641. XNote:  It seems Taylor-UUCP doesn't have any useful statistics
  642. Xavailable yet. 
  643. X
  644. XOnce you've tailored Makefile and defs.h, just type "make", and it
  645. Xshould produce an executable called 'uutraf'.
  646. X
  647. XTest!  (Just running it should display current summary.)  If you have
  648. Xtrouble try 'make DEBUG=-DDEBUG SDB=-g OPTIM=' and experiment with
  649. Xyour debugger.
  650. X
  651. XIf it runs okay, type "make install clobber".
  652. X
  653. X
  654. XMANUALS & DOCUMENTATION
  655. X
  656. XThe file "uutraf.1" contains the [nt]roff source for a manual page.
  657. X
  658. XIf you do not have nroff, I would suggest you track down Henry
  659. XSpencer's "awf" from an archive near you.  (It is a minimal nroff
  660. Xclone written in awk.)  On the other hand, you can easily read the
  661. Xmanual source too!
  662. X
  663. X
  664. X#ident    "@(#)uutraf:README    1.1.2.7    92/11/08 16:26:00 (woods)"
  665. X--
  666. XGreg Hackney
  667. XSouthwestern Bell Telephone Co.
  668. Xhack@texbell.swbt.com    # no longer valid....
  669. XDallas, Texas
  670. X
  671. XGreg A. Woods
  672. XElegant Communications Inc.
  673. Xwoods@Elegant.COM, woods@robohack.UUCP
  674. XToronto, Ontario
  675. X
  676. END_OF_FILE
  677. if test 6725 -ne `wc -c <'README'`; then
  678.     echo shar: \"'README'\" unpacked with wrong size!
  679. fi
  680. # end of 'README'
  681. fi
  682. if test -f 'RELEASES' -a "${1}" != "-c" ; then 
  683.   echo shar: Will not clobber existing file \"'RELEASES'\"
  684. else
  685. echo shar: Extracting \"'RELEASES'\" \(36 characters\)
  686. sed "s/^X//" >'RELEASES' <<'END_OF_FILE'
  687. X90/02/02-00:00:00
  688. X92/11/08-16:36:33
  689. END_OF_FILE
  690. if test 36 -ne `wc -c <'RELEASES'`; then
  691.     echo shar: \"'RELEASES'\" unpacked with wrong size!
  692. fi
  693. # end of 'RELEASES'
  694. fi
  695. if test -f 'defs.h-dist' -a "${1}" != "-c" ; then 
  696.   echo shar: Will not clobber existing file \"'defs.h-dist'\"
  697. else
  698. echo shar: Extracting \"'defs.h-dist'\" \(2439 characters\)
  699. sed "s/^X//" >'defs.h-dist' <<'END_OF_FILE'
  700. X/*
  701. X *    defs.h - configuration for uutraf
  702. X */
  703. X
  704. X#define SID_H    "@(#)uutraf:defs.h-dist    1.2.2.5    92/10/23 10:27:14 (woods)"
  705. X#define SID_NM    defs_sccsid
  706. X#include <sccsid.h>
  707. X
  708. X/*
  709. X * This file contains user defined parameters
  710. X */
  711. X
  712. X#define HAVE_HDBUUCP    1    /* HoneyDanBer-UUCP xferstats? */
  713. X
  714. X#ifdef HAVE_HDBUUCP
  715. X# if defined(sun4) || defined(SYSVR4)
  716. X#  define STATFILE    "/var/uucp/.Admin/xferstats"
  717. X# else
  718. X#  if defined(_AIX) && defined(_IBMR2)    /* really should be AIX 3.2.x */
  719. X#   define STATFILE    "/var/spool/uucp/.Admin/xferstats"
  720. X#  else
  721. X#   define STATFILE    "/usr/spool/uucp/.Admin/xferstats"
  722. X#  endif
  723. X# endif
  724. X#else
  725. X# if defined(ultrix) || defined(__ultrix__) || defined(BSD4_3)
  726. X#  define STATFILE    "/var/spool/uucp/SYSLOG"    /* all the same? */
  727. X# else
  728. X#  define STATFILE    "/usr/spool/uucp/SYSLOG"    /* all the same? */
  729. X# endif
  730. X#endif
  731. X
  732. X#if defined(_AIX) && !defined(_IBMR2)    /* really should be AIX 3.1.x ??? */
  733. X# define NAME_MAX    PATH_MAX    /* they say you should use pathconf() */
  734. X#endif
  735. X
  736. X/*
  737. X * default report to print (you might want to add in SYSBYPORT_OPT (with
  738. X * SYS_RPT))
  739. X */
  740. X#define DEFAULT_RPT    (HEADERS | SYS_RPT | PORT_RPT | SUMM_RPT)
  741. X
  742. X/*
  743. X * default way to sort (both node and port sections)
  744. X */
  745. X#define DEFAULT_SORT    (RECEIVED | XMIT)    /* Total number of bytes */
  746. X
  747. X/* you can instead pick from one of these for the default sorting method.
  748. X *
  749. X * Sort by number of bytes
  750. X *    #define DEFAULT_SORT (RECEIVED)
  751. X *    #define DEFAULT_SORT (XMIT)
  752. X *    #define DEFAULT_SORT (RECEIVED | XMIT)
  753. X *    #define DEFAULT_SORT (RECEIVED | REVERSE)
  754. X *    #define DEFAULT_SORT (XMIT | REVERSE)
  755. X *    #define DEFAULT_SORT (RECEIVED | XMIT | REVERSE)
  756. X *
  757. X * Sort by transfer rate
  758. X *    #define DEFAULT_SORT (R_CPS)
  759. X *    #define DEFAULT_SORT (X_CPS)
  760. X *    #define DEFAULT_SORT (R_CPS | X_CPS)
  761. X *    #define DEFAULT_SORT (R_CPS | REVERSE)
  762. X *    #define DEFAULT_SORT (X_CPS | REVERSE)
  763. X *    #define DEFAULT_SORT (R_CPS | X_CPS | REVERSE)
  764. X *
  765. X * Sort by number of file transactions
  766. X *    #define DEFAULT_SORT (R_NUMB)
  767. X *    #define DEFAULT_SORT (X_NUMB)
  768. X *    #define DEFAULT_SORT (R_NUMB | X_NUMB)
  769. X *    #define DEFAULT_SORT (R_NUMB | REVERSE)
  770. X *    #define DEFAULT_SORT (X_NUMB | REVERSE)
  771. X *    #define DEFAULT_SORT (R_NUMB | X_NUMB | REVERSE)
  772. X *
  773. X * Sort by modem clock time
  774. X *    #define DEFAULT_SORT (R_TIME)
  775. X *    #define DEFAULT_SORT (X_TIME)
  776. X *    #define DEFAULT_SORT (X_TIME | R_TIME)
  777. X *    #define DEFAULT_SORT (R_TIME | REVERSE)
  778. X *    #define DEFAULT_SORT (X_TIME | REVERSE)
  779. X *    #define DEFAULT_SORT (X_TIME | R_TIME | REVERSE)
  780. X */
  781. X
  782. END_OF_FILE
  783. if test 2439 -ne `wc -c <'defs.h-dist'`; then
  784.     echo shar: \"'defs.h-dist'\" unpacked with wrong size!
  785. fi
  786. # end of 'defs.h-dist'
  787. fi
  788. if test -f 'externsrc.shar' -a "${1}" != "-c" ; then 
  789.   echo shar: Will not clobber existing file \"'externsrc.shar'\"
  790. else
  791. echo shar: Extracting \"'externsrc.shar'\" \(8380 characters\)
  792. sed "s/^X//" >'externsrc.shar' <<'END_OF_FILE'
  793. X#! /bin/sh
  794. X# This is a shell archive.  Remove anything before this line, then unpack
  795. X# it by saving it into a file and typing "sh file".  To overwrite existing
  796. X# files, type "sh file -c".  You can also feed this as standard input via
  797. X# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  798. X# will see the following message at the end:
  799. X#        "End of shell archive."
  800. X# Contents:  getopt.c strtok.c
  801. X# Wrapped by woods@robohack on Sun Nov  8 16:36:48 1992
  802. XPATH=/bin:/usr/bin:/usr/ucb ; export PATH
  803. Xif test -f 'getopt.c' -a "${1}" != "-c" ; then 
  804. X  echo shar: Will not clobber existing file \"'getopt.c'\"
  805. Xelse
  806. Xecho shar: Extracting \"'getopt.c'\" \(4803 characters\)
  807. Xsed "s/^X//" >'getopt.c' <<'END_OF_FILE'
  808. XX/*
  809. XX *    getopt.c - the real thing!
  810. XX */
  811. XX/*
  812. XX * Here's something you've all been waiting for:  the AT&T public domain
  813. XX * source for getopt(3c).  It is the code which was given out at the 1985
  814. XX * UNIFORUM conference in Dallas.  I [?who? -gaw] obtained it by
  815. XX * electronic mail directly from AT&T.  The people there assure me that
  816. XX * it is indeed in the public domain.
  817. XX */
  818. XX/*
  819. XX * The manual page supplied with this version (i.e. smail-2.7) is from C
  820. XX * News, and was originally written by Henry Spencer for his Public
  821. XX * Domain version of getopt().
  822. XX */
  823. XX/*
  824. XX * Several features have been added to the original version.
  825. XX *
  826. XX * One minor feature has been added that allows the possibility of
  827. XX * detecting some missing option arguments by looking for a leading
  828. XX * minus sign on the option argument.  This feature is enabled by
  829. XX * defining NO_MINUS at compile time.
  830. XX *
  831. XX * Normally stdio(3s) is avoided, since it can significantly increase the
  832. XX * size of a programme.  If stdio is being used anyway, getopt(3c) can be
  833. XX * compiled with USE_STDIO.
  834. XX *
  835. XX * To prevent getopt() from emitting any error messages, define a nil
  836. XX * manifest ERR; eg. "cc -DSYSVR3 -DERR -c getopt.c".
  837. XX *
  838. XX * In addition, an implementation of the getopt(1) command can be built
  839. XX * by defining GETOPT at compile time.
  840. XX */
  841. XX
  842. XX#define SID    "@(#)smail-2:getopt.c    1.1    92/04/20 00:28:11 (woods)"
  843. XX#include "sccsid.h"
  844. XX
  845. XX#ifndef lint        /* supposedly from this version: */
  846. XXstatic char    *orig_sccsid = "@(#)libc-port:gen/getopt.c\t1.9\t(AT&T)";
  847. XX#endif
  848. XX
  849. XX#if defined(SYSVR2) || defined(SYSVR3) || defined(SYSVR4)
  850. XX# ifndef SYSV
  851. XX#  define SYSV
  852. XX# endif
  853. XX#endif
  854. XX
  855. XX#if !defined(SYSV) && !defined(__STDC__) && !defined(_POSIX_SOURCE)
  856. XX# define strchr        index
  857. XX# define strrchr    rindex
  858. XX#endif
  859. XX
  860. XX#ifndef NULL
  861. XX# define NULL    0
  862. XX#endif
  863. XX#ifndef EOF
  864. XX# define EOF    (-1)
  865. XX#endif
  866. XX#ifndef STDERR
  867. XX# define STDERR    2
  868. XX#endif
  869. XX
  870. XX#ifdef GETOPT
  871. XX# ifndef USE_STDIO
  872. XX#  define USE_STDIO    1
  873. XX# endif
  874. XX#endif
  875. XX
  876. XX#ifndef ERR
  877. XX# ifndef USE_STDIO
  878. XX#  define ERR(msg, ch)    if (opterr) { \
  879. XX        static char    errbuf[3] = "?\n"; \
  880. XX        errbuf[0] = ch; \
  881. XX        (void) write(STDERR, argv[0], strlen(argv[0])); \
  882. XX        (void) write(STDERR, msg, strlen(msg)); \
  883. XX        (void) write(STDERR, errbuf, 2); \
  884. XX    }
  885. XX# else
  886. XX#  include <stdio.h>
  887. XX#  define ERR(msg, ch)    if (opterr) { \
  888. XX        (void) fputs(argv[0], stderr); \
  889. XX        (void) fputs(msg, stderr); \
  890. XX        (void) fputc(ch, stderr); \
  891. XX        (void) fputc('\n', stderr); \
  892. XX    }
  893. XX# endif
  894. XX#else
  895. XX# undef ERR
  896. XX# define ERR(msg, ch)    {;}        /* we must be VERY careful with ERR() */
  897. XX#endif
  898. XX
  899. XX/* these should be safe, even on broken ANSI-C like compilers... */
  900. XXextern int    strcmp();
  901. XXextern char    *strchr();
  902. XXextern char    *strrchr();
  903. XX
  904. XX/*LINTLIBRARY*/
  905. XX
  906. XXint    opterr = 1;
  907. XXint    optind = 1;
  908. XXint    optopt = 0;
  909. XXchar    *optarg = 0;
  910. XX
  911. XXint
  912. XXgetopt(argc, argv, opts)
  913. XX    int    argc;
  914. XX    char    *argv[];
  915. XX    char    *opts;
  916. XX{
  917. XX    static int    sp = 1;
  918. XX    register int    c;
  919. XX    register char    *cp;
  920. XX
  921. XX    if (sp == 1) {
  922. XX        if (optind >= argc || argv[optind][0] != '-' || argv[optind][1] == '\0')
  923. XX            return(EOF);
  924. XX        else if (strcmp(argv[optind], "--") == NULL) {
  925. XX            optind++;
  926. XX            return(EOF);
  927. XX        }
  928. XX    }
  929. XX    optopt = c = argv[optind][sp];
  930. XX    if (c == ':' || (cp = strchr(opts, c)) == NULL) {
  931. XX        ERR(": illegal option -- ", c);
  932. XX        if (argv[optind][++sp] == '\0') {
  933. XX            optind++;
  934. XX            sp = 1;
  935. XX        }
  936. XX        return('?');
  937. XX    }
  938. XX    if (*++cp == ':') {
  939. XX        if (argv[optind][sp+1] != '\0')
  940. XX            optarg = &argv[optind++][sp+1];
  941. XX        else if (++optind >= argc) {
  942. XX            ERR(": option requires an argument -- ", c);
  943. XX            sp = 1;
  944. XX            return('?');
  945. XX#ifndef NO_MINUS
  946. XX        } else
  947. XX            optarg = argv[optind++];
  948. XX#else /* NO_MINUS */
  949. XX        } else {
  950. XX            optarg = argv[optind++];
  951. XX            if (*optarg == '-') {
  952. XX                ERR(": option requires an argument -- ", c);
  953. XX                sp = 1;
  954. XX                return('?');
  955. XX            }
  956. XX        }
  957. XX#endif /* NO_MINUS */
  958. XX        sp = 1;
  959. XX    } else {
  960. XX        if (argv[optind][++sp] == '\0') {
  961. XX            sp = 1;
  962. XX            optind++;
  963. XX        }
  964. XX        optarg = NULL;
  965. XX    }
  966. XX    return(c);
  967. XX}
  968. XX
  969. XX
  970. XX
  971. XX#ifdef GETOPT
  972. XX
  973. XX/*
  974. XX * borrowed from TransFig's fig2dev
  975. XX */
  976. XX#ifndef lint
  977. XXstatic    char    sccspid[] = "@(#) getopt.c 5.1 (WangInst) 6/15/85";
  978. XX#endif
  979. XX
  980. XX#define    ARGCH    (int)':'
  981. XX#define BADCH     (int)'?'
  982. XX#define    ENDARGS  "--"
  983. XX
  984. XXint
  985. XXmain(argc, argv) 
  986. XX    int    argc
  987. XX    char    *argv[];
  988. XX{
  989. XX    char    *optstring = argv[1];
  990. XX    char    *argv0;
  991. XX    int    opterr = 0;
  992. XX    int    C;
  993. XX    char    *opi;
  994. XX
  995. XX    extern int    optind;
  996. XX    extern char    *optarg;
  997. XX    extern char    *strrchr();
  998. XX    extern char    *strchr();
  999. XX
  1000. XX    argv0 = (argv0 = strrchr(argv[0], '/')) ? argv0 + 1 : &argv[0];
  1001. XX    if (argc == 1) {
  1002. XX        (void) fprintf(stderr, "Usage: %s optstring args ...\n", argv0);
  1003. XX        exit(2);
  1004. XX    }
  1005. XX    argv++;
  1006. XX    argc--;
  1007. XX    argv[0] = argv0;
  1008. XX    while ((C = getopt(argc, argv, optstring)) != EOF) {
  1009. XX        if (C == BADCH) 
  1010. XX            opterr++;
  1011. XX        (void) printf("-%c ", C);
  1012. XX        opi = strchr(optstring, C);
  1013. XX        if (opi && opi[1] == ARGCH)
  1014. XX            if (optarg)
  1015. XX                (void) printf("\"%s\" ", optarg);
  1016. XX            else 
  1017. XX                opterr++;
  1018. XX    }
  1019. XX    (void) printf("%s", ENDARGS);
  1020. XX    while (optind < argc)
  1021. XX        printf(" \"%s\"", argv[optind++]);
  1022. XX    putchar('\n');
  1023. XX    exit(opterr);
  1024. XX}
  1025. XX
  1026. XX#endif /* GETOPT */
  1027. XEND_OF_FILE
  1028. Xif test 4803 -ne `wc -c <'getopt.c'`; then
  1029. X    echo shar: \"'getopt.c'\" unpacked with wrong size!
  1030. Xfi
  1031. X# end of 'getopt.c'
  1032. Xfi
  1033. Xif test -f 'strtok.c' -a "${1}" != "-c" ; then 
  1034. X  echo shar: Will not clobber existing file \"'strtok.c'\"
  1035. Xelse
  1036. Xecho shar: Extracting \"'strtok.c'\" \(2009 characters\)
  1037. Xsed "s/^X//" >'strtok.c' <<'END_OF_FILE'
  1038. XX/*
  1039. XX * Copyright (c) 1988 Regents of the University of California.
  1040. XX * All rights reserved.
  1041. XX *
  1042. XX * Redistribution and use in source and binary forms are permitted
  1043. XX * provided that: (1) source distributions retain this entire copyright
  1044. XX * notice and comment, and (2) distributions including binaries display
  1045. XX * the following acknowledgement:  ``This product includes software
  1046. XX * developed by the University of California, Berkeley and its contributors''
  1047. XX * in the documentation or other materials provided with the distribution
  1048. XX * and in all advertising materials mentioning features or use of this
  1049. XX * software. Neither the name of the University nor the names of its
  1050. XX * contributors may be used to endorse or promote products derived
  1051. XX * from this software without specific prior written permission.
  1052. XX * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  1053. XX * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  1054. XX * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  1055. XX */
  1056. XX
  1057. XX#if defined(LIBC_SCCS) && !defined(lint)
  1058. XXstatic char sccsid[] = "@(#)strtok.c    5.7 (Berkeley) 6/1/90";
  1059. XX#endif /* LIBC_SCCS and not lint */
  1060. XX
  1061. XX#include <stddef.h>
  1062. XX#include <string.h>
  1063. XX
  1064. XXchar *
  1065. XXstrtok(s, delim)
  1066. XX    register char *s, *delim;
  1067. XX{
  1068. XX    register char *spanp;
  1069. XX    register int c, sc;
  1070. XX    char *tok;
  1071. XX    static char *last;
  1072. XX
  1073. XX
  1074. XX    if (s == NULL && (s = last) == NULL)
  1075. XX        return (NULL);
  1076. XX
  1077. XX    /*
  1078. XX     * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
  1079. XX     */
  1080. XXcont:
  1081. XX    c = *s++;
  1082. XX    for (spanp = delim; (sc = *spanp++) != 0;) {
  1083. XX        if (c == sc)
  1084. XX            goto cont;
  1085. XX    }
  1086. XX
  1087. XX    if (c == 0) {        /* no non-delimiter characters */
  1088. XX        last = NULL;
  1089. XX        return (NULL);
  1090. XX    }
  1091. XX    tok = s - 1;
  1092. XX
  1093. XX    /*
  1094. XX     * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
  1095. XX     * Note that delim must have one NUL; we stop if we see that, too.
  1096. XX     */
  1097. XX    for (;;) {
  1098. XX        c = *s++;
  1099. XX        spanp = delim;
  1100. XX        do {
  1101. XX            if ((sc = *spanp++) == c) {
  1102. XX                if (c == 0)
  1103. XX                    s = NULL;
  1104. XX                else
  1105. XX                    s[-1] = 0;
  1106. XX                last = s;
  1107. XX                return (tok);
  1108. XX            }
  1109. XX        } while (sc != 0);
  1110. XX    }
  1111. XX    /* NOTREACHED */
  1112. XX}
  1113. XEND_OF_FILE
  1114. Xif test 2009 -ne `wc -c <'strtok.c'`; then
  1115. X    echo shar: \"'strtok.c'\" unpacked with wrong size!
  1116. Xfi
  1117. X# end of 'strtok.c'
  1118. Xfi
  1119. Xecho shar: End of shell archive.
  1120. Xecho "Modules for libfake..."
  1121. Xexit 0
  1122. END_OF_FILE
  1123. if test 8380 -ne `wc -c <'externsrc.shar'`; then
  1124.     echo shar: \"'externsrc.shar'\" unpacked with wrong size!
  1125. fi
  1126. # end of 'externsrc.shar'
  1127. fi
  1128. if test -f 'patchlevel.h' -a "${1}" != "-c" ; then 
  1129.   echo shar: Will not clobber existing file \"'patchlevel.h'\"
  1130. else
  1131. echo shar: Extracting \"'patchlevel.h'\" \(141 characters\)
  1132. sed "s/^X//" >'patchlevel.h' <<'END_OF_FILE'
  1133. X/*
  1134. X *    patchlevel.h
  1135. X */
  1136. X
  1137. X/* Patch #: 00 */
  1138. X/* Version #: 02 */
  1139. X/* Sub-Ver #: 00 */
  1140. X
  1141. X#define VER_ID        2
  1142. X#define VER_SUB        0
  1143. X#define PATCHLEVEL    0
  1144. END_OF_FILE
  1145. if test 141 -ne `wc -c <'patchlevel.h'`; then
  1146.     echo shar: \"'patchlevel.h'\" unpacked with wrong size!
  1147. fi
  1148. # end of 'patchlevel.h'
  1149. fi
  1150. if test -f 'pdstrtok.c' -a "${1}" != "-c" ; then 
  1151.   echo shar: Will not clobber existing file \"'pdstrtok.c'\"
  1152. else
  1153. echo shar: Extracting \"'pdstrtok.c'\" \(912 characters\)
  1154. sed "s/^X//" >'pdstrtok.c' <<'END_OF_FILE'
  1155. X/*  File   : strtok.c
  1156. X    Original Author : Richard A. O'Keefe.
  1157. X    Dated: 11 April 1984
  1158. X    Public domain
  1159. X
  1160. X       @(#) FILE:    strtok.c
  1161. X       @(#) Release:    1.1
  1162. X       @(#) Rel. Date:    2/2/90
  1163. X       @(#) By:     Greg Hackney (hack@texbell.swbt.com)
  1164. X
  1165. X*/
  1166. X
  1167. X#ifdef SCCSID
  1168. Xstatic char sccsid[] = "@(#) file strtok.c : rel 1.1 : mod 2/2/90";
  1169. X#endif
  1170. X
  1171. X
  1172. Xstatic    char    *oldSrc = "";
  1173. Xint  _set_ctr = 127;
  1174. Xchar _set_vec[128];
  1175. X
  1176. X#ifdef BSD
  1177. Xchar *strtok(src, set)
  1178. X    register char *src;
  1179. X    char *set;
  1180. X    {
  1181. X    char *save;
  1182. X
  1183. X    _str2set(set);
  1184. X    if (src == (char *)0) src = oldSrc;
  1185. X    while (_set_vec[*src] == _set_ctr) src++;
  1186. X    if (!*src) return (char *)0;
  1187. X    save = src;
  1188. X    while (_set_vec[*++src] != _set_ctr) ;
  1189. X    *src++ = 0;
  1190. X    oldSrc = src;
  1191. X    return save;
  1192. X    }
  1193. X
  1194. X_str2set(set)
  1195. X    register char *set;
  1196. X    {
  1197. X    if (set == (char *)0) return;
  1198. X    if (++_set_ctr == 128) {
  1199. X        _set_ctr = 1;
  1200. X    }
  1201. X    while (*set) _set_vec[*set++] = _set_ctr;
  1202. X    }
  1203. X#endif
  1204. X
  1205. END_OF_FILE
  1206. if test 912 -ne `wc -c <'pdstrtok.c'`; then
  1207.     echo shar: \"'pdstrtok.c'\" unpacked with wrong size!
  1208. fi
  1209. # end of 'pdstrtok.c'
  1210. fi
  1211. if test -f 'uutraf.1' -a "${1}" != "-c" ; then 
  1212.   echo shar: Will not clobber existing file \"'uutraf.1'\"
  1213. else
  1214. echo shar: Extracting \"'uutraf.1'\" \(6276 characters\)
  1215. sed "s/^X//" >'uutraf.1' <<'END_OF_FILE'
  1216. X'\"
  1217. X'\"    uutraf.1 - uutraf manual page
  1218. X'\"
  1219. X.ds iD "#ident    ``@(#)uutraf:uutraf.1    1.1.2.7    92/10/23 10:21:28 (woods)''
  1220. X'\"
  1221. X'\" command-line control (-rXn) for the .TH arguments:
  1222. X.nr X
  1223. X.if \nX=0 .ds x} UUTRAF 1 "Local UUCP Utilities" "\&"
  1224. X.if \nX=1 .ds x} UUTRAF 1 "Local UUCP Utilities"
  1225. X.if \nX=2 .ds x} UUTRAF 1 "" "\&"
  1226. X.if \nX=3 .ds x} UUTRAF "" "" "\&"
  1227. X.\"
  1228. X.\"    Fixed-width "code" font.  (`.ds C CW')
  1229. X.\"
  1230. X.if t .ds C CW
  1231. X.if n .ds C B
  1232. X.\".fp 7 \*C    \" you may need to load this font too
  1233. X.\"
  1234. X.\" Use this as .ft \*C (remember the .ft P)
  1235. X.\"
  1236. X.\" In-line select a font for programme text appearing `inline' in
  1237. X.\" the text.  Use the same selection choices as for code blocks.
  1238. X.\" Prepend `\&' in case the trailing arg starts w/ a period.
  1239. X.\"
  1240. X.\" Usage:
  1241. X.\"    .eP foo         (`foo' in code font)
  1242. X.\"    .eP foo mp      (`foomp', `foo' in code font, `mp' not)
  1243. X.\"    .eP foo mp ka   (`kafoomp', `foo' in code font, rest not)
  1244. X.\"
  1245. X.\" Sorry it's not too intuitive, but that's troff for ya!  Anything
  1246. X.\" better would be many lines of if's checking no. of args.
  1247. X.\"
  1248. X.de eP
  1249. X.    nh
  1250. X\&\\$3\c
  1251. X.    ft \\*C
  1252. X\\$1\fP\\$2\"            fixed-width font (not broke...)
  1253. X.    hy
  1254. X..
  1255. X.\"     A wee bit of neat stuff to get tabs to work with .ft \*C
  1256. X.\"
  1257. X.ft \*C
  1258. X.nr x \w'        '\" find width of 8 spaces.
  1259. X.ft P
  1260. X.rm DT
  1261. X.de DT\"default tabs
  1262. X.\" set tabs using width calculated above
  1263. X.ta \nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu +\nxu
  1264. X..
  1265. X.\"
  1266. X'\" [borrowed from Larry Wall's rn]
  1267. X.\"     Set up \*(-- to give an unbreakable dash;
  1268. X.\"     string Tr holds user defined translation string.
  1269. X.\"     Bell System Logo is used as a dummy character.
  1270. X.\"
  1271. X.tr \(bs-|\(bv\*(Tr
  1272. X.ie n \{\
  1273. X.    ds -- \(bs-
  1274. X.    if (\n(.H=4u)&(1m=24u) .ds -- \(bs\h'-12u'\(bs\h'-12u'-\" diablo 10 pitch
  1275. X.    if (\n(.H=4u)&(1m=20u) .ds -- \(bs\h'-12u'\(bs\h'-8u'-\" diablo 12 pitch
  1276. X.    ds L" ""
  1277. X.    ds R" ""
  1278. X.    ds L' '
  1279. X.    ds R' '
  1280. X'    br\}
  1281. X.el\{\
  1282. X.    ds -- \(em\|
  1283. X.    tr \*(Tr
  1284. X.    ds L" ``
  1285. X.    ds R" ''
  1286. X.    ds L' `
  1287. X.    ds R' '
  1288. X'    br\}
  1289. X.\"
  1290. X.TH \*(x}
  1291. X.SH NAME
  1292. Xuutraf \- UUCP file transfer statistics report generator
  1293. X.SH SYNOPSIS
  1294. X.B uutraf
  1295. X[
  1296. X.I options
  1297. X] [
  1298. X.I xferstat_file
  1299. X|
  1300. X.B -
  1301. X]
  1302. X.br
  1303. X.SH DESCRIPTION
  1304. X.I uutraf
  1305. Xanalyses
  1306. X.I UUCP
  1307. Xlog files, and provides a report on transfer statistics, using a
  1308. Xdefault sorting format, or an optional user specified sorting format.
  1309. X.SH OPTIONS
  1310. X.TP 0.5i
  1311. X.B \-H
  1312. Xinclude the header lines for restricted report forms.
  1313. X.TP
  1314. X.B \-N
  1315. Xrestrict the report to the nodes (sites) summary.
  1316. X.TP
  1317. X.B \-P
  1318. Xrestrict the report to the ports summary.  (Not available on some
  1319. Xsystems, such as ULTRIX 4.2.)
  1320. X.TP
  1321. X.B \-S
  1322. Xrestrict the report to totals summary.
  1323. X.TP
  1324. X.B \-M
  1325. Xmerge per-port sub-totals for each node.  This option implies the
  1326. Xsetting of
  1327. X.BR \-N .
  1328. X(Not available on some systems, such as ULTRIX 4.2.)
  1329. X.TP
  1330. X.B \-s
  1331. Xtake the input from stdin rather than a file.
  1332. X.TP
  1333. X.B \-V
  1334. Xdisplay version identification information
  1335. X.TP
  1336. X.B \-h
  1337. X.TP 1i
  1338. X.B \-a
  1339. Xsort in ascending order, rather than descending.
  1340. X.TP
  1341. X.B \-n
  1342. Xsort by name (over-rides following options).
  1343. X.TP
  1344. X.BR \-b [ r|x|b ]
  1345. Xsort by number of bytes \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth.
  1346. X.TP
  1347. X.BR \-c [ r|x|b ]
  1348. Xsort by transfer rate \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth.
  1349. X.TP
  1350. X.BR \-f [ r|x|b ]
  1351. Xsort by number of files \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth.
  1352. X.TP
  1353. X.BR \-t [ r|x|b ]
  1354. Xsort by connect time in \fBR\fPeceived, transmitted(\fBX\fP), or \fBB\fPoth.
  1355. Xdisplay a more verbose help message
  1356. X.SH EXAMPLES
  1357. X.eP "uutraf \-bb"
  1358. Xwill display the total bytes transferred, in descending order.  (This is
  1359. Xthe default.)
  1360. X.PP
  1361. X.eP "uutraf \-cx"
  1362. Xwill display the connections with the fastest transfer rates, in
  1363. Xdescending order.
  1364. X.PP
  1365. X.eP "uutraf \-tba"
  1366. Xwill display the connections by total amount of transfer time, in
  1367. Xascending sort order.
  1368. X.\"
  1369. X.SH BUGS
  1370. XMultiple sorting options may not work as you would hope, and the
  1371. Xsorting option syntax goes against de-facto rules for option syntax.
  1372. X.PP
  1373. XThe
  1374. X.B \-s
  1375. Xoption is redundant.  ('-' is also valid)
  1376. XThe
  1377. X.B \-H
  1378. Xoption alone does nothing with the standard defaults (it is default!).
  1379. XThe
  1380. X.B \-M
  1381. Xoption alone does imply
  1382. X.B \-N
  1383. Xbut does not automatically supplement the standard defaults.
  1384. X.PP
  1385. XThere is no header part in the totals summary, and no way to get the
  1386. Xdescriptive text to go away leaving only the numbers.
  1387. X.PP
  1388. XThe field widths and formats are all fixed.
  1389. X.\"
  1390. X.SH NOTES
  1391. XULTRIX (and presumably other 4BSD) UUCP's don't report fractions of a
  1392. Xsecond, and thus high-speed links may report incorrect average
  1393. X.PP
  1394. XULTRIX (and presumably other 4BSD) UUCP's don't report the device
  1395. Xname, and thus all options and reports referring to ports are not
  1396. Xavailable.  Connection counts are not available either, as the
  1397. Xprocess-ID's are not reported.
  1398. X.PP
  1399. XTransfer times alone do not necessarily reflect true port utilisation.
  1400. XWith HDB-UUCP's log it is likely possible to deduce the amount of time
  1401. Xspent between jobs, but not the amount of dial and/or disconnect time.
  1402. X.PP
  1403. XSome
  1404. X.IR uucico 's
  1405. Xskew transfer times and transfer rates by not resetting their timers
  1406. Xat the appropriate point.  In this case, and in the case where the
  1407. Xsender must wait for a slow receiver to checksum the data before
  1408. Xcompleting the job, the transfer rates will not be representative of
  1409. Xthe low-level throughput on the port.  Modems that spoof UUCP's
  1410. Xprotocol, and/or contain large buffers will also skew these figures.
  1411. X.PP
  1412. XAlthough HDB-UUCP's log files format transfer times in milli-seconds,
  1413. Xmost UNIX systems do not have timer resolutions better than one
  1414. Xhundredth's of a second.  Small jobs, or high transfer rates, will
  1415. Xthen have in-accurate transfer times, and thus incorrect average
  1416. Xtransfer rates.
  1417. X.PP
  1418. XComments and bug reports are welcomed.  Please send them to
  1419. X.eP <woods@robohack.uucp>
  1420. Xor
  1421. X.eP <woods@Elegant.COM> .
  1422. X.\"
  1423. X.SH AUTHORS
  1424. XGreg Hackney
  1425. X.eP <hack@texbell.swbt.com>
  1426. X\- wrote the original.
  1427. X.br
  1428. XGreg A. Woods
  1429. X.eP <woods@robohack.uucp>
  1430. X\- wrote the
  1431. X.B dlst
  1432. Xlibrary, added new features.
  1433. X.\"
  1434. X.SH CONTRIBUTORS
  1435. XDoug Davis
  1436. X.eP <doug@letni.uucp> ,
  1437. XDavid Butler
  1438. X.eP <gdb@ninja.uucp> ,
  1439. XBud Hovell
  1440. X.eP <bhh@whizz.uucp> ,
  1441. XDavid Kaelbing
  1442. X.eP <drk@igor.uu.net> ,
  1443. XJoe Garvey
  1444. X.eP <garvey%cmic@mips.com> ,
  1445. XD'Arcy Cain
  1446. X.eP <darcy@druid.com> ,
  1447. XGeorg S. Nikodym
  1448. X.eP <georgn@noweh.com> ,
  1449. XBill Duncan
  1450. X.eP <bduncan@ve3ied.uucp> ,
  1451. XRobert Story
  1452. X.eP <rstory@elegant.com>
  1453. X.\"
  1454. X.SH VERSION
  1455. X.eP "\\*(iD
  1456. X
  1457. END_OF_FILE
  1458. if test 6276 -ne `wc -c <'uutraf.1'`; then
  1459.     echo shar: \"'uutraf.1'\" unpacked with wrong size!
  1460. fi
  1461. # end of 'uutraf.1'
  1462. fi
  1463. if test -f 'uutraf.h' -a "${1}" != "-c" ; then 
  1464.   echo shar: Will not clobber existing file \"'uutraf.h'\"
  1465. else
  1466. echo shar: Extracting \"'uutraf.h'\" \(4183 characters\)
  1467. sed "s/^X//" >'uutraf.h' <<'END_OF_FILE'
  1468. X/*
  1469. X *    uutraf.h - common header for uutraf
  1470. X */
  1471. X
  1472. X#define SID_H    "@(#)uutraf:uutraf.h    1.2.2.7    92/10/23 10:26:35 (woods)"
  1473. X#define SID_NM    uutraf_sccsid
  1474. X#include <sccsid.h>
  1475. X
  1476. X/*
  1477. X * these defines are part of the sort routine to figure out how to sort the
  1478. X * linked list
  1479. X */
  1480. X#define REVERSE  00001  /* reverse the order, least to most */
  1481. X#define RECEIVED 00002  /* sort by received */
  1482. X#define XMIT     00004  /* sort by xmit */
  1483. X#define R_TIME   00010  /* sort by received time */
  1484. X#define X_TIME   00020  /* sort by xmit time */
  1485. X#define R_CPS    00100  /* sort by characters RECEIVED per second */
  1486. X#define X_CPS    00200  /* sort by characters TRANSMITTED per second */
  1487. X#define R_NUMB   01000  /* sort by number of RECEIVED transactions */
  1488. X#define X_NUMB   02000  /* sort by number of TRANSMITTED transactions */
  1489. X
  1490. X/*
  1491. X * print options
  1492. X */
  1493. X#define HEADERS        001
  1494. X#define SYS_RPT        002
  1495. X#define PORT_RPT    004
  1496. X#define SUMM_RPT    010
  1497. X#define SYSBYPORT_OPT    020
  1498. X
  1499. X/*
  1500. X * other various things
  1501. X */
  1502. X#ifdef HAVE_HDBUUCP        /* Most BNU (aka. HDB) systems */
  1503. X# define OUT    "->"  /*uucp flow direction indicator*/
  1504. X# define IN    "<-"  /*uucp flow direction indicator*/
  1505. X#else                /* Most "old" UUCP's (i.e. with SYSLOG) */
  1506. X# define OUT    "sent"
  1507. X# define IN    "received"
  1508. X#endif
  1509. X
  1510. X#ifdef pyr    /* UUCP via TCP/IP on an ATT Pyramid */
  1511. X#define T_OUT    "t->"  /* t protocol outgoing */
  1512. X#define T_IN    "t<-"  /* t protocol incoming */
  1513. X#define F_OUT    "f->"  /* f protocol outgoing */
  1514. X#define F_IN    "f<-"  /* f protocol incoming */
  1515. X#endif
  1516. X
  1517. X/*
  1518. X * structures for storing totals and summary results
  1519. X */
  1520. Xtypedef struct port {
  1521. X    long        p_xmit;        /* # of bytes sent on this device */
  1522. X    float        p_xmit_time;    /* total seconds xmit'ing on this device */
  1523. X    long        p_xmit_cnt;    /* total number of files sent */
  1524. X    long        p_recv;        /* # of bytes rec'd on this device */
  1525. X    float        p_recv_time;    /* total seconds rec'ing on this device */
  1526. X    long        p_recv_cnt;    /* total number of files received */
  1527. X    int        p_in_conn;    /* total number of slave connections */
  1528. X    int        p_out_conn;    /* total number of master connections */
  1529. X    int        p_lastpid;    /* pid found in previous data line */
  1530. X    llst_t        *p_syslst;    /* per-system summary */
  1531. X    char        p_dname[NAME_MAX + 1];    /* device name (not path) */
  1532. X} PORT;
  1533. X
  1534. Xtypedef struct link {
  1535. X    long        l_xmit;        /* # of bytes sent to remote system */
  1536. X    float        l_xmit_time;     /* total seconds spent in transmit */
  1537. X    long        l_xmit_cnt;    /* total number of files sent */
  1538. X    long        l_recv;        /* # of bytes rec'd from remote system */
  1539. X    float        l_recv_time;     /* total seconds spent in receive */
  1540. X    long        l_recv_cnt;    /* total number of files received */
  1541. X    int        l_in_conn;    /* total number of slave connections */
  1542. X    int        l_out_conn;    /* total number of master connections */
  1543. X    int        l_lastpid;    /* pid found in previous data line */
  1544. X    llst_t        *l_portlst;    /* per-port summary */
  1545. X    char        l_sysname[1];    /* name of remote system */
  1546. X} LINK;
  1547. X
  1548. Xtypedef struct summ {
  1549. X    int        syscnt;        /* total active sites */
  1550. X    int        devcnt;        /* total active ports */
  1551. X    long        bytes_recv;    /* total bytes received */
  1552. X    long        bytes_xmit;    /* total bytes transmitted */
  1553. X    float        sec_recv;    /* total seconds spent in receive */
  1554. X    float        sec_xmit;    /* total seconds spent in transmit */
  1555. X    long        num_recv;    /* total number of files received */
  1556. X    long        num_xmit;    /* total number of files transmitted */
  1557. X    long        num_in_conn;    /* total number of slave connections */
  1558. X    long        num_out_conn;    /* total number of master connections */
  1559. X    struct tm    first_rec;    /* timestamp in first record seen */
  1560. X    struct tm    last_rec;    /* timestamp in last record seen */
  1561. X} SUMM;
  1562. X
  1563. Xstatic
  1564. Xchar usage[]="\n\
  1565. X\t-H\tinclude headers in non-default report\n\
  1566. X\t-M\tprint merged port summary by system (implies -N)\n\
  1567. X\t-N\tprint nodes summary\n\
  1568. X\t-P\tprint ports summary\n\
  1569. X\t-S\tprint total summary\n\
  1570. X\t-V\tprint version identification\n\
  1571. X\t-a\tsort in ascending vs. descending order\n\
  1572. X\t-b[rxb]\tsort by total bytes rec'd, xmit'ed, or both\n\
  1573. X\t-c[rxb]\tsort by chars per second rec'd, xmit'ed, or both\n\
  1574. X\t-f[rxb]\tsort by # of files rec'd, xmit'ed, or both\n\
  1575. X\t-h\tprint this help message\n\
  1576. X\t-n\tsort by {system,port} name (must be used alone)\n\
  1577. X\t-s\tuse standard input instead of default xferstats file\n\
  1578. X\t-t[rxb]\tsort by total clock time in rec, xmit, or both\n";
  1579. END_OF_FILE
  1580. if test 4183 -ne `wc -c <'uutraf.h'`; then
  1581.     echo shar: \"'uutraf.h'\" unpacked with wrong size!
  1582. fi
  1583. # end of 'uutraf.h'
  1584. fi
  1585. if test -f 'version.c' -a "${1}" != "-c" ; then 
  1586.   echo shar: Will not clobber existing file \"'version.c'\"
  1587. else
  1588. echo shar: Extracting \"'version.c'\" \(172 characters\)
  1589. sed "s/^X//" >'version.c' <<'END_OF_FILE'
  1590. X/*
  1591. X *    version.c
  1592. X */
  1593. X
  1594. X#define SID    "@(#)uutraf:version.c    1.1    92/10/12 15:09:06 (woods)"
  1595. X#include <sccsid.h>
  1596. X
  1597. X#include "patchlevel.h"
  1598. X#include <intern.h>
  1599. X#include "version.h"
  1600. END_OF_FILE
  1601. if test 172 -ne `wc -c <'version.c'`; then
  1602.     echo shar: \"'version.c'\" unpacked with wrong size!
  1603. fi
  1604. # end of 'version.c'
  1605. fi
  1606. if test -f 'version.h' -a "${1}" != "-c" ; then 
  1607.   echo shar: Will not clobber existing file \"'version.h'\"
  1608. else
  1609. echo shar: Extracting \"'version.h'\" \(454 characters\)
  1610. sed "s/^X//" >'version.h' <<'END_OF_FILE'
  1611. X/*
  1612. X *    version.h
  1613. X */
  1614. X
  1615. X#define SID_H    "@(#)uutraf:version.h    1.2    92/10/12 16:06:30 (woods)"
  1616. X#define SID_NM    version_sccsid
  1617. X#include <sccsid.h>
  1618. X
  1619. X/*
  1620. X * const: readonly type qualifier (use may break some pre-ANSI compilers!)
  1621. X */
  1622. X#if (__STDC__ - 0) == 0 && !defined(const)
  1623. X# define const    /* Only in ANSI C.  Pity */
  1624. X#endif    /* !__STDC__ */
  1625. X
  1626. XEXT const short    version        INIT(VER_ID);
  1627. XEXT const short    subver        INIT(VER_SUB);
  1628. XEXT const short    patchlevel    INIT(PATCHLEVEL);
  1629. END_OF_FILE
  1630. if test 454 -ne `wc -c <'version.h'`; then
  1631.     echo shar: \"'version.h'\" unpacked with wrong size!
  1632. fi
  1633. # end of 'version.h'
  1634. fi
  1635. echo shar: End of archive 1 \(of 4\).
  1636. cp /dev/null ark1isdone
  1637. MISSING=""
  1638. for I in 1 2 3 4 ; do
  1639.     if test ! -f ark${I}isdone ; then
  1640.     MISSING="${MISSING} ${I}"
  1641.     fi
  1642. done
  1643. if test "${MISSING}" = "" ; then
  1644.     echo You have unpacked all 4 archives.
  1645.     echo "Please read the file README first"
  1646.     rm -f ark[1-9]isdone
  1647. else
  1648.     echo You still need to unpack the following archives:
  1649.     echo "        " ${MISSING}
  1650. fi
  1651. ##  End of shell archive.
  1652. exit 0
  1653.