aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/cosine.c
AgeCommit message (Collapse)AuthorFilesLines
2012-05-04file_seek() used to be a wrapper around fseek() or gzseek(), both ofGuy Harris1-2/+0
which could use lseek() and were thus expensive due to system call overhead. To avoid making a system call for every packet on a sequential read, we maintained a data_offset field in the wtap structure for sequential reads. It's now a routine that just returns information from the FILE_T data structure, so it's cheap. Use it, rather than maintaining the data_offset field. Readers for some file formats need to maintain file offset themselves; have them do so in their private data structures. svn path=/trunk/; revision=42423
2012-03-17Fix indentation.Guy Harris1-1/+1
svn path=/trunk/; revision=41627
2012-02-25Add a presence flag field to the packet information structure filled inGuy Harris1-0/+1
by Wiretap, to indicate whether certain fields in that structure actually have data in them. Use the "time stamp present" flag to omit showing time stamp information for packets (and "packets") that don't have time stamps; don't bother working very hard to "fake" a time stamp for data files. Use the "interface ID present" flag to omit the interface ID for packets that don't have an interface ID. We don't use the "captured length, separate from packet length, present" flag to omit the captured length; that flag might be present but equal to the packet length, and if you want to know if a packet was cut short by a snapshot length, comparing the values would be the way to do that. More work is needed to have wiretap/pcapng.c properly report the flags, e.g. reporting no time stamp being present for a Simple Packet Block. svn path=/trunk/; revision=41185
2011-12-13Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports anyGuy Harris1-3/+3
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
2011-04-21Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discoveredGuy Harris1-14/+18
by the gunzipping code. Have it also supply a err_info string, and report it. Have file_error() supply an err_info string. Put "the file" - or, for WTAP_ERR_DECOMPRESS, "the compressed file", to suggest a decompression error - into the rawshark and tshark errors, along the lines of what other programs print. Fix a case in the Netscaler code where we weren't fetching the error code on a read failure. svn path=/trunk/; revision=36748
2011-04-18Update Motonori Shindo's email address at the author's request. Fixes bug 5840.Chris Maynard1-1/+1
svn path=/trunk/; revision=36695
2011-04-11Use ws_open(), not open(), so we handle UTF-8 pathnames on Windows.Guy Harris1-4/+1
Update or remove some additional "we don't have ferror() in zlib" comments to reflect the current reality. svn path=/trunk/; revision=36568
2011-04-07Be more picky about our sscanf integer field widths. Hopefully this willGerald Combs1-3/+3
help squelch Coverity CIDs 701-709. svn path=/trunk/; revision=36511
2011-02-16Fix errors found by the Visual C++ analyzer.Gerald Combs1-1/+1
svn path=/trunk/; revision=35954
2009-03-07More P64 changes.Guy Harris1-1/+2
svn path=/trunk/; revision=27638
2008-05-08strncpy -> g_strlcpyAnders Broman1-4/+3
svn path=/trunk/; revision=25254
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-8/+8
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2005-08-25timestamp display precision:Ulf Lamping1-0/+1
- automatic adjustment depending on file format - manual adjustment through menu items save the setting in the recent file svn path=/trunk/; revision=15534
2005-08-24EVERYTHING IN THE BUILDBOT IS GOING TO BE RED!!! Sorry! Ulf Lamping1-2/+2
I've done more than a day to change the timestamp resolution from microseconds to nanoseconds. As I really don't want to loose those changes, I'm going to check in the changes I've done so far. Hopefully someone else will give me a helping hand with the things left ... What's done: I've changed the timestamp resolution from usec to nsec in almost any place in the sources. I've changed parts of the implementation in nstime.s/.h and a lot of places elsewhere. As I don't understand the editcap source (well, I'm maybe just too tired right now), hopefully someone else might be able to fix this soon. Doing all those changes, we get native nanosecond timestamp resolution in Ethereal. After fixing all the remaining issues, I'll take a look how to display this in a convenient way... As I've also changed the wiretap timestamp resolution from usec to nsec we might want to change the wiretap version number... svn path=/trunk/; revision=15520
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-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-2/+2
"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-14/+24
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-5/+6
Move addional warnings from extra-gcc-checks to normal compilation flags svn path=/trunk/; revision=9826
2003-11-25"file_seek()" sets "*err" - we don't have to set it ourselves.Guy Harris1-13/+4
The same is true of "parse_cosine_rec_hdr()". svn path=/trunk/; revision=9079
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-115/+115
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6115
2002-08-16Updates from Motonori Shindo.Guy Harris1-9/+2
svn path=/trunk/; revision=6000
2002-08-06Fix the declaration of "empty_line()" to match the definition.Guy Harris1-2/+2
svn path=/trunk/; revision=5954
2002-08-06Make the argument to "empty_line()" a "const guchar *", so we don't haveGuy Harris1-2/+2
to worry about characters with the 8th bit set being sign-extended. svn path=/trunk/; revision=5953
2002-07-31From Motonori Shindo: support for reading CoSine L2 debug output.Guy Harris1-0/+530
svn path=/trunk/; revision=5922