Commit Graph

1629 Commits

Author SHA1 Message Date
Martin Mathieson c5cfc416a1 Skip extra info if present (IP with LTE PDCP threading info).
svn path=/trunk/; revision=38983
2011-09-13 12:14:24 +00:00
Guy Harris d7af4e2037 Don't synthesize a CRC if the packet already has one.
svn path=/trunk/; revision=38905
2011-09-06 23:36:18 +00:00
Stig Bjørlykke 415533faaf Check return value from wtap_dump_file_write.
This fixes CID 1272.

svn path=/trunk/; revision=38876
2011-09-03 20:47:58 +00:00
Guy Harris 6ac265b512 Merge pcap_fill_in_pseudo_header() into pcap_read_post_process().
svn path=/trunk/; revision=38844
2011-09-01 19:58:25 +00:00
Guy Harris e9fc1b72aa Use guint8 rather than guchar for raw octets and pointers to arrays of
same.

Add to wiretap/pcap-common.c a routine to fill in the pseudo-header for
ATM (by looking at the VPI, VCI, and packet data, and guessing) and
Ethernet (setting the FCS length appropriately).  Use it for both pcap
and pcap-ng files.

svn path=/trunk/; revision=38840
2011-09-01 09:43:10 +00:00
Guy Harris f16a746c63 Set eth.fcs_len in the pseudo-header for Ethernet packets.
Set the pseudo-header when doing the sequential read as well as when
doing random reads.

When writing packets to a CommView file, use a slightly less contorted
way to get the year/month/day/hour/minute/second values.

commview_dump() uses the pseudo_header argument; don't mark it as
unused.

svn path=/trunk/; revision=38833
2011-09-01 04:14:54 +00:00
Guy Harris 30ec5387fa Not ideal, but OK for now - alignbytes, at that point, is < 8, so we
know it'll fit in a gint16.  (alignbytes really shouldn't need to be 64
bits, as if we have 2^63-1 bytes of alignment, We Have A Problem; fixing
that may involve calculating it differently earlier in that routine.)

svn path=/trunk/; revision=38828
2011-08-31 22:22:40 +00:00
Stig Bjørlykke ff32408b0a Try using gint64 for alignbytes.
svn path=/trunk/; revision=38827
2011-08-31 21:16:18 +00:00
Stig Bjørlykke 141a830b9f From Andrew Kampjes via bug 6260:
Added support for saving ERF files.

From me:
Use crc routines from libwsutil.

svn path=/trunk/; revision=38826
2011-08-31 20:50:15 +00:00
Guy Harris 9756ac2904 Handle multiple extension headers when calculating the pseudo-header
length, and actually write out the extension headers when writing out
the pseudo-header.

Fixes bug 6265.

svn path=/trunk/; revision=38792
2011-08-30 08:09:40 +00:00
Guy Harris 4486bb9d85 A zero snaplen means "snaplen unknown", as in "the file format from
which we read the data to be written doesn't record the snapshot
length".  A snapshot length of 0 in a pcap or pcap-ng file is not
handled well by many programs reading those files; for pcap files, we
write out WTAP_MAX_PACKET_SIZE as the snapshot length in that case, so
do so for pcap-ng files as well.

svn path=/trunk/; revision=38790
2011-08-30 06:01:44 +00:00
Jeff Morriss 339136d1d0 Based on patch from Denis Ovsienko via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6244 :

Fix typo: s/unkown/unknown/

svn path=/trunk/; revision=38561
2011-08-16 13:16:33 +00:00
Jeff Morriss 613ddfa1cc From Hanspeter via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6229 :
If an EnhancedPacketBlock in a pcapng file contains a comment option the
content isn't displayed. Instead "Malformed packet" is displayed with the
reason Exception occurred.

The reason for the problem is a bug in the pcapng.c, where for enhanced packet
blocks, interface description blocks and interface statistics blocks the wrong
union members are used to set the comment. This way required fields in the
structures are overwritten.

The attached patch solves the problem.

svn path=/trunk/; revision=38491
2011-08-11 21:42:37 +00:00
Martin Mathieson fe28dc854a Speed up (slightly) reading of long text lines.
svn path=/trunk/; revision=37989
2011-07-12 10:49:22 +00:00
Guy Harris 4c4b8f8891 Move the definitions of LANalyzer records to lanalyzer.c.
Use LA_RecordHeaderSize rather than sizeof, to squelch some compiler
complaints.

svn path=/trunk/; revision=37956
2011-07-10 22:57:59 +00:00
Guy Harris 5e5b778a67 Define a structure for the record header, and read into that, and then
extract values from it.

svn path=/trunk/; revision=37954
2011-07-10 22:10:07 +00:00
Guy Harris 41d53a1635 At that point in the code, bytes_read isn't the total number of record
header bytes read, as we're reading the two header fields separately and
checking the byte count for each read.  We *do*, however, know that the
record header is 4 bytes long, so we can just seek back 4 bytes.

svn path=/trunk/; revision=37953
2011-07-10 21:05:19 +00:00
Martin Mathieson ece553d8d0 Change the way we scan past characters before the direction indicator.
svn path=/trunk/; revision=37940
2011-07-08 16:08:32 +00:00
Guy Harris e02cd7707d Explain a bit more what this does.
svn path=/trunk/; revision=37884
2011-07-04 01:39:13 +00:00
Stig Bjørlykke 8443bbbf75 Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Gerald Combs 8d88f3a790 Make pcap-ng the default. Add a compile-time option to prefer pcap-ng or
pcap.  Add a "-P" capture option which tries to use pcap instead of
pcap-ng ("-P" seemed to be the best option but we may want to use a
different letter).

Update the documentation and release notes.

svn path=/trunk/; revision=37696
2011-06-17 17:52:31 +00:00
Alexis La Goutte 3384fdecc4 From Kevin Kayes via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6026
Enhance Snoop file reader to include 10Gbit datalink value

svn path=/trunk/; revision=37683
2011-06-16 08:04:31 +00:00
Guy Harris a8c363bd54 Try to squelch some compiler warnings.
svn path=/trunk/; revision=37673
2011-06-15 19:48:27 +00:00
Guy Harris 7758cd97f4 Squelch some compiler warnings.
svn path=/trunk/; revision=37672
2011-06-15 19:36:43 +00:00
Guy Harris 128216dfbe Strings are not writable, and the compiler warns that assigning a
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
2011-06-15 19:34:54 +00:00
Jakub Zawadzki c54afc05e7 Fix capinfo: ** ERROR **: Unknown capture file type 61
svn path=/trunk/; revision=37643
2011-06-10 07:16:10 +00:00
Guy Harris 06256dfe5b The only place where we care about zlib is file_wrappers.c; include
<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
2011-06-09 22:46:00 +00:00
Jakub Zawadzki 110f2c4ef7 Fix possible compilation errors.
svn path=/trunk/; revision=37638
2011-06-09 22:01:57 +00:00
Jakub Zawadzki 178def67b7 - Add something to columns when using mime-encap
- Replace decoders in wiretap/CMakeLists.txt

svn path=/trunk/; revision=37637
2011-06-09 21:37:19 +00:00
Jakub Zawadzki a723874490 - Replace jpeg_jfif decoder, with more generic mime_file (no more 64KB limit!).
- Add new dissector packet-mime-encap which understands mime_file fragmentation.

svn path=/trunk/; revision=37636
2011-06-09 21:21:06 +00:00
Gerald Combs a47485acd9 Move the copyright notice and the config.h include to the top of the
file so that we have the proper definitions in place for large file
support on Solaris (bug 6102).

svn path=/trunk/; revision=37635
2011-06-09 21:13:40 +00:00
Gerald Combs 04f147f4fa Make sure we don't write invalid record lengths.
svn path=/trunk/; revision=37634
2011-06-09 18:31:39 +00:00
Gerald Combs 2eff7bab66 Limit the lengths of some of our patterns. Fixes an infinite loop found
when trying to read a TPNCP data file.

svn path=/trunk/; revision=37625
2011-06-08 20:58:44 +00:00
Bill Meier 2841028cf2 Fix gcc 4.6 "set but not used [-Wunused-but-set-variable]" warning.
svn path=/trunk/; revision=37604
2011-06-07 23:05:53 +00:00
Anders Broman 1932ff6734 Add more missing files.
svn path=/trunk/; revision=37593
2011-06-07 15:05:45 +00:00
Gerald Combs 349273944d Add links to libtool's recommendations for library versions.
svn path=/trunk/; revision=37582
2011-06-06 21:40:40 +00:00
Balint Reczey 311f9acfd5 Fix wiretap headers to allow error-free ABI dumping.
svn path=/trunk/; revision=37543
2011-06-04 21:20:57 +00:00
Balint Reczey 9fe47db306 Reorganize dumpabi targets to keep temporary files
svn path=/trunk/; revision=37540
2011-06-04 16:44:37 +00:00
Bill Meier bf4844eb99 Fix some gcc 'old-style function definition' warnings.
svn path=/trunk/; revision=37482
2011-05-31 15:49:59 +00:00
Chris Maynard 63b50fe2ee Declare the snapshot_length as unsigned.
svn path=/trunk/; revision=37479
2011-05-31 15:27:48 +00:00
Balint Reczey 8ac6683629 Add dumpabi target to Makefiles in wsutil, epan and wiretap directories.
We can use the dumped ABI description for comparing ABI changes between revisions.

svn path=/trunk/; revision=37474
2011-05-31 12:07:25 +00:00
Anders Broman 780978a58d Remove unused varable:
iseries.c:305: warning: unused variable 'tcpformat'

svn path=/trunk/; revision=37467
2011-05-29 19:50:55 +00:00
Anders Broman 3e1baff3b5 From Martin Warnes:
This is significant update to the existing iseries wiretap module. It adds
support for IPv6 (formatted & unformatted comms traces), in addition I've
tidied up the sscanf routines to better handle traces files with offset lines.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5957

svn path=/trunk/; revision=37466
2011-05-29 19:36:21 +00:00
Guy Harris 592f0ba6da Declare wtap_dump_has_name_resolution().
svn path=/trunk/; revision=37215
2011-05-17 22:17:04 +00:00
Michael Tüxen a385b7c9f3 * Don't declare a used arg as unused.
* Really clear the EOF flag. This fixes a bug where
  tshark is not able to do a live capture from a pcapng
  file.

svn path=/trunk/; revision=37207
2011-05-17 19:51:55 +00:00
Gerald Combs 14a9ef9cb2 From Huzaifa Sidhpurwala of the Red Hat Security Response Team: Fix an
integer overflow in wiretap/visual.c.

svn path=/trunk/; revision=37128
2011-05-13 17:12:44 +00:00
Gerald Combs 995d748f05 Check our original record length. Fixes a crash bug found by Huzaifa
Sidhpurwala of the Red Hat Security Response Team.

svn path=/trunk/; revision=37068
2011-05-11 22:36:59 +00:00
Michael Tüxen eaead49183 Fix a wrong name in a debug print statement.
svn path=/trunk/; revision=37061
2011-05-11 12:51:01 +00:00
Tomas Kukosa e3ef98c477 Export wtap_fstat()
svn path=/trunk/; revision=37059
2011-05-11 07:31:18 +00:00
Guy Harris 0a4e212e4b file_read() can return -1; don't just blindly add it to a previous
file_read() return value.  Use wtap_file_read_expected_bytes() in a
number of places.

svn path=/trunk/; revision=37054
2011-05-10 21:53:10 +00:00