Ethereal-cvs: [ethereal-cvs] cvs commit: ethereal/wiretap file.c wtap.c ngsniffer.c lanalyzer.

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: Thu, 19 Aug 1999 00:31:53 -0500 (CDT)
guy         1999/08/19 00:31:51 CDT

  Modified files:
    wiretap              file.c wtap.c ngsniffer.c lanalyzer.c 
                         lanalyzer.h snoop.c snoop.h netxray.c 
                         netxray.h netmon.c netmon.h radcom.c 
                         radcom.h libpcap.c libpcap.h iptrace.c 
                         iptrace.h wtap.h 
  Log:
  Have the per-capture-file-type open routines "wtap_open_offline()" calls
  return 1 on success, -1 if they got an error, and 0 if the file isn't of
  the type that file is checking for, and supply an error code if they
  return -1; have "wtap_open_offline()" use that error code.  Also, have
  the per-capture-file-type open routines treat errors accessing the file
  as errors, and return -1, rather than just returning 0 so that we try
  another file type.
  
  Have the per-capture-file-type read routines "wtap_loop()" calls return
  -1 and supply an error code on error (and not, as they did in some
  cases, call "g_error()" and abort), and have "wtap_loop()", if the read
  routine returned an error, return FALSE (and pass an error-code-pointer
  argument onto the read routines, so they fill it in), and return TRUE on
  success.
  
  Add some new error codes for them to return.
  
  Now that "wtap_loop()" can return a success/failure indication and an
  error code, in "read_cap_file()" put up a message box if we get an error
  reading the file, and return the error code.
  
  Handle the additional errors we can get when opening a capture file.
  
  If the attempt to open a capture file succeeds, but the attempt to read
  it fails, don't treat that as a complete failure - we may have managed
  to read some of the capture file, and we should display what we managed
  to read.
  
  Revision  Changes    Path
  1.17      +49 -37    ethereal/wiretap/file.c
  1.15      +10 -4     ethereal/wiretap/wtap.c
  1.15      +132 -70   ethereal/wiretap/ngsniffer.c
  1.11      +102 -37   ethereal/wiretap/lanalyzer.c
  1.2       +2 -5      ethereal/wiretap/lanalyzer.h
  1.6       +38 -21    ethereal/wiretap/snoop.c
  1.2       +2 -3      ethereal/wiretap/snoop.h
  1.10      +38 -20    ethereal/wiretap/netxray.c
  1.2       +2 -3      ethereal/wiretap/netxray.h
  1.10      +38 -20    ethereal/wiretap/netmon.c
  1.2       +2 -3      ethereal/wiretap/netmon.h
  1.2       +89 -49    ethereal/wiretap/radcom.c
  1.2       +1 -2      ethereal/wiretap/radcom.h
  1.10      +37 -22    ethereal/wiretap/libpcap.c
  1.3       +2 -2      ethereal/wiretap/libpcap.h
  1.6       +30 -11    ethereal/wiretap/iptrace.c
  1.2       +2 -3      ethereal/wiretap/iptrace.h
  1.27      +18 -9     ethereal/wiretap/wtap.h