summaryrefslogtreecommitdiff
path: root/wiretap/airopeek9.c
AgeCommit message (Collapse)AuthorFilesLines
2011-04-21Add a new WTAP_ERR_DECOMPRESS error, and use that for errors discoveredGuy Harris1-17/+22
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-11Use ws_open(), not open(), so we handle UTF-8 pathnames on Windows.Guy Harris1-3/+0
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-11Remove a no-longer-valid comment (we're not using zlib's I/O routines,Guy Harris1-3/+0
and the routines we're now using guarantee that an error has occured in that case). svn path=/trunk/; revision=36567
2011-04-06From Jakub Zawadzki:Guy Harris1-1/+1
file_read(buf, bsize, count, file) macro is compilant with fread function and takes elements count+ size of each element, however to make it compilant with gzread() it always returns number of bytes. In wiretap file_read() this is not really used, file_read is called either with bsize set to 1 or count to 1. Attached patch remove bsize argument from macro. svn path=/trunk/; revision=36491
2010-02-26Move the definitions of all the private data structures out ofGuy Harris1-13/+13
wtap-int.h, and change the unions of pointers to those private data structures into just void *'s. Have the generic wtap close routine free up the private data, rather than the type-specific close routine, just as the wtap_dumper close routine does for its private data. Get rid of close routines that don't do anything any more. svn path=/trunk/; revision=32015
2010-02-23Fix cast.Guy Harris1-1/+1
svn path=/trunk/; revision=31954
2010-02-23Attempt to squelch some compiler warnings.Guy Harris1-2/+2
svn path=/trunk/; revision=31953
2009-04-22ssize_t is UN*X-only; don't use it.Guy Harris1-12/+12
The header length, as processed by airopeekv9_process_header(), is never 0, so use 0, not -1, as the error return. svn path=/trunk/; revision=28121
2009-04-22Clean up some 64-bit issues.Guy Harris1-5/+5
svn path=/trunk/; revision=28117
2008-09-11Suggest why we might have at least 3 different network subtypes for 802.11.Guy Harris1-1/+7
svn path=/trunk/; revision=26175
2008-09-10A network type of 2 appears to be similar to a network type of 1Guy Harris1-1/+3
(including 0's rather than an FCS in the packet). svn path=/trunk/; revision=26174
2007-05-21Fix some (incorrect but unforseeable)Jörg Mayer1-1/+1
"might be used uninitialized" warnings. svn path=/trunk/; revision=21862
2006-11-05change all file offsets from long to gint64 so we can - theoretically - ↵Ulf Lamping1-4/+4
handle files > 2GB correct. Please distclean Win32 builds! svn path=/trunk/; revision=19814
2005-08-26Fix indentation, and fix a comment.Guy Harris1-2/+2
svn path=/trunk/; revision=15545
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-07-22More 'char*' -> 'const char*' warning fixesJörg Mayer1-3/+3
svn path=/trunk/; revision=14986
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-06Whether frames in an AiroPeek V9 802.11 capture have 4 bytes of 0 or anGuy Harris1-18/+42
FCS at the end appears to depend on the network subtype value. svn path=/trunk/; revision=10001
2004-02-06A MediaSubType value of 1 also means 802.11. (Is that what indicatesGuy Harris1-2/+2
whether there's an FCS or not?) svn path=/trunk/; revision=9995
2004-02-06Make sure a packet has one and only one length field, one and only oneGuy Harris1-6/+44
timestamp lower field, and one and only one timestamp lower field. svn path=/trunk/; revision=9994
2004-02-06The time stamps in *Peek V9 files appear to be in nanoseconds from theGuy Harris1-12/+19
Windows FILETIME epoch, i.e. midnight, January 1, 1601. svn path=/trunk/; revision=9993
2004-02-06Ethernet frames appear to have 4 bytes of 0 at the end, at least in theGuy Harris1-5/+20
captures I've seen. svn path=/trunk/; revision=9991
2004-02-06V9 format appears to be used by some versions of EtherPeek, too.Guy Harris1-85/+218
The MediaType field seems to be 0 for the Ethernet captures; however, the MediaSubType field is different. The fields in the header are different - we can't use hard-coded offsets for the fields, we have to process them as a sequence of tag/value items. Rename some routines to use the same naming convention as the V9 open routine rather than the same convention as the V5/V6/V7 read and seek/read routines. svn path=/trunk/; revision=9990
2004-01-27Supply a pseudo-header for all 802.11 packets; add an "fcs_len" field toGuy Harris1-21/+26
it, similar to the Ethernet pseudo-header's "fcs_len" field, and use it in the 802.11 dissector. svn path=/trunk/; revision=9884
2004-01-25Have the Wiretap open, read, and seek-and-read routines return, inGuy Harris1-9/+14
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
2003-12-03"strtoul()" returns a "long", not a "long long".Guy Harris1-2/+2
svn path=/trunk/; revision=9154
2003-12-02Check for errors and EOF, and handle them appropriately; don't treat allGuy Harris1-19/+108
errors when reading the header as indications that the file isn't an AiroPeek V9 file. Put in comments nothing some additional checks we should do. svn path=/trunk/; revision=9145
2003-12-02From Martijn Schipper: support for reading AiroPeek files in V9 captureGuy Harris1-0/+278
file format (AiroPeek 2.x). svn path=/trunk/; revision=9144