aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/dbs-etherwatch.c
AgeCommit message (Collapse)AuthorFilesLines
2005-04-03Make editcap use wtap_read(); that eliminates the last user ofGuy Harris1-1/+1
wtap_loop(), so eliminate wtap_loop(). svn path=/trunk/; revision=14006
2004-10-01Get rid of warnings about shadowed variables (code was ok)Jörg Mayer1-8/+8
svn path=/trunk/; revision=12171
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-03-03Have "wtap_read()" set "wth->phdr.pkt_encap" to "wth->file_encap",Guy Harris1-2/+1
rather than requiring individual capture file type handlers to do it (unless they're doing per-packet encapsulation, in which case we check to make sure they didn't *leave* it as WTAP_ENCAP_PER_PACKET). svn path=/trunk/; revision=10290
2004-02-09Cast the arguments to <ctype.h> macros to "guchar", to squelchGuy Harris1-7/+8
"subscript has type `char'" warnings and to make the code work correctly if there are characters with the 8th bit set. svn path=/trunk/; revision=10010
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-12/+31
addition to an error code, an error info string, for WTAP_ERR_UNSUPPORTED, WTAP_ERR_UNSUPPORTED_ENCAP, and WTAP_ERR_BAD_RECORD errors. Replace the error messages logged with "g_message()" for those errors with g_strdup()ed or g_strdup_printf()ed strings returned as the error info string, and change the callers of those routines to, for those errors, put the info string into the printed message or alert box for the error. Add messages for cases where those errors were returned without printing an additional message. Nobody uses the error code from "cf_read()" - "cf_read()" puts up the alert box itself for failures; get rid of the error code, so it just returns a success/failure indication. Rename "file_read_error_message()" to "cf_read_error_message()", as it handles read errors from Wiretap, and have it take an error info string as an argument. (That handles a lot of the work of putting the info string into the error message.) Make some variables in "ascend-grammar.y" static. Check the return value of "erf_read_header()" in "erf_seek_read()". Get rid of an unused #define in "i4btrace.c". svn path=/trunk/; revision=9852
2004-01-24Fix all fixable warningsJörg Mayer1-3/+3
Move addional warnings from extra-gcc-checks to normal compilation flags svn path=/trunk/; revision=9826
2003-12-31For WTAP_ENCAP_ETHERNET, you have to fill in the "eth.fcs_len" member ofGuy Harris1-1/+12
the pseudo-header; these captures don't appear to have an FCS in them, so set that member to 0. svn path=/trunk/; revision=9502
2003-12-29From Neils Koot:Guy Harris1-82/+297
add the ability to read Ethernet captures; add the ability to read hex-only dumps. svn path=/trunk/; revision=9468
2003-01-17From Marc Milgram: e-mail address update.Guy Harris1-2/+2
svn path=/trunk/; revision=6936
2002-10-10"tm_isdst" must be set to -1 before "mktime()" is called, so thatGuy Harris1-1/+2
"mktime()" bases the DST-vs-non-DST decision on the date/time and on the current time zone. svn path=/trunk/; revision=6406
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-6/+6
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6115
2002-06-07Graeme Hewson noted that zlib has a bug wherein "gzseek()" doesn't setGuy Harris1-4/+2
the internal z_err value for the stream if an "fseek()" call it makes fails, so that if "gzerror()" is subsequently called, it returns Z_OK rather than an error. To work around this, we pass "file_seek()" an "int *err", and have the with-zlib version of "file_seek()" check, if "gzseek()" fails, whether the return value of "file_error()" is 0 and, if so, have it return "errno" instead. svn path=/trunk/; revision=5642
2002-03-05Make "wtap_seek_read()" return TRUE on success and FALSE on error, likeGuy Harris1-17/+16
"wtap_read()". Add some additional error checks to the Sniffer file reader. svn path=/trunk/; revision=4875
2002-03-05Have "wtap_seek_read()" return 0 on success and -1 on failure, and takeGuy Harris1-9/+16
an "err" argument that points to an "int" into which to put an error code if it fails. Check for errors in one call to it, and note that we should do so in other places. In the "wtap_seek_read()" call in the TCP graphing code, don't overwrite "cfile.pseudo_header", and make the buffer into which we read the data WTAP_MAX_PACKET_SIZE bytes, as it should be. In some of the file readers for text files, check for errors from the "parse the record header" and "parse the hex dump" routines when reading sequentially. In "csids_seek_read()", fix some calls to "file_error()" to check the error on the random stream (that being what we're reading). svn path=/trunk/; revision=4874
2002-03-04Check for errors in seeks, "tell"s, and "stat()"s/"fstat()"s.Guy Harris1-19/+41
For file types where we allocate private data, add "close" routines where they were missing, to free the private data. Also fix up the code to clean up after some errors by freeing private data where that wasn't being done. Get rid of unused arguments to "wtap_dump_open_finish()". Fix indentation. svn path=/trunk/; revision=4857
2002-03-02From Joerg Mayer: get rid of "-Wno-unused" flag in some configureGuy Harris1-2/+2
scripts, and check in changes to add _U_ to some unused arguments (some other should perhaps be used, so we leave the _U_ out so that the warnings serve as a reminder to check those). svn path=/trunk/; revision=4847
2002-02-08Have Wiretap set the snapshot length to 0 if it can't be derived fromGuy Harris1-3/+8
reading the capture file. Have callers of "wtap_snapshot_length()" treat a value of 0 as "unknown", and default to WTAP_MAX_PACKET_SIZE (so that, when writing a capture file in a format that *does* store the snapshot length, we can at least put *something* in the file). If we don't know the snapshot length of the current capture file, don't display a value in the summary window. Don't use "cfile.snap" as the snapshot length option when capturing - doing so causes Ethereal to default, when capturing, to the snapshot length of the last capture file that you read in, rather than to the snapshot length of the last capture you did (or the initial default of "no snapshot length"). Redo the "Capture Options" dialog box to group options into sections with frames around them, and add units to the snapshot length, maximum file size, and capture duration options, as per a suggestion by Ulf Lamping. Also add units to the capture count option. Make the snapshot length, capture count, maximum file size, and capture duration options into a combination of a check box and a spin button. If the check box is not checked, the limit in question is inactive (snapshot length of 65535, no max packet count, no max file size, no max capture duration); if it's checked, the spinbox specifies the limit. Default all of the check boxes to "not checked" and all of the spin boxes to small values. Use "gtk_toggle_button_get_active()" rather than directly fetching the state of a check box. svn path=/trunk/; revision=4709
2002-01-08From Marc Milgram: all packets in DBS Etherwatch and VMS TCPIPTRACEGuy Harris1-2/+2
captures are IP packets, so make the file encapsulation WTAP_ENCAP_RAW_IP rather than WTAP_ENCAP_PER_PACKET, so you can save those captures in other formats. svn path=/trunk/; revision=4503
2001-10-19DBS Etherwatch wiretap module, from Marc Milgram.Guy Harris1-0/+366
svn path=/trunk/; revision=4042