=head1 NAME ethereal - Interactively browse network traffic =head1 SYNOPSYS B S<[ B<-a> capture autostop condition ] ...> S<[ B<-b> number of ring buffer files ]> S<[ B<-B> byte view height ]> S<[ B<-c> count ]> S<[ B<-f> capture filter expression ]> S<[ B<-h> ]> S<[ B<-i> interface ]> S<[ B<-k> ]> S<[ B<-l> ]> S<[ B<-m> font ]> S<[ B<-n> ]> S<[ B<-N> resolving flags ] > S<[ B<-o> preference setting ] ...> S<[ B<-p> ]> S<[ B<-P> packet list height ]> S<[ B<-Q> ]> S<[ B<-r> infile ]> S<[ B<-R> display filter expression ]> S<[ B<-S> ]> S<[ B<-s> snaplen ]> S<[ B<-T> tree view height ]> S<[ B<-t> time stamp format ]> S<[ B<-v> ]> S<[ B<-w> savefile]> S<[ B<-z> statistics-string ]> S<[ infile ]> =head1 DESCRIPTION B is a GUI network protocol analyzer. It lets you interactively browse packet data from a live network or from a previously saved capture file. B's native capture file format is B format, which is also the format used by B and various other tools. In addition, B can read capture files from B and B, Shomiti/Finisar B, Novell B, Network General/Network Associates DOS-based B (compressed or uncompressed), Microsoft B, AIX's B, Cinco Networks B, Network Associates Windows-based B, AG Group/WildPackets B/B/B, B's WAN/LAN analyzer, B router debug output, HP-UX's B, the dump output from B ISDN routers, the output from B from the ISDN4BSD project, the output in B format from the Cisco Secure Intrusion Detection System, B (pppdump format), the output from VMS's B utility, the text output from the B VMS utility, traffic capture files from Visual Networks' Visual UpTime, and the output from B L2 debug. There is no need to tell B what type of file you are reading; it will determine the file type by itself. B is also capable of reading any of these file formats if they are compressed using gzip. B recognizes this directly from the file; the '.gz' extension is not required for this purpose. Like other protocol analyzers, B's main window shows 3 views of a packet. It shows a summary line, briefly describing what the packet is. A protocol tree is shown, allowing you to drill down to exact protocol or field that you interested in. Finally, a hex dump shows you exactly what the packet looks like when it goes over the wire. In addition, B has some features that make it unique. It can assemble all the packets in a TCP conversation and show you the ASCII (or EBCDIC, or hex) data in that conversation. Display filters in B are very powerful; more fields are filterable in B than in other protocol analyzers, and the syntax you can use to create your filters is richer. As B progresses, expect more and more protocol fields to be allowed in display filters. Packet capturing is performed with the pcap library. The capture filter syntax follows the rules of the pcap library. This syntax is different from the display filter syntax. Compressed file support uses (and therefore requires) the zlib library. If the zlib library is not present, B will compile, but will be unable to read compressed files. The pathname of a capture file to be read can be specified with the B<-r> option or can be specified as a command-line argument. =head1 OPTIONS =over 4 Most users will want to start B without options and configure it from the menus instead. Those users may just skip this section. =item -a Specify a criterion that specifies when B is to stop writing to a capture file. The criterion is of the form IB<:>I, where I is one of: =for man .RS =for html

=item duration Stop writing to a capture file after I seconds have elapsed. =item filesize Stop writing to a capture file after it reaches a size of I kilobytes (where a kilobyte is 1000 bytes, not 1024 bytes). =for man .RE =for html
=item -b If a maximum capture file size was specified, cause B to run in "ring buffer" mode, with the specified number of files. In "ring buffer" mode, B will write to several capture files; the name of the first file, while the capture is in progress, will be the name specified by the B<-w> flag, and subsequent files with have .I appended, with I counting up. When the first capture file fills up, B will switch to writing to the next file, until it fills up the last file, at which point it'll discard the data in the first file and start writing to that file. When that file fills up, B will discard the data in the next file and start writing to it, and so on. When the capture completes, the files will be renamed to have names based on the number of the file and on the date and time at which packets most recently started being written to the file. =item -B Set the initial height of the byte view (bottom) pane. =item -c Set the default number of packets to read when capturing live data. =item -f Set the capture filter expression. =item -h Print the version and options and exit. =item -i Set the name of the network interface or pipe to use for live packet capture. Network interface names should match one of the names listed in "B". If you're using Unix, "B" or "B" might also work to list interface names, although not all versions of Unix support the B<-a> flag to B. Pipe names should be either the name of a FIFO (named pipe) or ``-'' to read data from the standard input. Data read from pipes must be in standard libpcap format. =item -k Start the capture session immediately. If the B<-i> flag was specified, the capture uses the specified interface. Otherwise, B searches the list of interfaces, choosing the first non-loopback interface if there are any non-loopback interfaces, and choosing the first loopback interface if there are no non-loopback interfaces; if there are no interfaces, B reports an error and doesn't start the capture. =item -l Turn on automatic scrolling if the packet display is being updated automatically as packets arrive during a capture (as specified by the B<-S> flag). =item -m Set the name of the font used by B for most text. B will construct the name of the bold font used for the data in the byte view pane that corresponds to the field selected in the protocol tree pane from the name of the main text font. =item -n Disable network object name resolution (such as hostname, TCP and UDP port names). =item -N Turn on name resolving for particular types of addresses and port numbers, with name resolving for other types of addresses and port numbers turned off; the argument is a string that may contain the letters B to enable MAC address resolution, B to enable network address resolution, and B to enable transport-layer port number resolution. This overrides B<-n> if both B<-N> and B<-n> are present. =item -o Set a preference value, overriding the default value and any value read from a preference file. The argument to the flag is a string of the form IB<:>I, where I is the name of the preference (which is the same name that would appear in the preference file), and I is the value to which it should be set. =item -p I put the interface into promiscuous mode. Note that the interface might be in promiscuous mode for some other reason; hence, B<-p> cannot be used to ensure that the only traffic that is captured is traffic sent to or from the machine on which B is running, broadcast traffic, and multicast traffic to addresses received by that machine. =item -P Set the initial height of the packet list (top) pane. =item -Q Cause B to exit after the end of capture session (useful in batch mode with B<-c> option for instance); this option requires the B<-i> and B<-w> parameters. =item -r Read packet data from I. =item -R When reading a capture file specified with the B<-r> flag, causes the specified filter (which uses the syntax of display filters, rather than that of capture filters) to be applied to all packets read from the capture file; packets not matching the filter are discarded. =item -S Perform the live packet capture in a separate process, and automatically update the packet display as packets are seen. =item -s Set the default snapshot length to use when capturing live data. No more than I bytes of each network packet will be read into memory, or saved to disk. =item -T Set the initial height of the tree view (middle) pane. =item -t Set the format of the packet timestamp displayed in the packet list window. The format can be one of 'r' (relative), 'a' (absolute), 'ad' (absolute with date), or 'd' (delta). The relative time is the time elapsed between the first packet and the current packet. The absolute time is the actual time the packet was captured, with no date displayed; the absolute date and time is the actual time and date the packet was captured. The delta time is the time since the previous packet was captured. The default is relative. =item -v Print the version and exit. =item -w Set the default capture file name. =item -z Get B to collect various types of statistics and display the result in a window that updates in semi-real time. Currently implemented statistics are: B<-z> dcerpc,rtt,I,I.I[,I] Collect call/reply RTT data for DCERPC interface I, version I.I. Data collected is number of calls for each procedure, MinRTT, MaxRTT and AvgRTT. Example: use B<-z dcerpc,rtt,12345778-1234-abcd-ef00-0123456789ac,1.0> to collect data for CIFS SAMR Interface. This option can be used multiple times on the command line. If the optional filterstring is provided, the stats will only be calculated on those calls that match that filter. Example: use B<-z dcerpc,rtt,12345778-1234-abcd-ef00-0123456789ac,1.0,ip.addr==1.2.3.4> to collect SAMR RTT statistics for a specific host. B<-z> io,stat Collect frame/bytes statistics for the capture in intervals of 1 seconds. This option will open a window with up to 5 color-coded graphs where number-of-frames-per-second or number-of-bytes-per-second statistics can be calculated and displayed. This option can be used multiple times on the command line. This graph window can also be opened from the Tools:Statistics:Traffic:IO-Stat menu item. B<-z> rpc,rtt,I,I[,] Collect call/reply RTT data for I/I. Data collected is number of calls for each procedure, MinRTT, MaxRTT and AvgRTT. Example: use B<-z rpc,rtt,100003,3> to collect data for NFS v3. This option can be used multiple times on the command line. If the optional filter string is provided, the stats will only be calculated on those calls that match that filter. Example: use B<-z rpc,rtt,100003,3,nfs.fh.hash==0x12345678> to collect NFS v3 RTT statistics for a specific file. B<-z> rpc,programs Collect call/reply RTT data for all known ONC-RPC programs/versions. Data collected is number of calls for each protocol/version, MinRTT, MaxRTT and AvgRTT. B<-z> smb,rtt[,I] Collect call/reply RTT data for SMB. Data collected is number of calls for each SMB command, MinRTT, MaxRTT and AvgRTT. Example: use B<-z smb,rtt>. The data will be presented as separate tables for all normal SMB commands, all Transaction2 commands and all NT Transaction commands. Only those commands that are seen in the capture will have its stats displayed. Only the first command in a xAndX command chain will be used in the calculation. So for common SessionSetupAndX + TreeConnectAndX chains, only the SessionSetupAndX call will be used in the statistics. This is a flaw that might be fixed in the future. This option can be used multiple times on the command line. If the optional filterstring is provided, the stats will only be calculated on those calls that match that filter. Example: use B<-z "smb,rtt,ip.addr==1.2.3.4"> to only collect stats for SMB packets echanged by the host at IP address 1.2.3.4 . =back =head1 INTERFACE =head2 MENU ITEMS =over 4 =item File:Open, File:Close, File:Reload Open, close, or reload a capture file. The I dialog box allows a filter to be specified; when the capture file is read, the filter is applied to all packets read from the file, and packets not matching the filter are discarded. =item File:Save, File:Save As Save the current capture, or the packets currently displayed from that capture, to a file. Check boxes let you select whether to save all packets, or just those that have passed the current display filter and/or those that are currently marked, and an option menu lets you select (from a list of file formats in which at particular capture, or the packets currently displayed from that capture, can be saved), a file format in which to save it. =item File:Print Print, for all the packets in the current capture, either the summary line for the packet or the protocol tree view of the packet; when printing the protocol tree view, the hex dump of the packet can be printed as well. Printing options can be set with the I menu item, or in the dialog box popped up by this item. =item File:Print Packet Print a fully-expanded protocol tree view of the currently-selected packet. Printing options can be set with the I menu item. =item File:Quit Exit the application. =item Edit:Find Frame Search forward or backward, starting with the currently selected packet (or the most recently selected packet, if no packet is selected), for a packet matching a given display filter expression. =item Edit:Find Next Search forward, starting with the currently selected packet (or the most recently selected packet, if no packet is selected), for a packet matching the filter from the previous search. =item Edit:Find Previous Search backward, starting with the currently selected packet (or the most recently selected packet, if no packet is selected), for a packet matching the filter from the previous search. =item Edit:Go To Frame Go to a particular numbered packet. =item Edit:Mark Frame Mark (or unmark if currently marked) the selected packet. The field "frame.marked" is set for frames that are marked, so that, for example, a display filters can be used to display only marked frames, and so that the L menu item can be used to find the next or previous marked frame. =item Edit:Mark All Frames Mark all packets that are currently displayed. =item Edit:Unmark All Frames Unmark all packets that are currently displayed. =item Edit:Preferences Set the packet printing, column display, TCP stream coloring, and GUI options (see L<"Preferences"> below). =item Edit:Capture Filters Edit the saved list of capture filters, allowing filters to be added, changed, or deleted. =item Edit:Display Filters Edit the saved list of display filters, allowing filters to be added, changed, or deleted. =item Edit:Protocols Allow protocol dissection to be enabled or disabled for a specific protocol. Individual protocols can be enabled or disabled by clicking on them in the list or by highlighting them and pressing the space bar. The entire list can be enabled, disabled, or inverted using the buttons below the list. When a protocol is disabled, dissection in a particular packet stops when that protocol is reached, and Ethereal moves on to the next packet. Any higher-layer protocols that would otherwise have been processed will not be displayed. For example, disabling TCP will prevent the dissection and display of TCP, HTTP, SMTP, Telnet, and any other protocol exclusively dependent on TCP. =item Capture:Start Initiate a live packet capture (see L<"Capture Options"> below). A temporary file will be created to hold the capture. The location of the file can be chosen by setting your TMPDIR environment variable before starting B. Otherwise, the default TMPDIR location is system-dependent, but is likely either F or F. =item Capture:Stop In a capture that updates the packet display as packets arrive (so that Ethereal responds to user input other than pressing the "Stop" button in the capture packet statistics dialog box), stop the capture. =item Display:Options Pop up a dialog allowing you to set the format of the packet timestamp displayed in the packet list window to relative, absolute, absolute date and time, or delta, to enable or disable the automatic scrolling of the packet list while a live capture is in progress or to enable or disable translation of addresses to names in the display. =item Display:Match Create a display filter, or add to the display filter strip at the bottom, a display filter based on the data currently highlighted in the protocol tree, and apply the filter. If that data is a field that can be tested in a display filter expression, the display filter will test that field; otherwise, the display filter will be based on absolute offset within the packet, and so could be unreliable if the packet contains protocols with variable-length headers, such as a source-routed token-ring packet. The B option creates a display filter that tests for a match of the data; the B option creates a display filter that tests for a non-match of the data. The B, B, B, and B options add to the end of the display filter in the strip at the bottom an AND or OR operator followed by the new display filter expression. =item Display:Prepare Create a display filter, or add to the display filter strip at the bottom, a display filter based on the data currently highlighted in the protocol tree, but don't apply the filter. =item Display:Colorize Display Change the foreground and background colors of the packet information in the list of packets, based upon display filters. The list of display filters is applied to each packet sequentially. After the first display filter matches a packet, any additional display filters in the list are ignored. Therefore, if you are filtering on the existence of protocols, you should list the higher-level protocols first, and the lower-level protocols last. =item Display:Collapse All Collapse the protocol tree branches. =item Display:Expand All Expand all branches of the protocol tree. =item Display:Expand All Expands all branches of the protocol tree. =item Display:Show Packet In New Window Create a new window containing a protocol tree view and a hex dump window of the currently selected packet; this window will continue to display that packet's protocol tree and data even if another packet is selected. =item Display:User Specified Decodes Create a new window showing whether any protocol ID to dissector mappings have been changed by the user. This window also allows the user to reset all decodes to their default values. =item Tools:Plugins See what dynamically loadable dissector plugin modules have been loaded (see I<"Plugins"> below). =item Tools:Follow TCP Stream If you have a TCP packet selected, display the contents of the data stream for the TCP connection to which that packet belongs, as text, in a separate window, and leave the list of packets in a filtered state, with only those packets that are part of that TCP connection being displayed. You can revert to your old view by pressing ENTER in the display filter text box, thereby invoking your old display filter (or resetting it back to no display filter). The window in which the data stream is displayed lets you select whether to display: =over 4 =item whether to display the entire conversation, or one or the other side of it; =item whether the data being displayed is to be treated as ASCII or EBCDIC text or as raw hex data; =back =back =over 4 =item and lets you print what's currently being displayed, using the same print options that are used for the I menu item, or save it as text to a file. =back =item Tools:Decode As If you have a packet selected, present a dialog allowing you to change which dissectors are used to decode this packet. The dialog has one panel each for the link layer, network layer and transport layer protocol/port numbers, and will allow each of these to be changed independently. For example, if the selected packet is a TCP packet to port 12345, using this dialog you can instruct Ethereal to decode all packets to or from that TCP port as HTTP packets. =item Tools:Go To Corresponding Frame If a field in the protocol tree pane containing a frame number is selected, go to the frame number specified by that field. (This works only if the dissector that put that entry into the protocol tree put it into the tree as a filterable field rather than just as text.) This can be used, for example, to go to the frame for the request corresponding to a reply, or the reply corresponding to a request, if that frame number has been put into the protocol tree. =item Tools:Protocol Hierarchy Statistics Show the number of packets, and the number of bytes in those packets, for each protocol in the trace. It organizes the protocols in the same hierarchy in which they were found in the trace. Besides counting the packets in which the protocol exists, a count is also made for packets in which the protocol is the last protocol in the stack. These last-protocol counts show you how many packets (and the byte count associated with those packets) B in a particular protocol. In the table, they are listed under "End Packets" and "End Bytes". =item Tools:Statistics:ONC-RPC:RTT Open a window to display statistics for an arbitrary ONC-RPC program interface and display B, B, B, B and B for all procedures for that program/version. These windows opened will update in semi-real time to reflect changes when doing live captures or when reading new capture files into B. This dialog will also allow an optional filter string to be used. If an optional filter string is used only such ONC-RPC request/response pairs that match that filter will be used to calculate the statistics. If no filter string is specified all request/response pairs will be used. =item Tools:Statistics:ONC-RPC:Programs This dialog will open a window showing aggregated RTT statistics for all ONC-RPC Programs/versions that exist in the capture file. =item Tools:Statistics:DCE-RPC:RTT Open a window to display statistics for an arbitrary DCE-RPC program interface and display B, B, B, B and B for all procedures for that program/version. These windows opened will update in semi-real time to reflect changes when doing live captures or when reading new capture files into B. This dialog will also allow an optional filter string to be used. If an optional filter string is used only such DCE-RPC request/response pairs that match that filter will be used to calculate the statistics. If no filter string is specified all request/response pairs will be used. =item Tools:Statistics:Traffic:IO-Stat Open a window where up to 5 graphs in different colors can be displayed to indicate number of frames or number of bytes per second for all packets matching the specified filter. By default only one graph will be displayed showing number of frames per second. The top part of the window contains the graphs and scales for the X and Y axis. If the graph is too long to fit inside the window there is a horizontal scrollbar below the drawing area that can scroll the graphs to the left or the right. The horizontal axis displays the time into the capture and the vertical axis will display the measured quantity at that time. Below the drawing area and the scrollbar are the controls. On the bottom left there will be five similar sets of controls to control each induvidual graph such as "Display: