home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1893 / README < prev   
Encoding:
Text File  |  1990-12-28  |  1.1 KB  |  32 lines

  1. This directory contains some sample software to demonstrate the use
  2. of the packet filter.  The "ntrace" program functions as a rudimentary
  3. "LAN tracer", reporting the source and destination of each packet on the
  4. network. It only deals with IP packets on Ethernets, and is not meant
  5. to be actually useful for anything.
  6.  
  7. Since this depends on using promiscuous-mode access to the Ethernet,
  8. you'll have to do
  9.     /etc/pfconfig +p pf0
  10. (as super-user) before you can get anything useful.  Maybe you'll want
  11. to put this into /etc/rc.local?
  12.  
  13. The main program is "ntrace", usage:
  14.     ntrace pf0 [-debug] [-multicast] [-broadcast] [-w filename]
  15.  
  16.     INTR to get current stats, QUIT to get out
  17.  
  18. With no options, it just sort of runs.  With -debug, the packet header
  19. addresses are dumped on the terminal.  With -w, info records are written
  20. to the specified file, which can then be read using the ptrace program.
  21.  
  22. E.g.,
  23.  
  24.     ntrace pf0 -w foo
  25.     (wait a while, type ^\)
  26.     ptrace <foo
  27.  
  28. The output format is
  29.     (612569015.836210) UDP [128.45.1.115/513] -> [128.45.1.255/513]
  30.     timestamp     proto  src address/port      dest address/port
  31.     seconds.usecs
  32.