Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal etypes.h packet-null.c packet-eth.c file.h

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Sat, 21 Aug 1999 19:47:53 -0500 (CDT)
guy         1999/08/21 19:47:51 CDT

  Modified files:
    .                    etypes.h packet-null.c packet-eth.c 
                         file.h file.c ethereal.h ethereal.c 
                         capture.c packet.c 
  Log:
  DLT_NULL, from "libpcap", means different things on different platforms
  and in different capture files; throw in some heuristics to try to
  figure out whether the 4-byte header is:
  
  	1) PPP-over-HDLC (some version of ISDN4BSD?);
  
  	2) big-endian AF_ value (BSD on big-endian platforms);
  
  	3) little-endian AF_ value (BSD on little-endian platforms);
  
  	4) two octets of 0 followed by an Ethernet type (Linux, at least
  	   on little-endian platforms, as mutated by "libpcap").
  
  Make a separate Wiretap encapsulation type, WTAP_ENCAP_NULL,
  corresponding to DLT_NULL.
  
  Have the PPP code dissect the frame if it's PPP-over-HDLC, and have
  "ethertype()" dissect the Ethernet type and the rest of the packet if
  it's a Linux-style header; dissect it ourselves only if it's an AF_
  value.
  
  Have Wiretap impose a maximum packet size of 65535 bytes, so that it
  fails more gracefully when handed a corrupt "libpcap" capture file
  (other capture file formats with more than a 16-bit capture length
  field, if any, will have that check added later), and put that size in
  "wtap.h" and have Ethereal use it as its notion of a maximum packet
  size.
  
  Have Ethereal put up a "this file appears to be damaged or corrupt"
  message box if Wiretap returns a WTAP_ERR_BAD_RECORD error when opening
  or reading a capture file.
  
  Include loopback interfaces in the list of interfaces offered by the
  "Capture" dialog box, but put them at the end of the list so that it
  doesn't default to a loopback interface unless there are no other
  interfaces.  Also, don't require that an interface in the list have an
  IP address associated with it, and only put one entry in the list for a
  given interface (SIOCGIFCONF returns one entry per interface *address*,
  not per *interface* - and even if you were to use only IP addresses, an
  interface could conceivably have more than one IP address).
  
  Exclusively use Wiretap encapsulation types internally, even when
  capturing; don't use DLT_ types.
  
  Revision  Changes    Path
  1.7       +3 -1      ethereal/etypes.h
  1.12      +250 -117  ethereal/packet-null.c
  1.17      +1 -3      ethereal/packet-eth.c
  1.39      +2 -8      ethereal/file.h
  1.78      +9 -2      ethereal/file.c
  1.22      +1 -2      ethereal/ethereal.h
  1.102     +3 -3      ethereal/ethereal.c
  1.58      +111 -28   ethereal/capture.c
  1.39      +2 -2      ethereal/packet.c