Commit Graph

40660 Commits

Author SHA1 Message Date
Guy Harris cf6d9841e3 Keep track, in Wiretap, of whether the file is compressed, and provide
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
2012-05-24 05:05:29 +00:00
Guy Harris 73888ed977 We have to tell cf_save_packets() whether to save them in compressed
form; say "don't" for now.

svn path=/trunk/; revision=42817
2012-05-24 02:30:43 +00:00
Guy Harris b655197a9d In the "Save As" and "Export Specified Packets" code path, do a "safe
save" if the destination file exists.

Don't forbid overwriting an existing file in either of those cases (we
still forbid overwriting the current capture file) - the GUI asks the
user whether they want to do the overwrite, and allows them to cancel
out of it - and don't remove the file before writing to it (doing so
makes the save *un*safe).

Attempt to do a save of an unedited temporary file by just moving the
file on Windows as well as on UN*X - ws_rename() will remove the target
if necessary on Windows (and won't do it as a separate operation before
attempting the rename), so it behaves like ws_rename() on UN*X (which is
just a wrapper around rename()).

svn path=/trunk/; revision=42816
2012-05-24 02:16:53 +00:00
Pascal Quantin 25e70c04d7 From Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7275 :
iso7816: dissect ATR (answer to reset)

svn path=/trunk/; revision=42814
2012-05-23 20:51:38 +00:00
Guy Harris 84bfae28e0 Shrink the height of the "Save As" dialog, now that it no longer has
widgets to specify a range.

svn path=/trunk/; revision=42813
2012-05-23 17:17:39 +00:00
Jakub Zawadzki 401dba8987 Fix bug #7277
Check tvb length before fetching data.

svn path=/trunk/; revision=42812
2012-05-23 12:20:15 +00:00
Anders Broman 551dcff815 Dissect MAC and RLC for CHANNEL_FACH_FDD
svn path=/trunk/; revision=42811
2012-05-23 10:47:52 +00:00
Anders Broman 714705bfe8 Add conv_id.h
svn path=/trunk/; revision=42810
2012-05-23 07:27:35 +00:00
Anders Broman 33794c58a0 Add file missing from http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=42806
svn path=/trunk/; revision=42809
2012-05-23 07:13:43 +00:00
Anders Broman 27596da916 From Florent Drouin:
(Jeff Morriss, Michael Mann )
Add absolute timestamps to -z io,stat

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

svn path=/trunk/; revision=42808
2012-05-23 06:55:31 +00:00
Anders Broman 00ba6b0dc5 From Stephen Donnelly:
Add frame.interface_id support for ERF file format

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

svn path=/trunk/; revision=42807
2012-05-23 06:41:37 +00:00
Anders Broman 0832853fa8 From Robert Bullen:
The Wireshark and tshark TCP conversations stats tables aggregate reused connections into a single line item

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

svn path=/trunk/; revision=42806
2012-05-23 06:36:47 +00:00
Anders Broman a6deef666c Fix a typo
svn path=/trunk/; revision=42805
2012-05-23 06:26:46 +00:00
Anders Broman ab58c26ff3 From Jim Wright:
Enhance the DTN dissector so that it understands ECOS blocks (Extended Class of Service)

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

svn path=/trunk/; revision=42804
2012-05-23 06:25:00 +00:00
Guy Harris 322c827a42 Fix comparison of file extension with extensions for the file type -
compare extension with extension, not dot-plus-extension with extension.

Skip unnecesary test.

Clean up white space.

svn path=/trunk/; revision=42803
2012-05-23 03:27:34 +00:00
Bill Meier 8f5f906146 All:
- whitespace cleanup;
   - Remove redundant code;

   packet-ymsg.c:
   - Check if bytes available before doing tvb fetch for heuristic check;
   - Required tcp pdu "fixed part length" is 10 (not 8);
   - Use val_to_str_const() as appropriate;
   - Remove some unneeded initializations.

svn path=/trunk/; revision=42802
2012-05-23 03:26:35 +00:00
Bill Meier e72c6574ef From Evan Huus: "Fix Potential padding issues in Yahoo dissectors"
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7276

svn path=/trunk/; revision=42801
2012-05-23 03:22:51 +00:00
Guy Harris e6a57c8e93 In Windows, in the Save As and Export Selected Packets dialog, append
the default extension for the file type iff

	the file type we're using has a list of extensions;

	the file has no extension or it has one but it's not one of the
	ones in the list.

*Don't* expect a file extension to be at most 5 characters plus the dot
- the extension for pcap-ng, our default capture file type, is "pcapng",
and that's 6 characters!

svn path=/trunk/; revision=42800
2012-05-23 03:05:17 +00:00
Guy Harris 26974768dd No packet range stuff for the "Save As" dialog.
svn path=/trunk/; revision=42799
2012-05-23 01:06:51 +00:00
Chris Maynard 509917229b Fix Coverity CID 703086: Dereference after null check in decode_tcp_ports().
svn path=/trunk/; revision=42798
2012-05-23 00:56:15 +00:00
Jeff Morriss a59aa64da4 Fix: packet-gsm_a_gm.c:3965:6: error: comparison is always true due to limited range of data type [-Werror=type-limits]
svn path=/trunk/; revision=42797
2012-05-22 23:59:41 +00:00
Guy Harris dba158c167 Suppress a (legitimate) compiler warning for now, and leave a comment
indicating that we should do *something* about nanoseconds values >= 1
billion.

svn path=/trunk/; revision=42796
2012-05-22 23:57:54 +00:00
Guy Harris ef163bb569 Separate callback to control the file type combo box in the "Export
Specified Packets" dialog.

svn path=/trunk/; revision=42795
2012-05-22 22:57:37 +00:00
Guy Harris 07835ce129 Do the "Save As always saves the entire capture, Export Specified
Packets saves specified packets" stuff for Windows.

svn path=/trunk/; revision=42794
2012-05-22 22:39:30 +00:00
Jakub Zawadzki 261fb63ec4 nflog dissector:
- dissect NFULA_TIMESTAMP as 16B time.
 - fix byte_order_types (selecting BE selected little endian)

svn path=/trunk/; revision=42793
2012-05-22 22:34:57 +00:00
Guy Harris c2bb7956c2 "Save As" always saves everything and, when the save is done, makes the
new file the current file, as is the case in most if not all other GUI
applications.

A new "Export Specified Packets" menu option allows you to specify which
packets to write out, with the default being the displayed packets (and
those on which the displayed packets depend for, e.g.  reassembly), and
never makes the resulting file the current file.

The two operations are conceptually distinct.  Lumping them into one
menu item, with the default for "Save As" being "displayed packets only"
and thus making it behave like the latter operation, was causing some
confusion; see, for example, bug 6640.

Make the dialog popped up if you try to "Save As" or "Export Specified
Packets" on top of an existing file ask the "do you want to do this?"
question in the main part of the message, and note in the secondary text
that doing that will overwrite what's in the file; that matches what
TextEdit on OS X and the GNOME text editor say.

svn path=/trunk/; revision=42792
2012-05-22 22:17:57 +00:00
Anders Broman 4e7d87caa2 Fix PCH dissection
svn path=/trunk/; revision=42791
2012-05-22 21:12:59 +00:00
pascal 9746c22630 Dissect Operator Specific Use container in Protocol Configuration Options IE
Put protocol and container ID in a subtree

svn path=/trunk/; revision=42790
2012-05-22 20:34:20 +00:00
Anders Broman e460267b82 Set paging indication and start fixing TFI list.
svn path=/trunk/; revision=42783
2012-05-22 15:39:12 +00:00
Jeff Morriss 913455d3b3 Get rid of non-ASCII chars. Remove a few trailing commas.
svn path=/trunk/; revision=42782
2012-05-22 14:00:19 +00:00
Anders Broman 743b2fb52e cf_save -> cf_save_as
svn path=/trunk/; revision=42781
2012-05-22 12:35:49 +00:00
Anders Broman 2b09e18d75 Collect and use E-DCH data. + one file.
svn path=/trunk/; revision=42780
2012-05-22 11:53:52 +00:00
Anders Broman ec5ec34f1f Collect and use E-DCH data.
svn path=/trunk/; revision=42779
2012-05-22 11:53:12 +00:00
Guy Harris 1d41075db1 Replace the File -> Export menu with separate:
File -> Export Packet Dissections

	    (for the "print to file", "export as CSV", "export as C array",
	    "export as PSML", and "export as PDML" items)

	File-> Export Selected Packet Bytes

	File -> Export SSL Session Keys

	File -> Export Objects

	    (for exporting objects transferred over HTTP, DICOM, or SMB)

menu items.

The operations under Export really weren't that related - about all they
had in common was that they wrote to a file stuff other than packets
in a capture file format; the operations in the groups *under* Export
were related, so the groups are now menu items of their own.

This way, the File menu more immediately indicates what options of that
sort are available.

It also means that the Export Packet Dissections item might make it
clearer that what you get from that is *NOT* something that can just be
read back into Wireshark, as at least one user who asked "how do I get
my capture back from this?" on ask.wireshark.com thought.  If that
doesn't suffice, perhaps renaming it to "Export Dissected Packets" would
help; if *that* doesn't suffice, perhaps Kevin Cullimore's suggestion
that it say "Report" rather than "Export" will do the trick:

	From: Kevin Cullimore <kcullimo@runbox.com>
	Subject: [Wireshark-users] Re: Should the "export as text" item be in an "Export Human-readable..." item in the File menu?
	Date: May 19, 2012 8:31:23 PM PDT
	To: wireshark-users <wireshark-users@wireshark.org>

	Would classifying the asymmetric export (ones that lack a
	corresponding "import" action) formats as "reports" help clear
	up the original ambiguity/misunderstanding? It seems that most
	of the gui-based network tools I'm forced to periodically
	interact with rely upon that term with at least some success.

(Or perhaps some other verb would be right in some cases, e.g. "Save SSL
Session Keys".)

This also sets a pattern for another upcoming change - splitting "Save
As" into "Save As", which always saves every packet and makes the new
file the current file, and "{Verb} Specified Packets", which lets you
specify which packets to save and does *not* make the new file the
current file.  That'd simplify the code a bit, and might clear up the
new only-in-the-trunk issue in bug 6640 - having "Save As" default to
saving displayed packets currently means that it acts more like the
latter of those functions.

svn path=/trunk/; revision=42778
2012-05-22 11:44:55 +00:00
Guy Harris ae7d57d5fa We're an editor now, as we let you add, delete, and edit frame comments,
so "Save" should, for non-temporary files, mean "save the current state
of the capture file on top of the existing file" without prompting for a
file name.

That means we have to do a "safe save" - i.e, write the capture out to a
new file and, if that succeeds, rename the new file on top of the old
file - as the actual packet data to write out is in the file we're
overwriting, not in memory.  (We'd want to do that anyway, of
course....)

Update some comments.

Clean up indentation slightly, and get rid of an unnecessary variable
(in all the cases where we use it, we assign it the same value, and that
value isn't modified out from under us before we use it).

Note that after a "Save", or a "Save As" that writes out all captured
packets, we shouldn't have to close the current file and open the new
file and reread it - we should be able to open the new file and update
the frame offsets in the frame_data structures.

Note that we need to do some a better job of reporting rename failures.

svn path=/trunk/; revision=42777
2012-05-22 10:36:40 +00:00
Guy Harris df7289bb99 Note that, given that ws_rename() is a wrapper around ws_stdio_rename()
on Windows, and that ws_stdio_rename() uses MoveFileEx() with
MOVEFILE_REPLACE_EXISTING and should therefore remove the target if it
exists, the extra "remove the target first" stuff should not be
necessary on Windows - if we remove it, it also keeps the code from
removing the target and then having the rename fail, with the result
that the target no longer exists.

svn path=/trunk/; revision=42776
2012-05-22 10:05:01 +00:00
Guy Harris 03f0e46d6f Update comments to reflect that the GLib version is no longer relevant
(we require GLib 2.14 or later, and always use UTF-8 for pathnames on
Windows), to note that ws_stdio_rename() should have UN*X-style
rename semantics in that it removes the target if necessary, and to give
more details in other ways.

Clean up indetation a bit.

svn path=/trunk/; revision=42775
2012-05-22 09:57:18 +00:00
Ronnie Sahlberg 2a2dc8c5f3 TCP: Some protocols running ontop of TCP needs the PDUs to be delivered in order. for example decryption of DCERPCoverHTTP.
For such protocols, hte state gets out of sync of for example the same PDU is invoked twice in a row, which sometimes can happen if there is tcp retransmission and we see the same PDU twice. First for hte original segment and a second time for the tcp retransmission.
These protocols might lack an easy way to detect that a PDU is seen twice or out of order.

To handle this a little better, offer a TCP option that defaults to being disabled but when enabled skips invoking any subdissector for retransmitted or out of order packets.
(For some virtualization environments it sometimes becomes VERY common to see false tcp retransmissions due to segments being captured twice making this even worse)


We dont want this option to default to ON because for most cases we do want the current behaviour where the subdissector is called twice, or more, for any PDU that is retrasnmitted on the TPC layer.
For example, assume a SMB response packet is retransmitted on the TCP level.
This may result in a capture file that looks like
1 -> SMB request
2 <- SMB response to 1  
... 1 second ...
3 <- SMB response to 1   TCP retransmission

For this case we definitely want packet 3 to be passed to the SMB layer so that 
the request/respons ematching will detect that the response time for this transaction was > 1.0 second
We want smb.time to indicate the delta betwenn packets 1 and 3
as well as the SMB Service Response Time to indicate that this command took very long.





svn path=/trunk/; revision=42774
2012-05-22 07:51:12 +00:00
Ronnie Sahlberg 7e0c167eb0 HTTP: RPC/HTTP do a better detection and parsing of RPC over HTTP
From Matthieu Patou <mat@matws.net>

svn path=/trunk/; revision=42773
2012-05-22 06:23:36 +00:00
Ronnie Sahlberg b3bfefd03c packet-smb2: dissect the channel sequence in the SMB 2.2 header
From Stefan Metzmacher <metze@samba.org>

svn path=/trunk/; revision=42772
2012-05-22 05:56:39 +00:00
Ronnie Sahlberg ba54127556 SMB: Add dissection of TRANS2_REQUEST_TRANSPORT_ENCRYPTION messages
From Stefan Metzmacher <metze@samba.org>

svn path=/trunk/; revision=42771
2012-05-22 05:55:05 +00:00
Ronnie Sahlberg 50b992d139 SMB: Dissect TRANS2_SET_FS_INFORMATION infolevel
From Stefan Metzmacher <metze@samba.org>

svn path=/trunk/; revision=42770
2012-05-22 05:53:28 +00:00
Ronnie Sahlberg 920b760f15 SMB: Call dissect_nt_quota() via a new dissect_sfsi_request/response()
From Stefan Metzmacher <metze@samba.org>


svn path=/trunk/; revision=42769
2012-05-22 05:51:16 +00:00
Ronnie Sahlberg 4ded3c7fe0 SMB2: Add dissection of the encrypted SMB2 headers
From Matthieu Patou <mat@matws.net>


svn path=/trunk/; revision=42768
2012-05-22 05:48:55 +00:00
Ronnie Sahlberg cf0a6d0b96 SMB2: Add support for the "encrypted" flag for shares
From Michael Adam <obnox@samba.org>

svn path=/trunk/; revision=42767
2012-05-22 05:46:47 +00:00
Ronnie Sahlberg 0882a858c4 SMB2: Fix, the flag is called PERSISTENT_HANDLES, not LARGE_MTU
From Michael Adam <obnox@samba.org>


svn path=/trunk/; revision=42766
2012-05-22 05:45:30 +00:00
Ronnie Sahlberg b5b00d5654 SMB2: Add support for SMB2_GLOBAL_CAP_ENCRYPTION flag
From Michael Adam <obnox@samba.org>


svn path=/trunk/; revision=42765
2012-05-22 05:44:07 +00:00
Guy Harris 90c43120ca The GUI's state machine requires that, when reloading a capture after a
save, we post capture file callback events similar to the ones posted
when reading a capture - otherwise, the reload will leave the welcome
screen up.

Rename cf_cb_file_save_reload_finished to cf_cb_file_reload_finished,
add a cf_cb_file_reload_started callback, have them work similarly to
read_finished and read_started except that the reload uses "Reloading"
in the progress bar and status bar.

Clean up some indentation while we're at it.

svn path=/trunk/; revision=42764
2012-05-22 03:52:12 +00:00
Guy Harris d231102428 Note that packet_range_calc() and packet_range_calc_user() can be
painfully slow with a large capture.

svn path=/trunk/; revision=42763
2012-05-22 02:37:32 +00:00
Jeff Morriss 7755747797 Finish fixing https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7270#c4 :
Revert r42758 as it only helps in one case; rather, fix it correctly: if
we're redissecting or refiltering, clear any frame dependencies as we go
along.  (Fortunately, frame dependencies are all forward dependencies--
meaning that a given frame can only be depended upon by a later frame--
so we can do this as we rescan the packets/frames.)

svn path=/trunk/; revision=42762
2012-05-22 01:59:34 +00:00