Commit Graph

26402 Commits

Author SHA1 Message Date
Stig Bjørlykke aa6400ad1a Sync t125 from asn1.
This adds "Remove unused hf entries" from Anders.

Change-Id: I1150f34f0eafab03415339d4b34f5f2e7f69f85b
Reviewed-on: https://code.wireshark.org/review/3499
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Stig Bjørlykke <stig@bjorlykke.org>
2014-08-08 08:37:38 +00:00
Michał Orynicz 735263e58e Logcat text: small fixes
* fix exporting "beginning of" frame logs into info field
  * add missing "Failure" level to regexp in wiretap part
  * remove usage of GDateTime from wiretap part

Change-Id: Ibdea730623241cccbbc1694a34daa308e48c0a89
Reviewed-on: https://code.wireshark.org/review/3493
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-08-08 08:12:10 +00:00
Guy Harris 4a30cfd6ab Use crc32_ccitt_tvb_offset_seed().
One fewer tvb_get_ptr() call.  Yay!

Change-Id: I08ac4888d696f0b6b6a17e9e22f3dfec5aedad59
Reviewed-on: https://code.wireshark.org/review/3496
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 07:48:07 +00:00
Guy Harris d3832d770d Get rid of no-longer-used variable.
Change-Id: I63bde706a6561c834aab9b10975dbb242c65d998
Reviewed-on: https://code.wireshark.org/review/3495
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 07:36:41 +00:00
Guy Harris 6495ab4542 Get rid of no-longer-used variable.
Change-Id: I64d1177b9a424ede9d1f687843e38bd37723c137
Reviewed-on: https://code.wireshark.org/review/3494
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 07:20:47 +00:00
Pascal Quantin 40d5c503a7 Logcat Text: drop use of GDateTime
It's only available from GLib 2.26 while we only require 2.16

Change-Id: I3c2e6748aa93b9af7158f5051433baff6a7c0324
Reviewed-on: https://code.wireshark.org/review/3480
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-08 05:55:19 +00:00
Pascal Quantin 4b78eadd38 Logcat Text: fix assert when dissecting PID or TID
Per Android documentation, the PID and TID are int

Change-Id: I05326d134047315d61a873c33dd02a48d1849f8d
Reviewed-on: https://code.wireshark.org/review/3481
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-08 05:54:11 +00:00
Michael Mann a22b7075f8 Eliminate proto_tree_add_text from some dissectors.
Change-Id: I6f1710a093fc548c718defa9b40ab68877ede977
Reviewed-on: https://code.wireshark.org/review/3470
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-08 05:51:52 +00:00
Guy Harris 532a98dc8c Wrap tvb_get_ptr() calls in the CRC routines.
That doesn't eliminate them, but at least it encapsulates them.

Change-Id: I78f0202cb7d2eb86e2dce220b2b97acc256d1e42
Reviewed-on: https://code.wireshark.org/review/3489
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 03:59:05 +00:00
Guy Harris 20c0fffc92 Wrap some tvb_get_ptr calls in crc32c_tvb_offset_calculate().
This eliminates some tvb_get_ptr calls from dissectors, as part of
trying to minimize if not eliminate its use in dissectors (it's a bit of
what's called an "attractive nuisance", in that users who don't
understand what it does - and doesn't! - do may use it in ways that are
unsafe, e.g. thinking you can use it to get a null-terminated string
from a packet).

It also eliminates the possibility of passing one length to
tvb_get_ptr() and another to crc32c_calculate().

Change-Id: I8a07168d0bc088b45d607e00c5bb1d98421ebc73
Reviewed-on: https://code.wireshark.org/review/3488
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-08 03:39:08 +00:00
Evan Huus c10396dbbf Fix read-past-end-of-buffer in CUPS dissector
Even when the protocol specifies that a string ends in a null-terminator, there
are packets which won't. Therefore:

**the result of tvb_get_ptr SHALL NOT be treated as a null-terminated string**

We need to post that in big neon lettering somewhere obvious.

Bug: 10353
Change-Id: Ie30cd13353a9830311e573e734dd89dc07622c98
Reviewed-on: https://code.wireshark.org/review/3485
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-08 00:31:50 +00:00
Alexis La Goutte 35453cf118 HTTP: Fix indent (use tab)
Change-Id: I4056d8b876f71c1f9ce4804a4dc4b0d16ab5afda
Reviewed-on: https://code.wireshark.org/review/3409
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-07 13:41:31 +00:00
AndersBroman 5b5d9a87c8 Add two new true_fals strings.
Change-Id: I43440ef6fac1a0c01eec630d2238fcfb085255a5
Reviewed-on: https://code.wireshark.org/review/3471
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-07 13:34:29 +00:00
Pascal Quantin ccbe5fd0b9 MIPv6: fix dissection of Service Selection Identifier
APN field is not encoded as a dotted string so the first character is not a length

Bug: 10323
Change-Id: Ia62137c785d505e9d0f1536a333b421a85480741
Reviewed-on: https://code.wireshark.org/review/3461
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-07 06:49:10 +00:00
Martin Kaiser 378e8b71c0 we're matching against {any}/port_b, not address_b
Change-Id: Ief00f09225805c6c7488d92f8aa5b59c21575788
Reviewed-on: https://code.wireshark.org/review/3464
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-06 19:45:14 +00:00
Martin Kaiser 083006b631 when a linux USB isochronous descriptor is selected,
highlight its data part as well

Change-Id: Ia69ac6b1460245ffa44b6ad3b17f07948baf03d4
Reviewed-on: https://code.wireshark.org/review/3463
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-06 19:44:58 +00:00
AndersBroman 892703f918 The heuristic for T.125 per is too week and we do not have a PER dissector
for T.125 so remove the test.
Remove unused hf entries.
Fixes bug 10350.

Change-Id: If28de7877388c669082f8c8a21dd63107d417fbf
Reviewed-on: https://code.wireshark.org/review/3458
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 13:36:44 +00:00
Alexis La Goutte 53b209650b Add Modelines and fix indent
Change-Id: I7abb415bccff4de846ab273eed3e3b2a434d94b7
Reviewed-on: https://code.wireshark.org/review/3455
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 10:48:33 +00:00
AndersBroman 530f70fec2 Try to fix:
packet-mq.c:3653: warning: declaration of 'tree' shadows a parameter

Change-Id: I1226dac3764b15a097378aed7696567b9224f4c4
Reviewed-on: https://code.wireshark.org/review/3457
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 10:45:19 +00:00
Sean O. Stalley d67e40e501 Added dissection of Device Capability Descriptors in CapResp Packets
CapResp Packets may contain Device Capability Descriptors.
This patch allows wireshark to show what descriptors are present,
& checks that their length fields are valid.

See section 6.3.3 of the MA USB spec for more information.

Change-Id: Ia120435bdffcced091b67e66e0ba8f1a750358db
Reviewed-on: https://code.wireshark.org/review/3330
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-08-06 09:14:09 +00:00
AndersBroman febbe1286d Add casts to make logcat-text build on Win64
Change-Id: I38d65a06b925653e22a59a4a4cd0a53a87072b49
Reviewed-on: https://code.wireshark.org/review/3456
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 08:49:56 +00:00
robionekenobi 09357c116c mq improvements:
- handle RFH structure
- use tvb_reported_length...,
- Add Conversation/Request in row display

Change-Id: I84c5cf3e9479d91b363eb093e71bb6bdf07e8194
Reviewed-on: https://code.wireshark.org/review/3354
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 06:49:31 +00:00
Michał Orynicz 1a02ca0150 Add support for android logcat text files
Wireshark already supports reading and writing logcat
logs saved in binary files. Binary format, although
better, is used less often than saving those logs to
text files.

This patch extends wireshark's support for android logcat
logs to reading and writing logcat logs in text files.

Features:
* support for tag, brief, process, thread, time, threadtime
  and long formats
* saving in original format
* it's generally awesome

Change-Id: I013d6ac2da876d9a2b39b740219eb398d03830f6
Reviewed-on: https://code.wireshark.org/review/1802
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 06:46:50 +00:00
Alexis La Goutte 71d07bcbbf MySQL: Add support of SSL in MySQL
Launch SSL dissector when MySQL switch to SSL

Ping-Bug:9515
Bug:10338
Change-Id: I96487d6d2131db3678f4a24095d702b6cd4ea5b2
Reviewed-on: https://code.wireshark.org/review/3411
Reviewed-by: Daniël van Eeden <wireshark@myname.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 04:48:45 +00:00
Daniël van Eeden 91b2adfe49 MySQL: add utf8mb4 charsets
Change-Id: I7dfda411ed1d91e9eea43a1eb0cbc70807fedfbb
Reviewed-on: https://code.wireshark.org/review/3451
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 04:45:31 +00:00
Daniël van Eeden 2dcec4e268 MySQL: decode pwd and charset for COM_CHANGE_USER
This fixes decoding of authetication data in MySQL 5.6+
It also decodes the charset.

Bug: 10351
Change-Id: Ic76961e94d2e3bf15bc72e279128a5251acfd749
Reviewed-on: https://code.wireshark.org/review/3441
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-06 04:45:00 +00:00
Bill Meier f3dd7fe1eb Fix whitespace/indentation to match editor modelines.
Change-Id: I3445ae22f10584582d465bf632942e016f5f70ca
Reviewed-on: https://code.wireshark.org/review/3452
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 20:42:21 +00:00
Martin Kaiser dfe331e35e we may set a TFTP port via Decode As
take this setting into account when we try to detect the first packet of
a tftp transfer

Change-Id: Ia80f9b5f994b02ecaaa063308b1a87d00fe0dafe
Reviewed-on: https://code.wireshark.org/review/3450
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:53:06 +00:00
Martin Kaiser 7f030bb065 we either have a source or a destination file name
when we set one, we clear the other

Change-Id: I7c316dc9cc7b2c93cfa1b00eb617553f55a58715
Reviewed-on: https://code.wireshark.org/review/3449
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:52:47 +00:00
Martin Kaiser ad20fd63fe delete the port range before re-creating it
Change-Id: I80f7e438cbb44c40ee28f1eb78a7779f43563732
Reviewed-on: https://code.wireshark.org/review/3448
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:52:31 +00:00
Martin Kaiser cbb68ba64d if the original packet already contains a file name,
don't add a generated tree item with the filename stored in the
conversation

Change-Id: Ia9a7fe712d0dd8241399e456509019b8e3902554
Reviewed-on: https://code.wireshark.org/review/3447
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:52:10 +00:00
Martin Kaiser d60ce0b991 no need for if(tree)
display the opcode first, followed by the file name

Change-Id: Ic5dd7409414d2f748c326c59a4b850dc2244da1f
Reviewed-on: https://code.wireshark.org/review/3446
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:51:54 +00:00
Martin Kaiser c5ca59f0bf delete unnecessary return;
Change-Id: Ia91d51acd7dedd18ba5d0a73bc353b2d198474c7
Reviewed-on: https://code.wireshark.org/review/3445
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:51:33 +00:00
Martin Kaiser 81134a8a77 fix a warning with gcc 4.7.2 on linux
packet-isakmp.c: In function 'dissect_isakmp':
packet-isakmp.c:1873:6: error: 'ivd' may be used uninitialized in this function [-Werror=maybe-uninitialized]
packet-isakmp.c:1747:14: note: 'ivd' was declared here
cc1: all warnings being treated as errors

(not sure why the compiler complains here)

Change-Id: I9b9589d3193b0dc37f2db8f6c4c6727b2a92eaaa
Reviewed-on: https://code.wireshark.org/review/3444
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-05 19:42:27 +00:00
Bill Meier 72c2a33437 Do various minor dissector changes:
- remove unneeded initializers;
- replace tabs in files with editor mode line 'expandtabs';
- col_set_str() --> col_add_str() (in one case);
- tvb_length() -- > tvb_reported_length() (in one case);
- do some whitespace & indentation fixes/changes.

Change-Id: Ib8ffbbcdb6e4a74c0df6021a75430ae1ef9ae089
Reviewed-on: https://code.wireshark.org/review/3435
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 19:07:28 +00:00
Bill Meier 9dc332454a Various minor dissector fixes/changes
- Fix a few minor bugs;
- Remove unneeded #includes;
- Do some whitespace/long_lines formatting changes.

Change-Id: I97239fa20727498604682239cda0e1b87b10f4bc
Reviewed-on: https://code.wireshark.org/review/3434
Petri-Dish: Bill Meier <wmeier@newsguy.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-05 19:07:01 +00:00
Alexis La Goutte 601d99d77c MySQL: Request Unknown (133) (SSL: Handshake response packet)
After the MySQL protocol has established a SSL connection the first packet is a HandshakeResponse packet (aka Login Request).

http://dev.mysql.com/doc/internals/en/ssl.html
http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse

The loginrequest within the SSL stream is not packet_number 1. (it however is the first packet in the ssl stream)

Issue found by Daniël van Eeden

Change-Id: Ic6110c38f7206a9788158c5c6861064939644221
Ping-Bug:10338
Reviewed-on: https://code.wireshark.org/review/3408
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Daniël van Eeden <wireshark@myname.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-05 11:52:38 +00:00
Sean O. Stalley 3b91474af5 Dissection of CapResp Packets
Added dissection of MAUSB Capability Response (CapResp) fields.

Change-Id: I41044a25c72b72ef9c8ef5640a609eb6448b054d
Reviewed-on: https://code.wireshark.org/review/3329
Reviewed-by: Evan Huus <eapache@gmail.com>
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 07:47:03 +00:00
Michael Mann 9d5f9141af Eliminate proto_tree_add_text from some dissectors.
Other minor cleanup while in the area.

Change-Id: Id8d957d3d68a2e3dd5089f490bd59d773e1be967
Reviewed-on: https://code.wireshark.org/review/3427
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-08-05 07:36:26 +00:00
Guy Harris 7c72f70f59 Remove a comment asking a question, as the answer is "no".
I.e., no, the epan/decode_as.c stuff belongs in libwireshark, not libui,
because dissectors need to be able to say "I support decode-as...".
Code to implement the UIs that allow decode-as entries to be specified
would belong in libui.

Change-Id: Ibf9da19e752481a3892d0f03d0a0537590ab1811
Reviewed-on: https://code.wireshark.org/review/3416
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-04 22:01:06 +00:00
Kevin Cox 7bc0b9bfc6 Initial Ceph Dissector.
This is the first version of a Ceph dissector.  It is not complete but
is far enough along to be helpful to many people working with Ceph.

Currently the dissector can fully dissect the Ceph protocol and has
support for full dissection of most common messages.  For the other
messages for which full dissection is not available their metadata is
parsed and shown along with the raw data of the different message
sections.

Change-Id: Ic7917a3d01148c6fe2f9ea2c13ecd09ecc06c2d7
Reviewed-on: https://code.wireshark.org/review/1889
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-04 21:50:25 +00:00
Alexis La Goutte 4a2e968ff3 MySQL: decoding response fails
MySQL Response packets within an SSL stream are not correctly decoded.

When not using SSL:
- Decoding works
- Multiple MySQL protocol entries per frame
- Info==Response

With SSL:
- Decoding partly works
- One MySQL protocol entry per fram
- Info==Response Tabular

From me:
call dissect_mysql (with tcp_dissect_pdus..) and not dissect_mysql_pdu !

Bug: 10339
Change-Id: I253f6683105ed23b49a72865fea005e31e2594d8
Reviewed-on: https://code.wireshark.org/review/3412
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-04 19:22:29 +00:00
Alexis La Goutte c540e556d5 DNS: Fix minor typo (Missing a space...)
Change-Id: Ie983ba3b88102c4f3749ab2f13d519eb78838bbc
Reviewed-on: https://code.wireshark.org/review/3410
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-04 19:17:26 +00:00
Jakub Zawadzki 76e4698b6d Always create subtree in proto_item_add_subtree().
It might fix bug #10345

Ping-Bug: 10345
Change-Id: I695a2955a9bb0248ff3967bdaef004389500bbc9
Reviewed-on: https://code.wireshark.org/review/3402
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Tested-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-04 14:29:43 +00:00
Evan Huus 0294b29527 Try to detect overflow without causing signedness warnings.
Change-Id: I957ead1f674e2c56e9c741841fea11395769b238
Reviewed-on: https://code.wireshark.org/review/3398
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-04 00:32:15 +00:00
Evan Huus efb8a1ee43 Check for multiplicative overflow in the wmem_alloc_array macros.
Bug:10343
Change-Id: Iea511c806b92999b3b497f94886c46a818100a23
Reviewed-on: https://code.wireshark.org/review/3396
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-04 00:08:19 +00:00
rvichery 5b9acdaf61 Stateless Transport Tunneling: Add STT dissector support
Bug: 10282
Change-Id: Id3e53c53d024a74df0dfb5254e26d4594eb2e9a4
Reviewed-on: https://code.wireshark.org/review/3036
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-08-03 21:05:38 +00:00
Guy Harris 79f966591b Squelch some compiler warnings.
The version of GCC on the OS X 32-bit buildbot isn't smart enough to
figure out that this can't happen (it's one of those "if (xxx) foo =
bar; ... if (xxx) use foo;" cases.)

Change-Id: I04fef2d602c913761ae7832c4f568aaaad398c87
Reviewed-on: https://code.wireshark.org/review/3390
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-08-03 20:20:07 +00:00
Evan Huus 3da89d6cd5 Add missing macro parameter
This is what you get for forward-cherrypicking commits you made on master-1.12.

Change-Id: I8e51181d497dc63c614fe623439506cfe99c6fa3
Reviewed-on: https://code.wireshark.org/review/3385
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-03 17:55:51 +00:00
Jeff Morriss 0996730b91 Make Lua taps work in out-of-source-tree builds.
make-taps.pl needs to know where to find the source files in order to build
the taps.

This makes the wslua test suite run in autofoo out-of-source-tree builds too.
To make it work with cmake builds requires putting all the epan/wslua/ output
(or at least init.lua) in epan/wslua/ instead of epan/.

Change-Id: I1b3c517f08d3c752ee03cb89482ee4951ceb5bf3
Reviewed-on: https://code.wireshark.org/review/3348
Petri-Dish: Evan Huus <eapache@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-03 17:26:25 +00:00