Commit graph

25997 commits

Author SHA1 Message Date
Evan Huus
7398779206 rename variable to avoid shadow warning
Change-Id: I5934120da2dddf9076972ea3a471191f7dc9596a
Reviewed-on: https://code.wireshark.org/review/2434
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 18:27:52 +00:00
Michael Mann
b0bc4d5535 Revert "Fixup: ep_address_to_str -> address_to_str"
Most (all?) of these functions are being called within GUI, so they can't have packet_scope, which is why they weren't already converted (I made this mistake once already)

This reverts commit 7fea55a054.

Change-Id: I4bf29b206e5e1f5daefcec131309a8f6e78e1eb1
Reviewed-on: https://code.wireshark.org/review/2428
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:26:57 +00:00
Michael Mann
14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Evan Huus
3557ac4ec6 Fix warnings in test binaries
They aren't built with the same warning flags as normal, but if you add those
flags a bunch of warnings show up.

Change-Id: If3776fbd98cc45e473f055e07c86ea8f6a5034f7
Reviewed-on: https://code.wireshark.org/review/2432
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 18:24:09 +00:00
Jesse Gross
c95ff6b42f Add dissector for Generic Network Virtualization Encapsulation (Geneve).
Change-Id: I3ecf655d8e49bb7b519c4ba95d4e45c7b114bdd6
Reviewed-on: https://code.wireshark.org/review/2359
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 18:24:03 +00:00
Michael Mann
53594f34e4 Dissectors for totemnet and totemsrp protocols implemented in corosync cluster engine. Bug 3232.
From Masatake YAMATO

changes in patch3 (Masatake YAMATO):

  * Fix a typo(s/Sequnce/Sequence/)
  * Use variable len instead of a number literal
  * Put _U_ marker to length parameter of dissect_corosync_totemsrp_ip_address
  * Use tvb_report_length instread of tvb_length

changes in patch5 (Masatake YAMATO):

  * packet-corosync-totemsrp.c: Adapt to new dissector_try_heuristic interface

    + pass hdtbl_entry argument to dissector_try_heuristic.

  * packet-corosync-totemnet.c: Initialize corosync_totemnet_port to 5405

changes in patch6 (Masatake YAMATO):

  * packet-corosync-totemsrp.c: Use tvb_reported_length instead of tvb_length.
  * packet-corosync-totemsrp.c: Remove unnecessary trailing space in string literals.

  * packet-corosync-totemnet.c: Remove SVN Id tag in a comment.

changes in patch8 (Masatake YAMATO):

  * packet-corosync-totemnet.c: Remove SVN Id tag in comment(again).
  * packet-corosync-totemsrp.c: Use val_to_str_const instead of val_to_str.

changes in patch9 (Masatake YAMATO):

  * wsutil/sober128.[ch]: New files derived from packet-corosync-totemnet.c.
    Decryption code is moved here.
  * packet-corosync-totemnet.c: Remove all decryption code from this file.

Change-Id: Id832d9c5ce1be1668c857c9bbf39e8a84c31880c
Reviewed-on: https://code.wireshark.org/review/725
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 18:23:09 +00:00
Anish Bhatt
0b245a4cf8 Use the same offset += rtnValue logic for all TLV types, instead of a special case for chassis, port & ttl.
I've avoided using any mathematical checks even though tlv type vals increase linearly just in case they change in the future.

Change-Id: I0ec7021df5b91543e12edf9ba8d9c4ac44ecb11c
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2193
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-19 18:22:44 +00:00
Guy Harris
3adc5b8c80 To make a dissector available for Decode As, just use dissector_add_handle().
No need to use dissector_add_uint() with a bogus value.

Change-Id: Ia5e51d199487ba14cd671c7df44231a0d407c50b
Reviewed-on: https://code.wireshark.org/review/2431
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-19 17:54:38 +00:00
Michael Mann
daa70feddc Revert "Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining"
See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 021e7afc9f.

Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f
Reviewed-on: https://code.wireshark.org/review/2429
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 17:23:41 +00:00
Pascal Quantin
bcff3c57cc Add the ability to dynamically add a new protocol to export PDU dialog box
Change-Id: I83012cc963d514982e40010e837e11a6fcf1bc3e
Reviewed-on: https://code.wireshark.org/review/2423
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19 06:48:32 +00:00
Jakub Zawadzki
5844e12989 Optimize dissect_sip_uri()
- Combine tvb_find_guint8() for comma, semicolon into one tvb_pbrk_guint8()

- Instead of fetching each character use tvb_pbrk_guint8() to fast
  forward.

- Remove not needed tvb_find_guint8() call, as the result is discarded.

Change-Id: I38d6775b187146656d47cea9b64f8e0ccad18d36
Reviewed-on: https://code.wireshark.org/review/2384
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19 00:08:04 +00:00
Pascal Quantin
153793aaa8 Remove svn $Id$ keyword in Lua scripts
Change-Id: I5c5f8659338aed36ba020a771a8b8222f2f7e025
Reviewed-on: https://code.wireshark.org/review/2416
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-18 23:51:34 +00:00
Guy Harris
4d1e1e7876 Sort the Ethernet pseudo-wire types so that they're together.
Separating the "try to guess whether there's a control word" type from
the "yes, there's a control word" and "no, there's not a control word"
types is just a huge UI botch.

Make it clearer that the default is "Ethernet pseudo-wire, try to guess
whether there's a control word".

Change-Id: I91cc526fc709ad102b22ca67f5a9d7c98fffa0cc
Reviewed-on: https://code.wireshark.org/review/2414
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 21:26:04 +00:00
Joerg Mayer
13597c9363 Rename the filtername to initial_rtt
Change-Id: I64af535dc07eb4310b212077bb4c52032e97ecdb
Reviewed-on: https://code.wireshark.org/review/2413
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-18 20:57:53 +00:00
Guy Harris
6da6bf77b3 Get the handle for the pw_hdlc_nocw_hdlc_ppp dissector.
Change-Id: If7bc620c19e9c6511a724847e38cf0776d26b444
Reviewed-on: https://code.wireshark.org/review/2410
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 20:55:01 +00:00
Joerg Mayer
461c6a0984 Rename the Shortname of initial RTT to something short (iRTT)
Change-Id: I182f2cccae5a385572950f08fa0a6005dcf59ff1
Reviewed-on: https://code.wireshark.org/review/2409
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-18 19:58:37 +00:00
Joerg Mayer
67dac5985f Change the indication for out-of-order packets. This is experimental
and will be verified by Jasper next week

Change-Id: I3cda397285e8174abb9c05b7aaf7c1bfabdfc71a
Reviewed-on: https://code.wireshark.org/review/2408
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-18 19:55:12 +00:00
AndersBroman
681d82309a The data is actually http, call the http disector for it.
Change-Id: I58f63d79bc7f1838dd24a8dcd3e9c528648bdebd
Reviewed-on: https://code.wireshark.org/review/2407
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 19:39:27 +00:00
Evan Huus
08063d824b Build unit test binaries with Cmake
That was surprisingly easy.

Change-Id: Idda34580fd694cb0d253a121921f31d3731d3007
Reviewed-on: https://code.wireshark.org/review/2396
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-18 18:27:38 +00:00
Shoichi Sakane
009bebbf09 Fix copy-paste probem in COAP dissector
Bug:8070
Change-Id: I7a86a37f7de6b3e4e12fe1c47980a9a6604488d6
Reviewed-on: https://code.wireshark.org/review/2390
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 18:11:49 +00:00
Pascal Quantin
e09d127a9a Update PIDL source files with the API changes done in g021e7af
Change-Id: I2917cbae077865f9ec171900810f85f54b349c2c
Reviewed-on: https://code.wireshark.org/review/2394
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 18:05:04 +00:00
Pascal Quantin
f99aaf8de3 PCLI: do not register UDP port 9000 by default as it is not allocated to this protocol by IANA
Change-Id: I5f692ddf5ae5ba7366b34830bd9e99efacd66037
Reviewed-on: https://code.wireshark.org/review/2393
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 18:04:25 +00:00
Pascal Quantin
cc37b50334 Get rid of obsolete references to nettle
Bug: 2089
Change-Id: Ie3337a1b750d8d95f6291c77dfd19cd1b0c57e83
Reviewed-on: https://code.wireshark.org/review/2388
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 18:03:43 +00:00
Joerg Mayer
c6324a0b1e Get rid of some ancient qualityreview comments...
Change-Id: If25bdd594b20b656c345dcfe62765379f5dd9c5e
Reviewed-on: https://code.wireshark.org/review/2392
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-18 17:47:18 +00:00
Guy Harris
54819e5699 ssl_parse_key_list() gets called from the UI, so don't use packet scope.
Instead, explicitly allocate and free the address string.

Using packet scope was causing test failures.

Change-Id: Ie18d2da44d2eec8a92a6a86b0ba883a5525f49cd
Reviewed-on: https://code.wireshark.org/review/2387
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-18 17:03:22 +00:00
Pascal Quantin
f2dd6c0a6d SABP: fix an error spotted by pre-commit hook
Change-Id: I733e2e72b52293b3c7c15f4e0c240f7e01f4b98c
Reviewed-on: https://code.wireshark.org/review/2386
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 16:15:58 +00:00
Evan Huus
b5a462b087 Try to calculate the initial RTT of tcp conns
This (if it works well) will let us do much more accurate out-of-order
detection, which is currently otherwise hardcoded to 3ms. Ask Jörg for details.

Change-Id: Ie0662723946edeaea1e43958bf7f5158f09dde71
Reviewed-on: https://code.wireshark.org/review/2367
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-18 15:07:08 +00:00
Martin Kaiser
cd56eb970f move dissection of usbpcap isochronous packets to a separate function
Change-Id: Id292fd1b0fbff3a043e64296a88c78c1a5ac00d7
Reviewed-on: https://code.wireshark.org/review/2369
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-18 15:00:06 +00:00
Dario Lombardo
7fea55a054 Fixup: ep_address_to_str -> address_to_str
Change-Id: Id49ba07e32a71357b50b32de7cecfd80e412d508
Reviewed-on: https://code.wireshark.org/review/2379
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:22:02 +00:00
Dario Lombardo
021e7afc9f Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remaining
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66
Reviewed-on: https://code.wireshark.org/review/2378
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:20:32 +00:00
Dario Lombardo
246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Dario Lombardo
971ffd683e Fixup: tvb_get_string(z) -> tvb_get_string(z)_enc
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe
Reviewed-on: https://code.wireshark.org/review/2376
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:13:58 +00:00
Yan Burman
4aad9d3b58 Fix compilation warning
Change-Id: Ia7922415d8b22ba0c5a04ad6940c7e10bc205d57
Reviewed-on: https://code.wireshark.org/review/2371
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-18 07:23:38 +00:00
Pascal Quantin
666127f5f9 PDCP LTE: do not try to decipher PDCP control messages (like ROHC feedback)
Change-Id: I4a1596fd45bbc78ed8e90accf69ac048e7053161
Reviewed-on: https://code.wireshark.org/review/2366
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 06:17:54 +00:00
Evan Huus
6aa1470f10 Replace glib memory with wmem memory
Fixes potential memory leaks.

Bug:8102
Change-Id: I88f9a74e3f782232d2da0bc7d83727dc3253f376
Reviewed-on: https://code.wireshark.org/review/2364
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 05:54:53 +00:00
Evan Huus
6e6bd90754 Convert the obvious emem to wmem in lua code.
Bug:9927
Change-Id: Ibf0dd45d3b54e489b70a4fde193b825ec703379e
Reviewed-on: https://code.wireshark.org/review/2349
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 05:54:28 +00:00
Pascal Quantin
04c90090d9 TCP: do desegmentation sanity checks for all sub dissectors types
Change-Id: I02fe9827d8c1618f7dc6696e7d8667681a48d4a9
Reviewed-on: https://code.wireshark.org/review/2355
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-18 05:53:10 +00:00
Jakub Zawadzki
57b27ec250 Optimize tvbparse character set checking.
This patch makes tvbparse_[not_]chars() to generate
array of characters which is accepted,
later this array is checked in cond_chars_common().

This results in nice speedup of XML dissector (~33% for my file).

Change-Id: I62a5585f8bccaaea1a0c49fc70c7552531493442
Reviewed-on: https://code.wireshark.org/review/2356
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 05:52:36 +00:00
Martin Kaiser
91f58d6714 check for correct ftype
Change-Id: I2274b97c74a845e6514e8acff136e55f721f11a8
Reviewed-on: https://code.wireshark.org/review/2354
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-17 23:08:29 +00:00
Martin Kaiser
c9dd677f61 make dissect_ipmi_cmd() static
Change-Id: Ie494a52fa73f7b91bc65da1bc36516f799ef4967
Reviewed-on: https://code.wireshark.org/review/2353
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-17 22:53:21 +00:00
Joerg Mayer
d5e2782629 Update a comment about how to better identify retransmissions
Change-Id: Iec83f7e713a3077f1f4569aa86a55a69684b3097
Reviewed-on: https://code.wireshark.org/review/2351
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-17 22:37:33 +00:00
Evan Huus
ba6eb5c72f Set the rlc len field before we try to use it in an expert info.
Bug:9795
Change-Id: I740a9fe36278995cf6e590206f600c037789f0eb
Reviewed-on: https://code.wireshark.org/review/2344
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-17 21:45:38 +00:00
Evan Huus
f4b9ea4362 Initialize smb ioctl_function struct member
Bug:10020
Change-Id: I415a29dd36697887cb06485d6ed3a2b799a93464
Reviewed-on: https://code.wireshark.org/review/2342
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-17 21:28:29 +00:00
Evan Huus
417938310a Initialize rq_hdr.session
Bug:10168
Change-Id: Ida4d82d102421152785ce680aa47bcb5cf8692f6
Reviewed-on: https://code.wireshark.org/review/2334
Reviewed-by: Dmitry Bazhenov <dima_b@pigeonpoint.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-17 20:54:39 +00:00
Joerg Mayer
55cdf038a8 ip version and header-length are not full byte values. Show the
bit decoding for these values.

Change-Id: I7ab6c4badf5b66d6f434a47523e2b35730ecb65d
Reviewed-on: https://code.wireshark.org/review/2338
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-17 19:39:27 +00:00
Evan Huus
17a552666b fix underflow in BER constrained bitstrings
this can happen and cause invalid memory accesses with incorrectly-large padding
values

Bug:10187
Change-Id: Ib9b2a2fa10766efb4d95d588f57354a56373c626
Reviewed-on: https://code.wireshark.org/review/2325
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-17 18:17:31 +00:00
Evan Huus
c30df31954 lua_pushstring takes a copy of its argument
free the value we pass it, fixing a memory leak

Change-Id: I446cb85d82a0697c24035461ad03450855b68884
Reviewed-on: https://code.wireshark.org/review/2304
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-17 17:25:35 +00:00
Stig Bjørlykke
8c0d3ae47e Return number of bytes dissected in dissector:call
This does not work for old-style dissectors as they always return
the number of bytes in incoming buffer and not the number of bytes
dissected.  This is noted in the documentation.

Change-Id: I5b236a73952cac3efc830e40276283bed9af1f87
Reviewed-on: https://code.wireshark.org/review/2237
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17 17:16:56 +00:00
Hannes Mezger
9991f43f27 Add dissect_nt_64bit_time_ex for retrieving the created proto_item
Using dissect_nt_64bit_time it is not possible to access the created proto_item afterwards, hence the new function.

Change-Id: I39aca92536a53841045c30b601b6ec1a7d8bfb4e
Reviewed-on: https://code.wireshark.org/review/2160
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-17 17:09:03 +00:00
Alex Badea
d1cdbd715a isakmp: add support for IKEv1 AES decryption
Select an appropriate gcrypt cipher based on ISAKMP encryption ID and
key length attribute.  Fixes bug 10128.

Bug:10128
Change-Id: Ie74fc51eb9bfe6d68340056d3ef2ef28c7677fb8
Signed-off-by: Alex Badea <abadea@ixiacom.com>
Reviewed-on: https://code.wireshark.org/review/2296
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-17 14:49:06 +00:00