Commit Graph

39043 Commits

Author SHA1 Message Date
Jörg Mayer 35508464b2 Start moving files to ui/ and ui/cli/
svn path=/trunk/; revision=41047
2012-02-17 12:30:27 +00:00
Jeff Morriss cdc504ac3f time_t and nstime.nsecs are both signed so don't cast them to unsigned to display them.
svn path=/trunk/; revision=41046
2012-02-17 03:17:34 +00:00
Jeff Morriss d2ddfe8ca6 Fix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6703 :
r35887 added ntp_to_nstime() to packet-ntp since a couple of dissectors had
their own versions.  The version used was from packet-netflow; switch to the
version from packet-zep because that one's math works better: the fractional
time is actually shown.

svn path=/trunk/; revision=41045
2012-02-17 03:02:32 +00:00
Jeff Morriss 1906e9b50d (Re)fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6712 :
The change made in r40742 turned out to not be portable (FreeBSD doesn't have
the timezone global variable), so use another method to determine the current
timezone.

Also fix a bug introduced by r40742's change to display this timestamp in UTC:
if the reported (by the message) time zone has a negative offset to UTC, shift
it forward (not backward) to get UTC (and the opposite for positive offsets).

svn path=/trunk/; revision=41044
2012-02-17 02:53:02 +00:00
Anders Broman 0a7df4d63c Use tce correct IE id
svn path=/trunk/; revision=41043
2012-02-16 20:23:16 +00:00
Michael Tüxen fe30e4ad2e Fix from Irene Ruengeler: Show correct details in the interface dialog on
Windows.

svn path=/trunk/; revision=41042
2012-02-16 20:22:34 +00:00
Guy Harris 55001ef198 With the WTAP_ERR_UNSUPPORTED error, Wiretap supplies a string giving
the details of what in particular is unsupported; report it in TShark
and Wireshark.

Handle WTAP_ERR_RANDOM_OPEN_PIPE in TShark.

Handle WTAP_ERR_COMPRESSION_NOT_SUPPORTED in TShark, and have its error
message in Wireshark not speak of gzip, in case we support compressed
output in other formats in the future.

If we see a second section header block in a pcap-NG file, don't report
it as "the file is corrupted", report it as "the file uses a feature we
don't support", as that's the case - and don't free up the interface
data array, as the file remains open, and Wireshark might still try to
access the packets we were able to read.

svn path=/trunk/; revision=41041
2012-02-16 18:58:40 +00:00
Jeff Morriss 149f655c58 As suggested on the -dev list today, add Wireshark_package.pmdoc to the source
distribution.

To do this, however, requires renaming that directory because automake can't
handle files with spaces in their names.

svn path=/trunk/; revision=41040
2012-02-16 16:31:09 +00:00
Stig Bjørlykke f984b230b2 Register the p772 dissector.
svn path=/trunk/; revision=41039
2012-02-16 09:18:33 +00:00
Jörg Mayer 1169f15d6e Let part of the patch speak for itself:
{ &hf_ieee80211_addr,
-      {"Source or Destination address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0,
-       "Source or Destination Hardware Address", HFILL }},
+      {"Hardware address", "wlan.addr", FT_ETHER, BASE_NONE, NULL, 0,
+       "SA, DA, BSSID, RA or TA Hardware Address", HFILL }},
 

svn path=/trunk/; revision=41038
2012-02-16 08:31:19 +00:00
Anders Broman 245fb95f47 From Naoyoshi Ueda:
Patch to fix DTLS decryption.

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

svn path=/trunk/; revision=41036
2012-02-16 05:21:09 +00:00
Jeff Morriss ea02598924 Fix the rest of of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :
The Lua API does not have FT_*, it has ftypes.*, so use that in the
documentation.  Also, list out each ft so the user knows what the available
options are.

svn path=/trunk/; revision=41035
2012-02-16 03:00:52 +00:00
Guy Harris 5e8d2c79f6 Again, turn off the debug logging; it messes up the fuzz-testing bot.
svn path=/trunk/; revision=41034
2012-02-16 02:06:48 +00:00
Anders Broman a2df0df2ae From Pascal Quantin:
[NAS EPS] PDN Connectivity Request message dissection fixes.

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

svn path=/trunk/; revision=41033
2012-02-15 22:56:20 +00:00
Anders Broman 0b6b3937ab Make it possible to get inforamtion from the read SHB to the one to write out.
svn path=/trunk/; revision=41032
2012-02-15 19:44:16 +00:00
Anders Broman f75ef6be38 From Andy Karch:
Enhance L2TP filters to include assigned IDs.

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

svn path=/trunk/; revision=41031
2012-02-15 06:01:01 +00:00
Guy Harris 197f7b9c02 TYPE_PAD records can have zero bytes of payload; don't treat them as
errors.

svn path=/trunk/; revision=41030
2012-02-14 22:31:33 +00:00
Anders Broman 9fa3449bc8 From David Wei:
Fix handling of piggybacked messages.

svn path=/trunk/; revision=41029
2012-02-14 20:23:02 +00:00
Jeff Morriss 2ebec4aae6 As Guy suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6765 :
Since his r41025 change to the HTTP dissector fixes the problem reported in
the subject bug, revert r41018 (whose check-in comment, BTW, should have
referenced this bug instead of 6817).

svn path=/trunk/; revision=41028
2012-02-14 20:06:48 +00:00
Jörg Mayer 49854a07a3 - dissect_vendor_ie_atheros:
Remove tag_len parameter - it was redundant.
  The length passed no longer contains the vendor id.
- add_tagged_field / TAG_VENDOR_SPECIFIC_IE:
  Reorder so that the ieee "standard" vendor ids come fist,
  after that the really vendor specific stuff.

svn path=/trunk/; revision=41027
2012-02-14 18:34:59 +00:00
Michael Tüxen 68204c94a4 From Anders: Add support for options in the SHB.
From me: Some whitespace changes.

svn path=/trunk/; revision=41026
2012-02-14 17:07:52 +00:00
Guy Harris 7e51e80fe0 To quote section "7.2.1 Type" of RFC 2068, "Hypertext Transfer Protocol
-- HTTP/1.1":

   Any HTTP/1.1 message containing an entity-body SHOULD include a
   Content-Type header field defining the media type of that body. If
   and only if the media type is not given by a Content-Type field, the
   recipient MAY attempt to guess the media type via inspection of its
   content and/or the name extension(s) of the URL used to identify the
   resource. If the media type remains unknown, the recipient SHOULD
   treat it as type "application/octet-stream".

To quote section "4. Encoding of Transport Layer" of RFC 2565, "Internet
Printing Protocol/1.0: Encoding and Transport":

   HTTP/1.1 [RFC2068] is the transport layer for this protocol.

	...

   Note: even though port 631 is the IPP default, port 80 remains the
   default for an HTTP URI.  Thus a URI for a printer using port 631
   MUST contain an explicit port, e.g. "http://forest:631/pinetree".  An
   HTTP URI for IPP with no explicit port implicitly reference port 80,
   which is consistent with the rules for HTTP/1.1. Each HTTP operation
   MUST use the POST method where the request-URI is the object target
   of the operation, and where the "Content-Type" of the message-body in
   each request and response MUST be "application/ipp". The message-body
   MUST contain the operation layer and MUST have the syntax described
   in section 3.2 "Syntax of Encoding". A client implementation MUST
   adhere to the rules for a client described for HTTP1.1 [RFC2068]. A
   printer (server) implementation MUST adhere the rules for an origin
   server described for HTTP1.1 [RFC2068].

So, when choosing a subdissector for HTTP request bodies, search based
on the media type first, and only if we *don't* find a dissector for the
media type, do other stuff such as heuristics or choosing a subdissector
based on the port number.

This fixes a number of problems; in particular, it fixes bug 6765
"non-IPP packets to or from port 631 are dissected as IPP" without
requiring the IPP dissector to attempt to determine whether an entity
body looks like IPP.  It also ensures that the default dissector for
HTTP entity bodies, the "media" dissector, will get the media type
passed to it in pinfo->match_string.

Don't use "!str*cmp()" while we're at it - it's valid C, but the "!" can
make it look as if it's checking for something not being the case when,
in fact, you're checking for equality rather than inequality.  (The
str*cmp() routines don't return Boolean results.)

svn path=/trunk/; revision=41025
2012-02-14 06:00:14 +00:00
Jeff Morriss 38550ff3ce Fix part of https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6764 :
The Lua API does not have BASE_*, it has base.*, so use that.  Also, list out
each base so the user knows what the available options are.

svn path=/trunk/; revision=41024
2012-02-14 03:37:19 +00:00
Jeff Morriss d92857dd6b As suggested in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6763 :
Give an example of a Pref.range's default value.

svn path=/trunk/; revision=41023
2012-02-14 03:24:19 +00:00
Jeff Morriss 045c1d6a1e This dissector calls process_reassembled_data() so there's no need for it to
manually insert the fragment data to the tree (by calling show_fragment_tree());
doing both just means the fragments get added to the tree twice.

svn path=/trunk/; revision=41022
2012-02-14 02:57:48 +00:00
Jeff Morriss 0cb2500e45 There's no need to get the parent of an item we're passing into
proto_tree_move_item(): that function will expects the item, not its parent.

This avoids dissector bugs such as the one reported in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6768 :

** (process:745): WARNING **: Dissector bug, protocol RTP, in packet 82:
proto.c:4273: failed assertion "fixed_item->parent == tree"

svn path=/trunk/; revision=41021
2012-02-14 02:43:58 +00:00
Anders Broman ce751db87c From Pascal Quantin:
fixes for dissection of Traffic Flow Template IE.

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

svn path=/trunk/; revision=41020
2012-02-13 22:46:12 +00:00
Anders Broman 30b48c875c Handle piggybacked messages.
svn path=/trunk/; revision=41019
2012-02-13 22:22:29 +00:00
Jeff Morriss 1122e906e6 Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6817 :
Make the IPP dissector a 'new-style' dissector that does not accept packets
which are clearly not IPP.

This is useful when a user points their web browser at a CUPS server--which
causes the CUPS server to spit out a nice looking web page from which you can
administer the server and/or printers but which up until this fix caused the
IPP dissector to mark the packet as malformed.

svn path=/trunk/; revision=41018
2012-02-13 20:56:40 +00:00
Anders Broman d0b4fb05f0 From Sean Bright:
Wireshark crashes after editing interface settings from capture options dialog.

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

svn path=/trunk/; revision=41017
2012-02-13 18:58:14 +00:00
Anders Broman 196e1ab97b Mark an unused parameter.
svn path=/trunk/; revision=41016
2012-02-13 18:50:31 +00:00
Anders Broman 1bc9a08e41 White space changes.
svn path=/trunk/; revision=41015
2012-02-13 17:34:56 +00:00
Anders Broman c7b1aeb5f5 Drop count is 64 bits
svn path=/trunk/; revision=41014
2012-02-13 17:34:15 +00:00
Anders Broman c894108aca Edit packet comments
svn path=/trunk/; revision=41013
2012-02-13 17:33:05 +00:00
Anders Broman 6971302a1b Drop count is 64 bits
svn path=/trunk/; revision=41012
2012-02-13 17:31:54 +00:00
Jörg Mayer e884926644 Start itemizing.
svn path=/trunk/; revision=41011
2012-02-13 09:13:37 +00:00
Guy Harris 8a4786bd90 In a loop of the form
for (i = 1; i <= N; i++)
		...

the type of "i" must have, as its maximum value, a value >= the maximum
value of N; otherwise, if N is equal to the maximum value that fits in
"i", the loop willnever terminate.  (If that requires "i" to be larger
than you'd like, do the loop as

	for (i = 0; i < N; i++)
		...

which doesn't have that problem.)

Clean up the "i = 1" clause's white space in those for loops.

svn path=/trunk/; revision=41010
2012-02-13 05:35:20 +00:00
Jeff Morriss 21a422463e If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set (in the environment) and we put more
than MAX_TREE_ITEMS in the tree, abort() out rather than throwing an exception.

svn path=/trunk/; revision=41009
2012-02-13 03:14:46 +00:00
Jeff Morriss 670120c481 Fix the crash reported in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6804
For WTAP_ENCAP_ERF files if we find an Extension and/or Multi-Channel header,
ensure that the size of the full pseudoheader is smaller than the packet size
to avoid an underflow and subsequent attempt to allocate a rather large amount
of memory.

svn path=/trunk/; revision=41008
2012-02-13 03:03:03 +00:00
Guy Harris 61c2e0ea40 Do not assume tab stops are set every 4 spaces.
svn path=/trunk/; revision=41007
2012-02-12 23:50:13 +00:00
Jeff Morriss 95c75fb67a Add edit_packet_comment_dlg.h to the source distribution
svn path=/trunk/; revision=41006
2012-02-12 23:17:01 +00:00
Guy Harris 96b89de3e9 Capitalize the "P" in "Packet" in "Add or Edit Packet Comment". Add
"..." after it, as it pops up a dialog box to let you actually type in a
comment.

Add "Add or Edit Packet Comment" to the menubar's Edit menu.

svn path=/trunk/; revision=41005
2012-02-12 23:09:14 +00:00
Michael Tüxen 13beca3bbf Fix debug output.
svn path=/trunk/; revision=41004
2012-02-12 21:56:00 +00:00
Anders Broman ad0df12982 Add a button row.
svn path=/trunk/; revision=41003
2012-02-12 21:15:11 +00:00
Guy Harris 1f971df298 Close parentheses in expert info.
svn path=/trunk/; revision=41002
2012-02-12 20:44:51 +00:00
Guy Harris f36fec7381 Don't trust the pointer value in a packet; it could be invalid, and this
could cause an unsigned length value to be reduced by more than its
value, turning it into a very large value.

I couldn't exactly reproduce bug 6833, but it was due to an attempt to
allocate 4294967110 bytes, and this bug caused remaining_len to equal
4294967110, and it would try to create a reassembled packet tvbuff of
that size, so I'm guessing this fixes 6833.

svn path=/trunk/; revision=41001
2012-02-12 20:03:37 +00:00
Alexis La Goutte 918a7f858b Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=41000
2012-02-12 19:30:57 +00:00
Alexis La Goutte 3f9b521121 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40999
2012-02-12 19:26:53 +00:00
Alexis La Goutte 26eebbc768 Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40998
2012-02-12 19:24:38 +00:00
Alexis La Goutte 9806283d4c Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=40997
2012-02-12 18:06:37 +00:00