Guy Harris
0751daed8a
Don't cast away constness (except where APIs render that impossible).
...
svn path=/trunk/; revision=50854
2013-07-23 23:34:45 +00:00
Guy Harris
7f7733579c
Don't cast away constness.
...
svn path=/trunk/; revision=50853
2013-07-23 23:25:04 +00:00
Guy Harris
52972f605d
Handle operating systems that are anticipating the day when files should
...
be read in chunks > 2GB.
svn path=/trunk/; revision=50847
2013-07-23 18:34:10 +00:00
Jörg Mayer
812f308620
Use largefile detection in cmake.
...
Move wiretap/file_wrapper.c back to clean sources.
svn path=/trunk/; revision=50825
2013-07-23 09:41:35 +00:00
Jörg Mayer
358f334041
Move file_wrappers.c to dirty files, it has some warnings (turning errors)
...
when compiled with clang.
Just for documentation:
[ 6%] Building C object wiretap/CMakeFiles/wiretap.dir/file_wrappers.c.o
/home/jmayer/work/wireshark/svn/trunk/wiretap/file_wrappers.c:987:28: warning: implicit
conversion loses integer precision: 'gint64' (aka 'long long') to '__off_t'
(aka 'long') [-Wshorten-64-to-32]
if (ws_lseek64(file->fd, off, SEEK_SET) == -1) {
~~~~~~~~~~ ^~~
/home/jmayer/work/wireshark/svn/trunk/wiretap/file_wrappers.c:1051:35: warning:
implicit conversion loses integer precision: 'long long' to '__off_t' (aka 'long')
[-Wshorten-64-to-32]
if (ws_lseek64(file->fd, offset - file->have, SEEK_CUR) == -1) {
~~~~~~~~~~ ~~~~~~~^~~~~~~~~~~~
/home/jmayer/work/wireshark/svn/trunk/wiretap/file_wrappers.c:1076:34: warning:
implicit conversion loses integer precision: 'gint64' (aka 'long long') to
'__off_t' (aka 'long') [-Wshorten-64-to-32]
if (ws_lseek64(file->fd, file->start, SEEK_SET) == -1) {
~~~~~~~~~~ ~~~~~~^~~~~
3 warnings generated.
svn path=/trunk/; revision=50798
2013-07-22 21:23:00 +00:00
Guy Harris
421e9ad4a0
The new frame-based tvbuff code found that the DOS Sniffer code for
...
compressed sniffer files failed if the very first read involves seeking
past the first blob; fix that.
svn path=/trunk/; revision=50679
2013-07-16 20:59:02 +00:00
Chris Maynard
bd0dbc23ca
Make camins_read_packet static.
...
svn path=/trunk/; revision=50671
2013-07-16 16:24:28 +00:00
Guy Harris
ff868427ef
Include merge.h, so it shows up in the distribution tarball.
...
svn path=/trunk/; revision=50662
2013-07-16 04:10:25 +00:00
Jeff Morriss
0a669967fa
Move merge.{h,c} into wiretap: these modules use wiretap to merge files.
...
svn path=/trunk/; revision=50656
2013-07-16 02:35:33 +00:00
Guy Harris
3e8b8f0b1a
Explain that we don't have to worry about fixed-length buffers whose
...
size is based on the snapshot length.
svn path=/trunk/; revision=50647
2013-07-16 00:18:55 +00:00
Evan Huus
a39e5b9b4a
On the suggestion of Cal Turney, via
...
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8937
Don't warn if a file has packets larger than the global snapshot length.
svn path=/trunk/; revision=50646
2013-07-15 23:58:47 +00:00
Jeff Morriss
fae759b793
Avoid building ascend.h and ascend.c in parallel (2 bison's running at the same time sometimes results in corrupted output).
...
svn path=/trunk/; revision=50524
2013-07-12 03:35:44 +00:00
Pascal Quantin
b5187b496b
Use newly assigned DLT for PDU export functionality
...
svn path=/trunk/; revision=50212
2013-06-28 13:05:12 +00:00
Guy Harris
f13ba97806
Fix some pointer-signedness (well, signedness of what the pointer points
...
to) warnings.
svn path=/trunk/; revision=50104
2013-06-21 02:59:54 +00:00
Guy Harris
52e9ee89fd
Clarify (a V1.0 file might have a single zero byte at the end of the
...
page, which doesn't look like an "unused space" record because there
aren't two bytes of record type, just one byte).
svn path=/trunk/; revision=50027
2013-06-19 00:02:22 +00:00
Guy Harris
953d1bfd72
Slight stylistic cleanup - most routines, when defined, have no space
...
between the routine name and the opening parenthesis, so remove it from
the definition of the seek-read routine.
svn path=/trunk/; revision=50026
2013-06-18 23:47:50 +00:00
Guy Harris
81b9276b24
Note that NetScaler trace files are page-oriented, with records not
...
split across page boundaries, rather than being a byte stream, and that
the last page may be short.
Fix some comments.
svn path=/trunk/; revision=50025
2013-06-18 23:37:30 +00:00
Evan Huus
3f1f630570
Don't limit the on-the-wire length of packets to 64KB, there are larger packets
...
out there (especially over USB) and we should be able to load them as long as
they are snapped to a sane length.
Also validate that packets do not specify a snapshot length larger than the one
in the file header, though only make it a warning, as this is not necessarily a
fatally corrupt packet.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8808
svn path=/trunk/; revision=49999
2013-06-18 01:02:26 +00:00
Guy Harris
d7380efa6d
Put the code to fill in the struct wtap_pkthdr and to read the packet
...
data into a common routine, and use it in both the read and seek-read
routines.
svn path=/trunk/; revision=49996
2013-06-17 23:43:55 +00:00
Guy Harris
9fb168b2cc
Merge more of the read and seek-read code paths.
...
svn path=/trunk/; revision=49990
2013-06-17 22:18:24 +00:00
Guy Harris
32b95570df
Merge "read record header" and "read packet data" routines into a single
...
routine, used both by read and seek-read routines.
svn path=/trunk/; revision=49988
2013-06-17 21:18:47 +00:00
Guy Harris
ca0f8ee6da
Make the libwiretap Buffer routines usable from C++, and fix the C++ UI
...
code to handle the API changes for the seek-read routines.
svn path=/trunk/; revision=49950
2013-06-16 01:40:04 +00:00
Guy Harris
8c9edf1280
Have the seek-read routines take a Buffer rather than a guint8 pointer
...
as the "where to put the packet data" argument.
This lets more of the libwiretap code be common between the read and
seek-read code paths, and also allows for more flexibility in the "fill
in the data" path - we can expand the buffer as needed in both cases.
svn path=/trunk/; revision=49949
2013-06-16 00:20:00 +00:00
Guy Harris
2b3891fa3b
Pull some of the code to set the struct wtap_pkthdr into
...
parse_netscreen_hex_dump().
svn path=/trunk/; revision=49944
2013-06-15 09:05:04 +00:00
Guy Harris
2b5344666a
Fill in at least some of the struct wtap_pkthdr in both the read and
...
seek-read routines.
svn path=/trunk/; revision=49943
2013-06-15 01:51:21 +00:00
Guy Harris
25d9d55cef
Rename radcom_process_rec_header() to radcom_process_rec_header() and
...
move the code to file in a struct wtap_pkthdr there.
svn path=/trunk/; revision=49942
2013-06-14 23:59:04 +00:00
Anders Broman
878e89885b
Allign the error messages.
...
svn path=/trunk/; revision=49870
2013-06-10 17:13:49 +00:00
Guy Harris
f4f4e024bc
libwireshark's add_new_ipv4() and add_new_ipv6() now silently ignore
...
requests to add an entry with a zero-length name; we don't have to
ignore them ourselves.
svn path=/trunk/; revision=49854
2013-06-09 06:44:47 +00:00
Guy Harris
9f1f58745c
Don't treat zero-length names in the NRB as errors, just silently ignore
...
them.
Works around the problem reported in bug 8763.
svn path=/trunk/; revision=49851
2013-06-09 02:32:30 +00:00
Guy Harris
f86c7712a3
Use g_try_malloc() for some memory allocations, and return an "out of
...
memory" indication if it fails.
Further fixes bug 8752.
Also, clean up indentation.
svn path=/trunk/; revision=49834
2013-06-07 08:34:44 +00:00
Guy Harris
2429df9c51
Prevent attempts to allocate huge amounts of memory by imposing an
...
artificial 16MB limit on blocks.
Do some sanity checks when reading options, to make sure we don't read
past the end of the block.
Make some variables unsigned so as not to get inappropriate
sign-extension (which, in practice, should never happen due to the 16MB
block size limit, although if the limit is raised above 2^31-1, the
limit won't protect you).
Fixes bug 8752.
svn path=/trunk/; revision=49833
2013-06-07 08:19:40 +00:00
Pascal Quantin
506b417907
From Mark C. Brown via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8777 :
...
Add support for 10Gbe HP-UX drivers IOCXGBE and IQXGBE
svn path=/trunk/; revision=49820
2013-06-06 20:55:00 +00:00
Guy Harris
57eb433a0b
Pull all the code that reads and processes the packet header into
...
visual_process_packet_header() and call it in both the read and
seek-read routines.
Pull the post-processing code that guesses the encapsulation based on
the first few bytes in the packet into
visual_fill_in_chdlc_encapsulation() and call it in both the read and
seek-routines. Add some length checks.
svn path=/trunk/; revision=49812
2013-06-06 18:57:22 +00:00
Guy Harris
59c3ab9cc9
Pull the code for setting the struct wtap_pkthdr into a
...
snoop_process_record_header() routine, and call it in both the read and
seek-read routines.
svn path=/trunk/; revision=49803
2013-06-06 08:14:44 +00:00
Guy Harris
311c8d346d
Set the entire struct wtap_pkthdr, not just the pseudo-header, in the
...
seek-read routine. Pull the code to do that into
netxray_set_pseudo_header(), and rename it netxray_set_phdr().
svn path=/trunk/; revision=49800
2013-06-06 00:10:36 +00:00
Guy Harris
a58b141062
The check for network_size < 4 is necessary only for those packets where
...
we're lopping 4 bytes off of the network_size.
Add a comment discussing the aformentioned lopping-off.
svn path=/trunk/; revision=49782
2013-06-05 08:12:06 +00:00
Guy Harris
1f2231da07
Move the code that fills in the struct wtap_pkthdr (other than the
...
pseudo-header) into a process_packet_header() routine, and call it in
both the read and seek-read routines.
svn path=/trunk/; revision=49779
2013-06-05 00:36:57 +00:00
Anders Broman
4cdb591e46
From Anthony Coddington:
...
ERF wiretap export multiple extension header fix.
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8765
svn path=/trunk/; revision=49749
2013-06-04 04:00:59 +00:00
Jeff Morriss
d8558f06fd
Fix an unintialized-value-used warning that Valgrind detected in the capture
...
file attached to https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8760 :
When searching for a signature, don't search past the end of the record.
svn path=/trunk/; revision=49742
2013-06-04 01:31:56 +00:00
Jeff Morriss
9f95423783
Get rid of trailing white space and a few tabs.
...
svn path=/trunk/; revision=49741
2013-06-04 00:58:40 +00:00
Jeff Morriss
0eecced808
Fix the wiretap fuzz failure reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8760 :
...
Check that the record length we got out of the file is at least as big as
stats block trailer; if not, declare the file bad.
svn path=/trunk/; revision=49739
2013-06-04 00:50:05 +00:00
Guy Harris
e4d65e993f
file_skip() only needs to return a Boolean; if anybody cares what the
...
seek offset is after calling it, they can use file_tell(). (Some
routines were already assuming it returned a gboolean.)
svn path=/trunk/; revision=49733
2013-06-03 23:07:42 +00:00
Pascal Quantin
8c32b5db74
Initialize the whole hdr_info structure to please gcc 4.3.2
...
svn path=/trunk/; revision=49710
2013-06-03 07:48:59 +00:00
Guy Harris
8c112f9223
Put back a fix that earlier checkins lost.
...
svn path=/trunk/; revision=49709
2013-06-03 06:36:55 +00:00
Evan Huus
45ed7d6aa3
Initialize some variables that GCC 4.7 complains about. I'm not 100% sure
...
that the complaints are valid, or that simply zeroing them is the right fix
if they are, but at least it builds now. Should we be erroring if we don't
see a sliceLength header?
svn path=/trunk/; revision=49705
2013-06-03 01:07:26 +00:00
Guy Harris
c20b5d96a8
When reading sequentially, skip past any ignored data at the end of the
...
packet.
svn path=/trunk/; revision=49704
2013-06-03 00:26:16 +00:00
Guy Harris
c3c6f93f5c
Pass the read_rec_data routines a wtap_pkthdr pointer, and have them
...
fill in that structure, so that it's filled in by both the read and
seek-read routines.
svn path=/trunk/; revision=49703
2013-06-02 23:32:17 +00:00
Guy Harris
761ab82280
Pull the code to Fill in the wtap_pkthdr structure into a common
...
routine, and use it in both the read and seek-read routines.
svn path=/trunk/; revision=49702
2013-06-02 23:23:47 +00:00
Guy Harris
f7f029c255
Move code to fill in the wtap_pkthdr into peektagged_process_header(),
...
so that it's filled in by both the read and seek-read routines.
svn path=/trunk/; revision=49701
2013-06-02 23:20:11 +00:00
Guy Harris
bc97838985
Pull code to read and process packet headers into
...
peekclassic_process_record_header_() routines, used in both the read and
seek-read routines.
svn path=/trunk/; revision=49700
2013-06-02 23:12:58 +00:00