Age | Commit message (Collapse) | Author | Files | Lines |
|
remove C++ incompatibilities
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416
svn path=/trunk/; revision=48424
|
|
indicate what it means, and use an enum for the compression types.
Note that file_getc() returns a byte, not a character.
svn path=/trunk/; revision=46983
|
|
Get rid of unnecessary pointer cast.
svn path=/trunk/; revision=46982
|
|
int" instead.
bugs 7825-7827 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7825)
svn path=/trunk/; revision=46928
|
|
svn path=/trunk/; revision=46684
|
|
it exceeds size_t on any platform, including Win64.
svn path=/trunk/; revision=46652
|
|
svn path=/trunk/; revision=46650
|
|
function name;
(At least some (gcc ?) compilers give a "shadow" warning for these).
svn path=/trunk/; revision=46404
|
|
svn path=/trunk/; revision=45015
|
|
(COPYING will be updated in next commit)
svn path=/trunk/; revision=43536
|
|
that will do the right thing here. Instead, cast its negative (which is
positive) to unsigned, use that value as the adjustment, and flip the
signs of the subsequent adjustment operations.
svn path=/trunk/; revision=43105
|
|
svn path=/trunk/; revision=43104
|
|
warning about assigning the difference between two (64-bit) pointers to
a (32-bit) variable. That difference is guaranteed to fit in an
unsigned int; make "had" an unsigned int, and cast the difference to
unsigned int before assigning it to "had".
svn path=/trunk/; revision=43103
|
|
a position that's in our data buffer, just reposition within the
buffer, don't do any seeks or I/O on the underlying file. This lets us
do some backwards seeking on a pipe, to allow the rewind-and-try scheme
we use to try to identify capture file types to work, at least for some
capture file formats (those that have magic numbers at the beginning or
have heuristics that don't require much data), on pipes, allowing, for
example, TShark to read those formats from a pipe.
svn path=/trunk/; revision=43102
|
|
svn path=/trunk/; revision=43000
|
|
svn path=/trunk/; revision=42998
|
|
file that we ourselves have open. In the "safe save" code path for
capture files, on Windows temporarily close the file descriptors for the
currently-open capture before doing the rename and then, if the rename
failed, reopen them, leaving the rest of the wtap and capture_file
structures intact.
Rename filed_open() to file_fdopen(), to make its name match what it
does a bit better (it's an fdopen()-style routine, i.e. do the
equivalent of an open with an already-open file descriptor rather than a
pathname, in the file_wrappers.c set of routines).
Remove the file_ routines from the .def file for Wiretap - they should
only be called by code inside Wiretap.
Closing a descriptor open for input has no reason to fail (closing a
descriptor open for *writing* could fail if the file is on a server and
dirty pages are pushed asynchronously to the server and synchronously on
a close), so just have file_close() return void.
svn path=/trunk/; revision=42961
|
|
an API to fetch that.
When doing "Save" on a compressed file, write it out compressed.
In the Statistics -> Summary dialog and in capinfos, report whether the
file is gzip-compressed.
svn path=/trunk/; revision=42818
|
|
Pass Z_NO_FLUSH to inflate() when Z_BLOCK is not defined,
just in case also disable fast seeking when it's not defined.
References: http://www.wireshark.org/lists/wireshark-dev/201205/msg00145.html
svn path=/trunk/; revision=42714
|
|
currently just a wrapper around file_seek(), but could be implemented by
reading forward if, for example, we add support for reading
(sequentially only!) from a pipe.
Sort the declarations of file-reading routines into one block.
svn path=/trunk/; revision=42391
|
|
expand the resulting comment a bit.
svn path=/trunk/; revision=42390
|
|
svn path=/trunk/; revision=42053
|
|
GSList of extensions for a file type, including extensions for the
compressed versions of those file types that we can read.
svn path=/trunk/; revision=40623
|
|
the file, so you don't get weird random errors. EINVAL is as good as
anything.
svn path=/trunk/; revision=39896
|
|
pointer to a string to a non-const pointer discards qualifiers; make the
err_info member of the wtap_reader structure a const pointer.
svn path=/trunk/; revision=37671
|
|
<zlib.h> there, rather than wtap-int.h. That obviates the need to
include config.h earlier in ascend_scanner.l; revert the previous
change, so we don't require a version of Flex that supports %top.
svn path=/trunk/; revision=37640
|
|
one computed the right way (as specified by RFC 1952).
svn path=/trunk/; revision=37032
|
|
structure include a file descriptor. Add a wtap_fstat() for the file
readers that use file times to generate time stamps (we really need a
way to say "this file has no time stamps" or "this file has only
relative time stamps).
svn path=/trunk/; revision=37026
|
|
the file, rather than the offset in the uncompressed data stream. That
way we don't get the "hey, we're more than 100% into the file, better
refigure this" surprise.
svn path=/trunk/; revision=37025
|
|
probably a compressed file from the Windows Sniffer, and they don't
bother setting the CRC.
svn path=/trunk/; revision=37024
|
|
inflatePrime.
svn path=/trunk/; revision=36949
|
|
don't have an "additional information" string.
Get rid of WTAP_ERR_ZLIB; just report an internal error with
WTAP_ERR_INTERNAL instead. (If they start happening, we can think about
supplying an "additional information" string for compression errors on
output.)
svn path=/trunk/; revision=36774
|
|
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
|
|
has semantics similar to getc().
If it fails due to an EOF, set state->err to WTAP_ERR_SHORT_READ to
report a premature EOF; otherwise, raw_read() has already set
state->err, so don't set state->err to something else - that loses the
errno value in favor of a generic "bad data" error.
svn path=/trunk/; revision=36744
|
|
in which case ENOMEM is the right error, or we're running on Windows but
using UN*Xy routines, in which case ENOMEM is the right error; unlike
zlib, we don't have to run on a whole pile of OSes.)
svn path=/trunk/; revision=36648
|
|
From me: small indentation fix (use spaces rather than tabs in all lines
in that routine).
svn path=/trunk/; revision=36591
|
|
In the end-of-stream code, when we're checking the CRC and length, don't
check the CRC or length if we failed to read them, and don't check the
length if the CRC is bad.
We define O_BINARY as 0 on UN*X in <wsutil/file_util.h>, so we don't
need to avoid using it on UN*X.
In file_gets(), check for delayed errors.
svn path=/trunk/; revision=36590
|
|
svn path=/trunk/; revision=36584
|
|
zran.c example in the zlib source.
This means that problems in the file's contents might not be reported
when a packet is read, as long as there's no problem in the contents of
the file up to the last bit of compressed data for the packet; we now
check for errors after finishing the sequential read of the file, at
least in some programs, so that shouldn't be an issue (the other
programs need to be changed to do so as well). This is necessary in
order to be able to read all the packets we saw in the sequential pass;
it also lets us get a few more packets from truncated files in some
cases.
svn path=/trunk/; revision=36577
|
|
Update or remove some additional "we don't have ferror() in zlib"
comments to reflect the current reality.
svn path=/trunk/; revision=36568
|
|
this frees us from worrying about zlib large file issues on the write
side, and also lets us clean up a few other things.
svn path=/trunk/; revision=36563
|
|
support it.
Rename ws_lseek to ws_lseek64, as it should be given a 64-bit offset,
and have it use _lseeki64 on Windows, to try to get 64-bit offset
support; AC_SYS_LARGEFILE should cause lseek() to support 64-bit offsets
on UN*X if possible.
svn path=/trunk/; revision=36542
|
|
Point to pages for some other compressed file formats we might want to
support.
svn path=/trunk/; revision=36539
|
|
wiretap/file_wrappers.c; nothing outside of file_wrappers.c needs to
know what it looks like, it just passes around pointers to it.
svn path=/trunk/; revision=36538
|
|
ws_lseek() to the appropriate type for the second argument to _lseek()
for Windows or lseek() for UN*X; ultimately, we want to call the
appropriate 64-bit-offset seek routine if available, otherwise cast the
value down and hand it to the 32-bit-offset seek routine.
svn path=/trunk/; revision=36514
|
|
Steal file_wrappers functions from zlib v2.
svn path=/trunk/; revision=36513
|
|
file-wrappers.[ch] is used only for reading files, and mode is always
"rb".
Attached patch removes 'mode' argument from file_open() & filed_open().
svn path=/trunk/; revision=36493
|
|
svn path=/trunk/; revision=32280
|
|
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.
While doing that, rename the eth_* functions to ws_*.
svn path=/trunk/; revision=25354
|
|
svn path=/trunk/; revision=24181
|