home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / networking / misc / sanamon.lha / sanamon.readme < prev    next >
Encoding:
Text File  |  1995-01-13  |  3.5 KB  |  83 lines

  1. Short: Simple SANA-2 packet monitor
  2. Type: comm/net
  3. Uploader: mlelstv@serpens.rhein.de
  4. Author: mlelstv@serpens.rhein.de
  5.  
  6. When debugging networks on UNIX machines you have a tool 'etherfind'
  7. or 'tcpdump' that can filter and print out packets on the network.
  8.  
  9. Sanamon is something similar but simpler, it asks the device driver
  10. for certain hardware packet types or orphan packets (i.e. packets
  11. that no other software is reading and that would be discarded).
  12.  
  13. Sanamon shows you the size and type of incoming packets and can
  14. print a hex dump of the packet's contents.
  15.  
  16. There is a problem with running sanamon concurrently with other
  17. networking software. As the SANA-2 specs only allow one reader to
  18. see a packet, sanamon will "steal" some packets and miss those
  19. that are passed to the other software.
  20.  
  21. The new 2.0 revision of SANA-2 supports "packet filters", with this
  22. it is possible to pass packets to multiple clients, so that your
  23. networkinng software and sanamon will see all packets.
  24. Unfortunately, very few SANA-2 drivers implement the packet filter option.
  25.  
  26. How to use sanamon:
  27.  
  28. >sanamon ?
  29.    DEVICE/A,UNIT/N,TYPE/N,LEN/N,DUMP/S,ORPHAN/S,NOFILTER/S: 
  30.  
  31. DEVICE    =  name of the SANA-2 device driver (like a2065.device).
  32. UNIT      =  driver unit, most drivers use unit 0 which is also the default.
  33. TYPE      =  packet type to read from the network. This depends on the
  34.              specific hardware and your networking software should have some
  35.              setting for the protocols it uses. Standard Ethernet uses
  36.              2048 for IP packets and 2054 for ARP packets. The default
  37.              is type 0.
  38. LEN       =  number of bytes to dump from each packet. This is ignored
  39.              if you don't give the DUMP option and the default is to
  40.              dump 16 bytes.
  41. DUMP      =  Turn on hex dump.
  42. ORPHAN    =  Don't look for the specific packet type but for any packet
  43.              not read by other software.
  44. NOFILTER  =  Don't use the SANA-2 V2.0 packet filter option. NOFILTER is
  45.              ignored by pre-2.0 drivers.
  46.  
  47. Example:
  48.  
  49. >sanamon ch2060.device dump
  50. listening to ch2060.device unit 0 for type 240, MTU = 507 bytes
  51. in 45 bytes, type=240, err=0, werr=0, HOST, 29->2a
  52. 45 00 00 2d 59 57 00 00 33 06 cc 30 86 68 14 03
  53. ....
  54.  
  55. I told sanamon to watch for IP packets (Internet Protocol on Arcnet uses
  56. type 240) on the ch2060.device, an alternative driver for the A2060 board.
  57.  
  58. The maximum packet size returned by the device is 507 bytes and the first
  59. packet seen by sanamon was 45 bytes long. The type was, of course, 240.
  60. You might see other types when you try to read orphan packets. The read
  61. did not return an error, otherwise werr would specify the exact error,
  62. see <devices/sana2.h> for details.
  63.  
  64. The packet was directed to a HOST, other drivers might also return BCAST
  65. or MCAST for broadcast and multicast packets. The last field on that line
  66. shows source and destination hardware addresses in hexadecimal, this packet
  67. was sent from address $29 == 41 to address $2a == 42. Other hardware might
  68. show larger addresses (e.g. Ethernet uses 6 bytes).
  69.  
  70. The next line shows the first 16 bytes of the packet.
  71.  
  72. 45           = IP protocol version 4 with a header size of 5 long words.
  73. 00           = no special service type
  74. 00 2d        = total length including the header is 45 bytes
  75. 59 57        = "unique" packet identification
  76. 00 00        = fragmentation offset and flags
  77. 33           = time to live
  78. 06           = IP protocol number 6 = TCP
  79. cc 30        = header checksum
  80. 86 68 14 03  = 134.104.20.3, the source address of this packet
  81.  
  82. Michael van Elst
  83.