wireshark.org protocol dissector with Osmocom additions
Go to file
Guy Harris 86bf1fc851 Add support to wiretap for reading Sun "snoop" capture files.
That requires that, in the packet-reading loop, we pass to the callback
routine the offset in the file of a packet's data, because we can no
longer compute that offset by subtracting the size of the captured
packet data from the offset in the file after the data was read -
"snoop" may stick padding in after the packet data to align packet
headers on 4-byte boundaries.

Doing that required that we arrange that we do that for "libpcap"
capture files as well; the cleanest way to do that was to write our own
code for reading "libpcap" capture files, rather than using the
"libpcap" code to do it.

Make "wtap_dispatch_cb()" and "pcap_dispatch_cb()" static to "file.c",
as they're not used elsewhere.

If we're using wiretap, don't define in "file.h" stuff used only when
we're not using wiretap.

Update the wiretap README to reflect Gilbert's and my recent changes.

Clean up some memory leaks in "wiretap/lanalyzer.c" and
"wiretap/ngsniffer.c", where the capture-file-format-specific data
wasn't freed if the open failed.

svn path=/trunk/; revision=91
1998-11-15 05:29:17 +00:00
doc * Pod page update 1998-10-13 02:10:57 +00:00
image * Copied in the correct GNU license (I'm such a goober) 1998-10-16 01:18:35 +00:00
wiretap Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
AUTHORS I added the LANalzyer file format to wiretap. I cleaned up some code in the 1998-11-12 06:01:27 +00:00
COPYING * Copied in the correct GNU license (I'm such a goober) 1998-10-16 01:18:35 +00:00
ChangeLog Initial revision 1998-09-16 02:39:15 +00:00
INSTALL Initial revision 1998-09-16 02:39:15 +00:00
Makefile.am I added the LANalzyer file format to wiretap. I cleaned up some code in the 1998-11-12 06:01:27 +00:00
Makefile.in Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
NEWS * Copied in the correct GNU license (I'm such a goober) 1998-10-16 01:18:35 +00:00
README I added the LANalzyer file format to wiretap. I cleaned up some code in the 1998-11-12 06:01:27 +00:00
VERSION * Pod page update 1998-10-13 02:10:57 +00:00
acconfig.h Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
aclocal.m4 Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
capture.c Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
capture.h Changes to capture.c and capture.h to support more detail in the capture 1998-09-29 21:39:29 +00:00
config.guess * Scripts needed for configure.in 1998-09-20 00:25:16 +00:00
config.h.in Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
config.sub * Scripts needed for configure.in 1998-09-20 00:25:16 +00:00
configure Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
configure.in Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
ethereal.1 * Pod page update 1998-10-13 02:10:57 +00:00
ethereal.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
ethereal.h * Copied in the correct GNU license (I'm such a goober) 1998-10-16 01:18:35 +00:00
ethertype.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
etypes.h * Added Don Lafontaine's support for Banyan Vines. 1998-09-17 02:37:47 +00:00
file.c Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
file.h Add support to wiretap for reading Sun "snoop" capture files. 1998-11-15 05:29:17 +00:00
filter.c * Copied in the correct GNU license (I'm such a goober) 1998-10-16 01:18:35 +00:00
filter.h * Pod page update 1998-10-13 02:10:57 +00:00
follow.c Use "memcpy()" rather than "bcopy()", to eliminate one "gcc -Wall" 1998-10-28 01:29:16 +00:00
follow.h Merged in a _huge_ patch from Guy Harris. It adds a time stap column, 1998-09-27 22:12:47 +00:00
install-sh Initial revision 1998-09-16 02:39:15 +00:00
manuf *** empty log message *** 1998-09-27 07:13:29 +00:00
menu.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
menu.h - Added match_strval function to packet.c 1998-10-12 01:40:57 +00:00
missing Initial revision 1998-09-16 02:39:15 +00:00
mkinstalldirs Initial revision 1998-09-16 02:39:15 +00:00
packet-aarp.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-arp.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-atalk.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-bootp.c Added a patch to wiretap from Guy Harris to help compile wiretap in 1998-11-12 21:39:22 +00:00
packet-data.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-dns.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-dns.h Needed for common routines between DNS and NBNS. 1998-10-14 20:03:03 +00:00
packet-eth.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-fddi.c We have to include <sys/types.h>, if we have it, to declare "u_char", as 1998-11-12 21:22:47 +00:00
packet-ip.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-ipv6.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-ipv6.h Initial revision 1998-09-16 02:39:15 +00:00
packet-ipx.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-ipx.h I've started to figure out the difference between NetBIOS over IPX for 1998-10-14 05:18:32 +00:00
packet-llc.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-lpd.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-nbipx.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-nbns.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-ncp.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-ncp.h An NCP READ is now decoded. This is the first function to be decoded. 1998-10-22 04:50:21 +00:00
packet-null.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-osi.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-ospf.c Add a "val_to_str()" routine that calls "match_strval()" and, if 1998-10-20 05:31:03 +00:00
packet-ospf.h structure for AS-external LSA added. 1998-09-29 21:32:46 +00:00
packet-ppp.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-raw.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-rip.c Merged in a _huge_ patch from Guy Harris. It adds a time stap column, 1998-09-27 22:12:47 +00:00
packet-rip.h Initial revision 1998-09-16 02:39:15 +00:00
packet-tcp.c Add a routine to dissect IP or TCP options (and, from a look at RFC 1998-10-13 05:40:04 +00:00
packet-tr.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-trmac.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-udp.c Don't assume the UDP header is always properly aligned (sometimes it 1998-10-14 08:47:16 +00:00
packet-vines.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet-vines.h * Added Don Lafontaine's support for Banyan Vines. 1998-09-17 02:37:47 +00:00
packet.c A lengthy patch to add the wiretap library. Wiretap is not used by default 1998-11-12 00:06:47 +00:00
packet.h Add a routine to convert Ethernet packet types to strings. 1998-11-03 07:45:10 +00:00
prefs.c * Fixes for problems with the preference initialization code (Guy) 1998-10-29 15:59:00 +00:00
prefs.h * Added preference file saves and reads. 1998-10-28 21:38:11 +00:00
print.c * Added preference file saves and reads. 1998-10-28 21:38:11 +00:00
print.h * Added preference file saves and reads. 1998-10-28 21:38:11 +00:00
print.ps Re-added fixes after cvs tree was changed. 1998-09-17 03:29:28 +00:00
ps.h Added ID tags to the beginning of each source file. 1998-09-16 03:22:19 +00:00
rdps.c Added ID tags to the beginning of each source file. 1998-09-16 03:22:19 +00:00
resolv.c Merged in a _huge_ patch from Guy Harris. It adds a time stap column, 1998-09-27 22:12:47 +00:00
resolv.h * Ethernet manufacturer support (Laurent) 1998-09-25 23:24:07 +00:00
snprintf-imp.h Squelch a number of "-Wall" errors by: 1998-10-13 07:03:37 +00:00
snprintf.c * Fix for unsigned overflows on Solaris 1998-11-08 00:05:45 +00:00
snprintf.h Squelch a number of "-Wall" errors by: 1998-10-13 07:03:37 +00:00
stamp-h.in Initial revision 1998-09-16 02:39:15 +00:00
util.c * Aligned the icon with the top edge of the dialog. 1998-10-28 21:22:33 +00:00
util.h * Copied in the correct GNU license (I'm such a goober) 1998-10-16 01:18:35 +00:00

README

General Information
------- -----------

Ethereal is a network traffic analyzer for Unix-ish operating systems.
It is based on GTK+, a graphical user interface library, and libpcap,
a packet capture and filtering library.

The official home of Ethereal is

    http://ethereal.zing.org

The latest distribution can be found in the subdirectory

    http://ethereal.zing.org/distribution


Installation
------------

Ethereal is known to compile and run under Linux (2.0.35) and Solaris
(2.6).  It should run on other systems without too much trouble.


Installation Checklist (Short):

  [ ] 1. Unpack the archive.

  [ ] 2. Run './configure; make; make install; make install-man'.
         If there are any problems, read on:


Installation Checklist (Long):

  [ ] 0. This is alpha software.  Beware.
  
  [ ] 1. Make sure you have GTK+ installed.  Try running 'gtk-config
         --version'.  If you need to install/reinstall GTK, you can find
         it at

         http://www.gtk.org .

         Ethereal should work with the latest stable (1.0.x) version, but
         I've had reports that it doesn't compile with the development
         (1.1.x) tree.

  [ ] 2. Make sure you have libpcap installed.  The latest version can be
         found at
          
         ftp://ftp.ee.lbl.gov .

         Make sure you install the headers ('make install-incl') when you
         install the library.

  [ ] 3. Run './configure' in the Ethereal distribution directory.
         Running './configure --help' displays a list of options.
         The file 'INSTALL' contains general instructions for running
         'configure'.

         Ethereal installs a support file (manuf) in /usr/local/etc by
         default.  You can change this location with the --sysconfdir
         option.

  [ ] 4. Run 'make'.  Hopefully, you won't run into any problems.

  [ ] 5. Run './ethereal', and make sure things are working.  You must
         have root privileges in order to capture live data.

  [ ] 6. Run 'make install'.  If you wish to install the man page, run
         'make install-man'.  You're done.

         
Usage
-----          

In order to capture packets from the network, you need to be running
as root.  Although it might be tempting to make the Ethereal executable
setuid root, please don't - alpha code is by nature not very robust, and
liable to contain security holes.

The filtering mechanism is far from complete.  Until the interface
solidifies, here's a description of what each component of the filter
dialog:

  - 'Filter name' entry: Gives a name to the filter you are about to create
    or modify, e.g. 'Web and DNS traffic'
    
  - 'Filter string' entry: The text describing the filtering action to
    take.  It must have the same format as tcpdump filter strings (both
    programs use the same underlying library), e.g. 
    
    'tcp port 80 or tcp port 443 or port 53'

  - 'New' button: If there is text in the two entry boxes, adds it to the
    list.
    
  - 'Change' button: Modifies the currently selected list item to match
    what's in the two entry boxes.
    
  - 'Copy' button: Makes a copy of the currently-selected list item.
  
  - 'Delete' button: Deletes the currently-selected list item.
  
  - 'OK' button: Sets the selected list item as the active filter.  If
    nothing is selected, turns filtering off.
    
  - 'Save' button: Saves the current filter list in
    $HOME/.ethereal/filters.
    
  - 'Cancel' button: Closes the window without making changes.


Multiple File Types
-------------------

The wiretap library is a packet-capture library currently under development
parallel to ethereal. In the future it is hoped that wiretap will have more
features than libpcap, but wiretap is still in its infancy. You can compile
ethereal with the wiretap library by using './configure --with-wiretap'. Using
wiretap will allow you to read pcap, Sniffer, and LANalyzer trace files, but
it disables display filters. You can still capture packets from within
ethereal using libpcap, and therefore use libpcap-style capture filters,
however.

If you can live without display filters and would like to read non-pcap
capture files, give wiretap a try. If you want to add support for other
packet-capture file formats, please look at the wiretap source code in the
wiretap directory.

Please report any problems that are wiretap related to
Gilbert Ramirez <gram@verdict.uthscsa.edu>. He uses token-ring at work, so he
is especially interested in any non-token-ring trace files you can send him.


Disclaimer
----------

There is no warranty, expressed or implied, associated with this product.
Use at your own risk.