Age | Commit message (Collapse) | Author | Files | Lines |
|
<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
|
|
svn path=/trunk/; revision=19816
|
|
handle files > 2GB correct.
Please distclean Win32 builds!
svn path=/trunk/; revision=19814
|
|
Update the big comment to reflect current reality.
svn path=/trunk/; revision=16453
|
|
argument, rather than requiring the caller to get the open() flag and
the fopen() flag in sync. That also means that if we're *not* using
libz, it can just be a wrapper around eth_fopen().
We need to include <fcntl.h>, at least on UN*X, to get open() declared
and the O_ flags defined.
svn path=/trunk/; revision=16409
|
|
necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.
deleted related things from config.h.win32
As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.
svn path=/trunk/; revision=16403
|
|
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
|
|
winapi_cleanup tool written by Patrik Stridvall for the wine
project.
svn path=/trunk/; revision=6115
|
|
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
|
|
even if it doesn't have "gzgets()", so one might think we could use it
by using our own replacement for "gzgets()".
One would be wrong to think so, however, as the "gzseek()" it has
doesn't actually work when reading uncompressed files.
zlib 1.0.9 has "gzgets()", and fixes that bug, so we rever to checking
for "gzgets()" rather than "gzseek()", so that we don't accept pre-1.0.9
versions of zlib, and we get rid of our "gzgets()" replacement.
svn path=/trunk/; revision=4702
|
|
svn path=/trunk/; revision=4199
|
|
versions of these commands in file_wrappers.c. This allows us to
compile successfully even on platforms where X has an older zlib built
in.
Removed this restriction from acinclude.m4
svn path=/trunk/; revision=3948
|
|
to that file, leave public definitions in wtap.h.
Rename "union pseudo_header" to "union wtap_pseudo_header".
Make the wtap_pseudo_header pointer available in packet_info struct.
svn path=/trunk/; revision=1989
|
|
unlike FreeBSD and older versions of NetBSD, which give "gzseek()" and
"gztell()" signatures with "long" file-offset arguments, and thus, on
some versions, requires that "HAVE_UNISTD_H" *not* be defined before
including "zlib.h" if you want the functions declared with a signature
that matches what's actually in the library, it requires that it *be*
defined before including "zlib.h" if you want the functions declared
with a signature that matches what's actually in the library.
svn path=/trunk/; revision=1719
|
|
supposed to look like "ftell()".
If you don't have zlib, just define "file_seek" as an alias for "fseek",
rather than defining it as a routine.
svn path=/trunk/; revision=1571
|
|
is bigger than a "long"; this is itojun's fix for that, turning
"file_tell()" into a wrapper function in "file_wrappers.c", just like
"file_seek()".
svn path=/trunk/; revision=1554
|
|
forwarding e-mail address.
svn path=/trunk/; revision=1522
|
|
defunct "file.h".
Make "file_wrappers.c" include "wtap.h", so that the WTAP_ERR_ZLIB_
values are defined.
svn path=/trunk/; revision=1464
|
|
hideous problem on FreeBSD 3.[23] (and perhaps other BSDs) if
HAVE_UNISTD_H is defined before "zlib.h" is included, turn "file_seek()"
into a subroutine defined in a file that *undefines* HAVE_UNISTD_H
before including "zlib.h", so that the *only* call to "gzseek()" is made
from a file that does not have HAVE_UNISTD_H defined when it includes
"zlib.h".
Move "file_error()" to that file while you're at it, so it holds all the
wrappers that hide the presence or absence of zlib from routines to read
capture files.
Turn "file.h", which declared those wrapper functions as well as wrapper
macros, into "file_wrapper.h" - it belongs with the "file_wrapper.c"
file that defines the wrapper functions, not with "file.c" which handles
higher-layer file access functions.
Remove the comment in "configure.in" that explained why defining
HAVE_UNISTD_H was a bad idea, as we're not obliged to define it and work
around the problem. (The comment in "file_wrapper.c" explains the
workaround.)
svn path=/trunk/; revision=1463
|