aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
AgeCommit message (Collapse)AuthorFilesLines
2014-02-08Have macros to handle the range check and byte swapping.Guy Harris1-56/+44
Combine the check for whether the field is within the packet data and the swapping of the field into macros that do both, and use them. Change-Id: I1db4c5fd76172edd44abc9fb111d79a2537c6c9d Reviewed-on: https://code.wireshark.org/review/130 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-02-06Make some routines take a struct wtap_pkthdr * as an argument.Guy Harris10-154/+146
For some routines that take multiple arguments that come from a struct wtap_pkthdr, pass a pointer to the struct wtap_pkthdr in question, rather than the separate arguments. Do this even if we're passing expressions that were earlier assigned to the struct wtap_pkthdr fields in question. This simplifies the calling sequences and ensures that the right values are picked up by the called routine; in at least one case we were *not* passing the right values (the code to handle Simple Packet Blocks in pcap-ng files). Also, call the byte-swapping routines for pseudo-header fields only if we need to do byte-swapping. Change-Id: I3a8badfcfeb0237dfc1d1014185a67f18c0f2ebe Reviewed-on: https://code.wireshark.org/review/119 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-02-03allow tshark reading from pipesPeter Hatina1-1/+2
Change-Id: If20a14b949667911df44f09c6a705b7645d4c49e Reviewed-on: https://code.wireshark.org/review/85 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2014-02-02Fix build on FreeBSD 10.0Edwin Groothuis1-1/+2
Change-Id: I6be0d2dfe3b44f166233b1dd20ef02c10a024f97 Reviewed-on: https://code.wireshark.org/review/74 Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2014-01-26Drop support of Visual Studio 2005Alexis La Goutte2-16/+0
* Remove _MSC_VER < 1500 check * Cleanup config.nmake See http://www.wireshark.org/lists/wireshark-dev/201305/msg00159.html svn path=/trunk/; revision=54965
2014-01-22Don't write out packets that have a "captured length" bigger than we'reGuy Harris19-9/+154
willing to read or that's bigger than will fit in the file format; instead, report an error. For the "I can't write a packet of that type in that file type" error, report the file type in question. svn path=/trunk/; revision=54882
2014-01-15Reject pcap files that claim on-the-wire packet sizes > 64MB. This fixes manyEvan Huus1-0/+18
heuristic cases broken in r49999 when we permitted packets > 64KB, since that relaxed so severely the definition of a valid packet header. 64MB is an arbitrary and perhaps suboptimal number, but it seems to do the right thing in all the examples I have handy. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9634 svn path=/trunk/; revision=54812
2014-01-12Bluetooth/Ubertooth improvements. Bug 9606 ↵Michael Mann3-13/+25
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606) From Michal Labedski 1. add support for new btsnoop "format" introduced by BlueZ team in "btmon" tool 2. Bluetooth: Make EIR, AD and COD more generic 3. Bluetooth: HCI/LL: Update Error Codes to Core 4.1 Specification 4. Ubertooth: Fix response command handling 5. Ubertooth: Update to support firmware version 6. Ubertooth: Dissect by Vendor Id/Product Id svn path=/trunk/; revision=54699
2014-01-10Make internal functions staticAnders Broman1-1/+1
svn path=/trunk/; revision=54686
2014-01-08TFShark (Terminal Fileshark) v.001. Bug 9607 ↵Michael Mann1-2/+2
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9607) This is a VERY PRELIMINARY version of tfshark. It's an attempt to jumpstart FileShark and its architecture. Right now it's mostly just a very stripped down version of tshark with all of the necessary build modifications (including now building filetap library since tfshark depends on it) This code has helped me identify what I believe to be all of the necessary layers for a complete fileshark architecture. And those layers will slowly be added in time (patches always welcome!). svn path=/trunk/; revision=54646
2014-01-02No seek-read routines use the length argument, so eliminate it fromGuy Harris50-149/+93
wtap_seek_read(). svn path=/trunk/; revision=54570
2014-01-02Don't use the length argument to the seek-read routine; no otherGuy Harris1-11/+3
seek-read routine does that. Pass the length we just filled in to buffer_assure_space() in the seek-read routine, and use that in the memcpy() as well. svn path=/trunk/; revision=54568
2014-01-02Don't pass the wtap * to a routine if it's not needed.Guy Harris1-22/+17
svn path=/trunk/; revision=54565
2014-01-02Fill in the struct wtap_pkthdr in the seek-read routine.Guy Harris1-41/+56
svn path=/trunk/; revision=54564
2014-01-02Have a routine that reads and processes the record header, and use it inGuy Harris1-74/+58
both the read and seek-read routines. Use the packet length read from the packet header when reading packets randomly. svn path=/trunk/; revision=54549
2014-01-02Process the packet header and data in common code, shared by the readGuy Harris1-297/+246
and seek-read routines. svn path=/trunk/; revision=54548
2014-01-02Read the packet header in the seek-read routines as well as the readGuy Harris1-18/+82
routines. svn path=/trunk/; revision=54547
2014-01-01If the uncompression buffers are empty, they have no data; set the countGuy Harris1-0/+4
of bytes in them to 0, as there's no data in them, and set the offset in that buffer of the stream's current position, to 0, as we're currently at the beginning of the file in both streams. This fixes some tricky-to-reproduce errors (which show up only if the ngsniffer_t structure is allocated from data that's been allocated, written to in those variables, and freed). #BACKPORT 1.8, 1.10 svn path=/trunk/; revision=54544
2014-01-01Back out r54523 - more work is needed on it, and some testing found anGuy Harris1-12/+4
unrelated uninitialized-data bug that I want to fix in the next commit, and then backport. svn path=/trunk/; revision=54543
2013-12-31Use a common code path for most of both sequential and random fileGuy Harris1-43/+63
access. We currently can't provide a time stamp when randomly reading, so don't set WTAP_HAS_TS in that case. svn path=/trunk/; revision=54527
2013-12-31Back out a change so that we can check it in again with the correctGuy Harris1-63/+43
commit message. svn path=/trunk/; revision=54526
2013-12-31When reading MIME-encapsulated files, read the entire file at once,Guy Harris1-46/+54
don't break it into chunks. This means we don't need to do reassembly in the MIME-encapsulated-data dissector. svn path=/trunk/; revision=54525
2013-12-31When reading MIME-encapsulated files, read the entire file at once,Guy Harris1-43/+63
don't break it into chunks. This means we don't need to do reassembly in the MIME-encapsulated-data dissector. svn path=/trunk/; revision=54524
2013-12-31When reading sequentially, pass the packet data length toGuy Harris1-4/+12
ngsniffer_read_rec_data(), and separatelyskip extra data after that. When reading randomly, use the packet length read from the packet header. svn path=/trunk/; revision=54523
2013-12-31Use the packet length read from the packet header when reading packetsGuy Harris1-2/+2
randomly. svn path=/trunk/; revision=54522
2013-12-31Trust the packet length we calculate when reading packets randomly.Guy Harris1-8/+1
svn path=/trunk/; revision=54521
2013-12-31Make it clearer that we're using the packet length read from the packetGuy Harris1-1/+2
header when reading packets randomly. svn path=/trunk/; revision=54520
2013-12-31Use the packet length read from the packet header when reading packetsGuy Harris1-2/+3
randomly. svn path=/trunk/; revision=54519
2013-12-31Use the packet length read from the packet header when reading packetsGuy Harris1-8/+9
randomly. svn path=/trunk/; revision=54518
2013-12-31Use the packet length read from the packet header, and check for an EOFGuy Harris1-3/+7
and treat it as an error, when reading packets randomly. svn path=/trunk/; revision=54517
2013-12-31Use the packet length read from the packet header, and check for an EOFGuy Harris1-3/+6
and treat it as an error, when reading packets randomly. svn path=/trunk/; revision=54516
2013-12-30Clean up white space.Guy Harris1-3/+3
svn path=/trunk/; revision=54504
2013-12-30Add an "ATM reassembly failed" flag for capture file readers to provide,Guy Harris2-2/+9
and set it in NetXRay/Windows Sniffer files if the putative "ATM reassembly failed" flag is set and, if reassembly failed, don't attempt to dissect the packet. svn path=/trunk/; revision=54503
2013-12-30Fix a couple of old typos;Bill Meier1-20/+43
Use a consistent formatting style for function defs; Add editor modelines. svn path=/trunk/; revision=54501
2013-12-30Squelch compiler warnings.Guy Harris1-8/+5
svn path=/trunk/; revision=54500
2013-12-30More reverse engineering.Guy Harris1-64/+298
svn path=/trunk/; revision=54497
2013-12-30For file formats that don't have magic numbers, so they're recognized byGuy Harris2-65/+375
heuristics, but do have a file extension that files of that format are likely to have, use the extension of the file we're opening, if it has one, as a hint for which heuristics to try first. svn path=/trunk/; revision=54495
2013-12-28use the correct record length for an IPv6 record in the NRBMartin Kaiser1-2/+3
this is already correct in 1.8 and 1.10 and was accidentially(?) changed in r52176 svn path=/trunk/; revision=54479
2013-12-26Add some new tags seen.Guy Harris1-1/+48
svn path=/trunk/; revision=54460
2013-12-21isascii(x) && isprint(x) -> g_ascii_isprint(x)Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54328
2013-12-20Change G_GINT64_CONSTANT(xxxxU) to G_GUINT64_CONSTANT(xxxx)Jakub Zawadzki2-8/+8
svn path=/trunk/; revision=54314
2013-12-17Get rid of trailing periods in some error messages for consistency; theGuy Harris2-7/+7
others don't have trailing periods, and the caller adds a period as desired. svn path=/trunk/; revision=54199
2013-12-14Cast away shorten-64-to-32 warnings.Gerald Combs1-5/+5
svn path=/trunk/; revision=54101
2013-12-14Squelch a bunch of shorten-64-to-32 warnings by parsing all of ourGerald Combs1-14/+16
numeric values using strtoul and casting it the result to a guint32. Hopefully no user or session IDs are negative or greater than 32 bits. svn path=/trunk/; revision=54100
2013-12-13And another one.Guy Harris1-2/+2
svn path=/trunk/; revision=54018
2013-12-13Add some more file types misidentified as VWR files.Guy Harris1-4/+4
svn path=/trunk/; revision=54017
2013-12-13The IxVeriWave heuristic now gets more false positives (after, IGuy Harris1-1/+6
suspect, the change to handle VWR files with no packets); shuffle it after all the types we've seen misidentified as VWR files. svn path=/trunk/; revision=54012
2013-12-12Appease Visual Studio Code Analysis by ensuring that the string in csec[] is ↵Chris Maynard1-0/+1
NULL-terminated. svn path=/trunk/; revision=53995
2013-12-07Add WTAP_ENCAP_NETLINK which maps to DLT_NETLINK /253/Jakub Zawadzki3-0/+6
svn path=/trunk/; revision=53834
2013-12-03wiretap: start using <wsutil/pint.h>Jakub Zawadzki23-329/+260
svn path=/trunk/; revision=53764