Peeping Tom Peeping Tom is an Omninet network monitor station. It consists of an Omninet Transporter with a custom 68701 and a Pascal program that runs in the host computer. The ROM code in the custom 68701 (version PT0.6) allows the Transporter to operate in a "promiscuous mode" such that it can receive any packet that is transmitted on the network regardless of the destination address. The Pascal program presents the data aquired from the Peeping Tom Transporter in a meaningful way. The user may watch the packets go by in "real time", or gather a bunch of data, save it in a file, and evaluate it at a later time. Peeping Tom runs on Apple II computers. Apples were chosen because of their low cost, availability, direct DMA capability, and the fact that they can easily support multiple Omninet Transporters or a Transporter and another disk device. The Peeping Tom Transporter cannot send and receive messages in the normal manner, so it cannot be used to communicate with a shared disk on the network. The Apple which runs Peeping Tom must boot from a local disk or use two Transporters - one to communicate with a disk on the net and one for the Peeping Tom function. Peeping Tom is very useful for debugging Omninet based software and in some cases, isolating network faults. Future versions will gather network performance statistics and may even be used at end user sites. The current version is primarily a debugging tool for the software designer. It can be used to determine the order in which messages are sent, and verify that the destination, length etc. are correct. How does Peeping Tom work? The Pascal program, OMNIVIEW, manages a large ring buffer. OMNIVIEW sends commands to the Peeping Tom Transporter, PTOM, which specify the size and location of the ring buffer. PTOM will attempt to DMA the Omninet header of every packet into the ring buffer. OMNIVIEW has the ability to turn the DMA on and off, filter the incoming packet flow, and display the contents of the ring buffer. The ring buffer can store up to 1200 packet headers. When PTOM fills the last entry in the ring buffer, it starts filling at the beginning and may even write over entries which have not been seen by the user. {$P} OMNIVIEW will run on an Apple II computer under the UCSD Pascal operating system. The Peeping Tom Transporter should be in slot 2 of the Apple bus, and a disk device (floppy or Corvus hard disk) should be in slot 6. Omniview works best with an external terminal attached (via a serial card in slot 3) but the normal Apple keyboard and 40 column CRT may also be used. X(ecute OV (short for OMNIVIEW) and the following command line will appear: Omniview [3.0]: A)ck C)RC G)ather I)ndex P)age S)how W)rite Q)uit? The number in brackets is the version number, and it should be 3.0 or greater. To invoke one of the commands, simply type the first character of the command name - A for the Ack command, C for the CRC command etc. OMNIVIEW Commands: A)ck - This is a toggle. If acknowledgements are on, turn them off; if acknowledgements are off, turn them on. The default is acks off, which means only messages, SYNC packets or ECHO packets will be saved in the ring buffer (or displayed on the screen). Each time the Ack command is invoked, it displays a message indicating whether Acks are now on or off. C)RC - Also a toggle. Used for controlling the display of damaged packets. The default value is CRC off, which means packets with CRC errors will not be saved in the ring buffer. When the CRC option is turned on, damaged packets will be saved and marked as such. When an entry in the ring buffer is marked as damaged, its contents cannot be trusted. In fact, when CRC is on, random noise on the network can cause some entries.... G)ather - Put OMNIVIEW in gather mode, which means save packet headers in the ring buffer but don't display them on the screen. This is described in more detail below. I)ndex - Print the current ring buffer index. This is the index of the last entry which was filled. This can be used in conjunction with the Page command described below... to view the most recent entries in the ring buffer. P)age - Display a page of information (21 entries) from the ring buffer. The entry shown on the bottom of the screen is the most recent. The page command prompts the user for a buffer index. This is the index of the entry which will be displayed on the bottom of the screen. On successive Page commands, the default value of the buffer index is the last entry of the previous page... {$P} OMNIVIEW Commands continued: S)how - Attempt to display the packets on the screen as they go by on the network. Since updating the screen is a very slow operation relative to the one megabit data rate of Omninet, there may be a loss of information during periods of heavy traffic. W)rite - Save the contents of the ring buffer in a text file. the user may specify the ending index and the number of entries to be saved. Q)uit - Exit the program and return to the operating system. There are two basic modes of operation for OMNIVIEW - Show or Gather. The only way to fill the ring buffer with Omninet header information is via the Gather or Show commands. Gather mode is better for debugging, since it will not miss any of the packets which were transmitted (with the exception of an occasional ACK). Show mode is useful for demos, when you want to show the boss that messages really are travelling back and forth on that little wire. Figures 1 and 2 are examples of the OMNIVIEW display. All numbers are hexadecimal. At the top of each page the names of the fields of a message header are displayed. An entry which is a message header has the values for the header fields displayed. All other entries include some text which describes the entry - ACK, SYNC PACKET etc... The first column of a message entry is the value of its PARITY field. In a normal packet exchange, the parity bit should alternate. If CRCs are turned on and a damaged packet is received, it is marked by an asterisk. Figure 1 shows a sequence which occurred when host 33 was powered on. As part of the Transporter RESET sequence, several SYNC packets are transmitted (A). Host 33 then ECHOed to its own host number to make sure that no other stations had the same number (B). A typical server/client exchange follows (C) after the host broadcasts a message (DESTINATION = FF) to find out the location of the server. {$P} Some error conditions and special cases are illustrated in figure 2. ECHO ACKS and negative acknowledgements (NAKs) are shown in section A, and an un-acknowledged message is depicted in section B. Note that the socket number is 98 instead of 90. This is normal, and has to do with the internal implementation of the Transporter. Every time a message has a zero length user header, the socket number which is transmitted in the Omninet header portion of the packet is 8 greater than the socket number which the sending station specified. Section C shows an ACK with a bad CRC. A message was transmitted successfully from host 33 to host C, but the ACK was ignored since it had a bad CRC. Host 33 sent the same message again (since it did not receive a valid ACK) and host C recognized that it had already received the message, so it sent a duplicate ack. The double lines at the bottom of the page indicate that the preceding entry was the last one which was filled. The Peeping Tom hardware consists of an Apple Transporter with a special version of the 6801. To modify a normal Apple Transporter, simply replace the 6801 chip (at location U5 on the PC board) with a 68701 which is labeled PT0.6. If you wish to run other programs on the same Apple it is suggested that you remove the Apple boot ROM (location U15 on the Transporter PC board) which is labeled AT1.8. This will prevent the Apple operating systems from trying to use the Peeping Tom Transporter as a disk device.