Commit Graph

26203 Commits

Author SHA1 Message Date
Guy Harris db530d886d Squelch casting-away-constness warnings.
The pStr argument to dissect_mq_charv() isn't modified (and always
points to a character string), so make it a "const char *", and
eliminate the casts to "guint8 *" in calls to it.

Change-Id: I21dad38c41324528be297a8ddc1854beff2276db
Reviewed-on: https://code.wireshark.org/review/2877
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-06 11:25:41 +00:00
Роман Донченко afa8f21f56 make-dissectors-reg: optimize by factoring out the loops
Instead of calling the grep/sed pipelines for each file, build the
list of files in the beginning and call each pipeline only once,
passing the list to the first grep.

This results in a massive speedup in Cygwin; in my test, the time
it takes to run make-dissector-reg . dissectors packet-*.c in dissectors/epan
is reduced from ~116 to ~3 seconds. I also tried it on NetBSD, where
the time do to the same goes from ~6 to ~0.5 seconds.

Amend makefile comments to elide mentions of invoking multiple processes
per file.

Change-Id: Iad441e7d2b6cc3669dada57646e2f8f6b987fd34
Reviewed-on: https://code.wireshark.org/review/2826
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:08:20 +00:00
Michael Mann 3490bc6eb9 Change display filters to prefix with ipmi.trace
Change-Id: I7b4476cb0a06362941ef81707a9686f5546a4a54
Reviewed-on: https://code.wireshark.org/review/2868
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-06 08:03:29 +00:00
Michael Mann 0335ae339d convert to proto_tree_add_subtree[_format]
Change-Id: I66f0bffb987568c3d4c14a06bdc90465c877b27f
Reviewed-on: https://code.wireshark.org/review/2867
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 23:08:19 +00:00
Peter Wu 286c191846 9p: fix version detection, fix dissect_9P retval
Fix version detection (detect against full string instead of prefix),
properly dissect Tcreate extension field (9p2000.u only), dissect
Tunlinkat flags (9p2000.L).

Refactor pattern to dissect string[s] types for DRY.

Convert to use tcp_dissect_pdus. I have not seen a fragmented case, but
maybe that may happen in the future.

The main motivation for touching 9p was that it returns bogus values
for some types. This has been fixed by properly increasing offset, and
always return the captured length.

Change-Id: If2184204ae9c853b94aca8ade3763d7fe523fa86
Reviewed-on: https://code.wireshark.org/review/2836
Reviewed-by: Christopher Maynard <Christopher.Maynard@gtech.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-05 22:04:54 +00:00
Michael Mann fc63343a4e convert to proto_tree_add_subtree[_format]
Change-Id: I8df48b25de784a48a25f0e48aac1e1545ed92c35
Reviewed-on: https://code.wireshark.org/review/2865
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-05 20:36:36 +00:00
Evan Huus c92bf7e44b Expand a variable from 16 to 32 bits (and make it signed).
Fixes an overflow leading to infinite loop.

Bug: 10259
Change-Id: Ie76c5a810af927ba092f4067268bd789b3a7d7bf
Reviewed-on: https://code.wireshark.org/review/2856
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 21:53:08 +00:00
Pascal Quantin e398c8ed6b ETSI CAT: upgrade dissector to Release 12
Change-Id: Id1988551ca94a862195eb1de1de399e428132b21
Reviewed-on: https://code.wireshark.org/review/2855
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-04 19:38:41 +00:00
Michael Mann c7a6e6fa13 convert to proto_tree_add_subtree[_format]
Change-Id: I621f2e2cad9403449cb78f45302388f0c874d3bc
Reviewed-on: https://code.wireshark.org/review/2852
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:59:14 +00:00
Michael Mann 93517043e9 convert to proto_tree_add_subtree[_format]
Change-Id: Idd1b20ab32c0960ea52c6f3bc5346462c37c5684
Reviewed-on: https://code.wireshark.org/review/2853
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-07-04 16:46:14 +00:00
AndersBroman dd424c6225 Handle the case where the previous PDU has left an extra CRLF in the stream.RFC 2626 In the interest of robustness, servers SHOULD ignore any empty line(s) received where a Request-Line is expected. In other words, if the server is reading the protocol stream at the beginning of a message and receives a CRLF first, it should ignore the CRLF.
Change-Id: I97ba94f451463c8facd2c20bf6b7364f095119e7
Reviewed-on: https://code.wireshark.org/review/2808
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 14:00:50 +00:00
Evan Huus 7e970c32f4 wmemify some nfs functions, fixing much leaked memory
Bug: 10257
Change-Id: Ia36c03b2be727a37f91eca38af4faf48d1d65436
Reviewed-on: https://code.wireshark.org/review/2840
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-04 07:59:04 +00:00
Evan Huus 7464415049 Fix infinite loop in RTCP dissector
Bug: 10248
Change-Id: I630bc1ab2520c2861b817ba5813f5f7680e96056
Reviewed-on: https://code.wireshark.org/review/2820
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:21:48 +00:00
Sean O. Stalley bbb3e2f7af Add Bus ID to USB Address Column
USB Addresses are now in the format of: bus_id.device_address.endpoint
This makes it much easier to read traces that captured traffic on
more than one bus.

Change-Id: I264db2ceea712d94632d5d08d05d3af22a4a03fe
Reviewed-on: https://code.wireshark.org/review/2833
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:20:38 +00:00
Sean O. Stalley 212df87e7f (trivial) moved 'is request' comment in dissect_usb_common()
Change-Id: I759f64920284a35ea55bc68624570def51dfd72a
Reviewed-on: https://code.wireshark.org/review/2832
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-04 02:18:17 +00:00
Bill Meier 4e74546e76 packet-vnc.c: Fix a bug in displaying a set of FT_BOOLEAN bit fields (found by checkAPIs).
Change-Id: Ie5252d20db5826f3e48aba11da1bf85d00630db2
Reviewed-on: https://code.wireshark.org/review/2838
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 23:34:06 +00:00
Bill Meier 3e325b1448 packet-vnc.c: Restore tvb_get_string() --> tvb_get_string_enc() changes lost in gdf6bdcc
These changes were originally done in g971ffd6

Change-Id: I9de28ba7089f99e8058207f3b6d34de931decf76
Reviewed-on: https://code.wireshark.org/review/2835
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 22:26:27 +00:00
Bill Meier df6bdcc07d packet-vnc.c: Improve dissection
- Properly dissect multiple VNC PDUs in one (or more) TCP segment(s).
- Dissect additional message types ('Fence' and 'Enable Continuous Updates').
- Handle "num_rects" field = 0xFFFF (TightVNC).
- Add some more info as to sources of information about the VNC protocol.
- Add an XXX note as to the (incorrect) reassembly method being used.
- Add some notes as to possible ToDo's.

Change-Id: Id4942c50b3d1373bd2e72c0131614835dc39ba90
Reviewed-on: https://code.wireshark.org/review/2834
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-07-03 21:51:17 +00:00
Jakub Zawadzki 60a6f8582a Manually revert "Make COMPUTE_OFFSET and COMPUTE_OFFSET_AND_REMAINING macros."
This reverts commit b136182ad4

This function are already marked inline, and profiler don't show much difference in performance,
revert as previous version is cleaner.

Change-Id: I1ac2c30a91b46278730ceee127efa086c7fbc6d6
Reviewed-on: https://code.wireshark.org/review/2828
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 21:09:31 +00:00
Guy Harris c62a905187 Sometimes Git can be a real pain.
Change-Id: Ib93575d9977162b468f171038915c1eb8a612660
Reviewed-on: https://code.wireshark.org/review/2831
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 20:32:02 +00:00
Guy Harris 1c297771c3 Rename and move ui/stat_menu.h to epan/stat_groups.h.
The groups are, technically, independent of the notion of a menu, and,
if we have mechanisms by which taps that are not only GUI
toolkit-independent but independent of the *existence* of a GUI can be
registered, they might want to register themselves in a group just in
case they're running in a program that has a GUI.

Also, this might fix the Debian package build.

Change-Id: I29435681e79748fd4f2e0c5ac872cd11f831d172
Reviewed-on: https://code.wireshark.org/review/2830
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 20:30:42 +00:00
Guy Harris 06bd8045d7 Make wsutil depend on gitversion.
wsutil contains the only code that uses version.h; make the dependency
explicit, to see whether that fixes the current build issues with Debian
packaging.

Also, get rid of all *other* dependencies on gitversion.

Change-Id: I89fa5e4112633b83a1a7dfa349bc337e3688575f
Reviewed-on: https://code.wireshark.org/review/2823
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-07-03 17:16:54 +00:00
Yan Burman 6ed95406e3 Fix type-o left over from cut-and-paste
Change-Id: I80b24cd8b75999454c1767bd3044ecc569f57d98
Signed-off-by: Yan Burman <yanb@mellanox.com>
Reviewed-on: https://code.wireshark.org/review/2805
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 12:22:59 +00:00
AndersBroman f0ed0e69fa Get rid of soft-deprecated API:s
Change-Id: Ieb4a3f07a7831c141ba8ce9c075e72091ef909be
Reviewed-on: https://code.wireshark.org/review/2798
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 09:04:33 +00:00
Evan Huus d70e56a733 Revert to 3ms if we don't have the handshake
Change-Id: I96b23677f3050e9c62edd49f26d50d8b4addcf58
Reviewed-on: https://code.wireshark.org/review/2784
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:32:11 +00:00
Pascal Quantin 2dbab6df18 GTP: add dissection of Extended End User Address
Bug: 10251
Change-Id: I174b5a2b3e2ec8ff2ead9f290b452ee468f6fe66
Reviewed-on: https://code.wireshark.org/review/2783
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-03 07:30:20 +00:00
Michael Mann 980893a15a NDPS dissector is the poster child for proto_tree_add_subtree[_format].
NDPS dissector is also the poster child for not being considered "that naughty" by checkAPIs because most of its proto_tree_add_text calls don't have printf-style arguments (which is what checkAPIs really keys off of)

Fixed both cases and removed about 370 proto_tree_add_text calls from the dissector.

Change-Id: I721678c39d4a0544e5e7212e622c0c2eebfd04f7
Reviewed-on: https://code.wireshark.org/review/2775
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:35:52 +00:00
Evan Huus a3bac6d0ce kafka: fully dissect offset request/response messages
Change-Id: I641a3dbece6f822144f6740dde6801b1be202db5
Reviewed-on: https://code.wireshark.org/review/2777
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-02 17:29:55 +00:00
Evan Huus 956c440786 RSVP checksum is not required if integrity object is present
Bug: 10219
Change-Id: I2da62ee184327b2bc42a264e1782db927460f5cf
Reviewed-on: https://code.wireshark.org/review/2773
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:31:58 +00:00
Jakub Zawadzki af7528999f Optimize sip dissector: avoid calling tvb_get_string_enc()
Fetch header value, only when we need to parse it.

Change-Id: I3c170ef8ab03985c8111a1b84ac1afc87bc8b5ca
Reviewed-on: https://code.wireshark.org/review/2767
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-02 06:07:44 +00:00
Evan Huus ab1e6f30d2 Bump (again) the amount of work we do for wmem's timing test
Apparently the new win8 vm has a *very* low-resolution timer, and the allocators
are indistinguishable at the previous amount of work.

Change-Id: If4e5bb8f85b1f0d39658f54001c88f42ffddfc47
Reviewed-on: https://code.wireshark.org/review/2768
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-01 23:48:41 +00:00
Malcolm Walters 2a306f4b05 Fix for Bug 10240.
Include padding length in calculation of correct attribute length

Change-Id: I569c6a9e1be39e3bb997e797a094b80cdcba6b07
Reviewed-on: https://code.wireshark.org/review/2747
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-07-01 20:49:30 +00:00
Jakub Zawadzki 852d5dac9c Remove executable bit, from not executable files.
Change-Id: I36b303b9c2bf4d6bb717261cdbf39ea16532fe06
Reviewed-on: https://code.wireshark.org/review/2757
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-07-01 20:37:09 +00:00
Graham Bloice bd79dae438 Remove debugging info from protocol tree for frame
Change-Id: Id7f02087e536964bfa6d01a3646c20035a3ab6cb
Reviewed-on: https://code.wireshark.org/review/2746
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 12:44:31 +00:00
Evan Huus a452d16f2c Optimize epan_new/init_dissection
As Anders correctly pointed out in I7d8f84b2e, constantly resetting state will
turn init_dissection into a bit of a hot path. Especially as we will already
bear the overhead of switching files, we don't want to fall any further behind
than we have to.

This change includes three unrelated optimizations that reduce the cost of
init_dissection by about 40% as measured by callgrind:
 - only initialize ares/ADNS if that preference is enabled (this of course only
   applies if you specify -n to tshark or otherwise disable the preference)
 - use memcpy instead of a loop in sigcomp UDVM init
 - use memcpy instead of a loop in bootp dissector

The only remaining obvious hot spot in this path is reassembly_table_init since
it is called by so many dissectors. Suggestions (perhaps to get rid of the
GPtrArray) welcome.

Oh, and one other change to use g_strerror instead of strerror as insisted
upon by the API pre-commit hook.

Change-Id: I18a74f2b64b25498116079bd4e7fc2b335c7703a
Reviewed-on: https://code.wireshark.org/review/2738
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 04:21:14 +00:00
Jakub Zawadzki 659d0efc92 sip optimization: avoid calling tvb_get_guint8.
Use tvb_pbrk_guint8, tvb_find_guint8 when possible.

Change-Id: If8090d9b9b92146e9c216f139c056130d6b04e78
Reviewed-on: https://code.wireshark.org/review/2569
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-07-01 04:15:02 +00:00
Balint Reczey 4e9e043a6a Init session id to avoid warning using GCC 4.9
Change-Id: I2091f7eb86c64fd086f44a7cf15e7c5483f9b44c
Reviewed-on: https://code.wireshark.org/review/2716
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-07-01 02:05:41 +00:00
Guy Harris 5e28386540 Move stat_menu.h to libui.
Change-Id: I7bed7f7931845bc41035535cc62e1fe17c71047d
Reviewed-on: https://code.wireshark.org/review/2726
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-30 21:37:34 +00:00
Evan Huus f1ff6635a8 Warn about unencrypted HTTP traffic over port 443
At the suggestion of Toralf Förster. This includes an expert info, as well as
making SSL a new-style dissector and rejecting traffic that looks like
unencrypted text.

Change-Id: Ib09ea0d97952330f092590ff3fc6488807cdbb81
Reviewed-on: https://code.wireshark.org/review/2693
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-30 21:10:11 +00:00
AndersBroman 073bf490aa From Johan Whahl:
Added dissection of the SIP Service-Route header.

Change-Id: Ic4523edb374ae03492af5853863dde501a0c30e0
Reviewed-on: https://code.wireshark.org/review/2721
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-30 14:38:46 +00:00
AndersBroman 9387979e91 Fix the display of AVP:s that are not fully dissected
fixes Bug #10237

Change-Id: I3c38bb4af4440f1e5087f21ef022bf2cd3a66002
Reviewed-on: https://code.wireshark.org/review/2720
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-30 14:14:14 +00:00
Michal Labedzki 3b15891115 Bluetooth: Add missing connection_handle
This initialize previously uninitialized variable (and nice fixing everything)

Change-Id: I943102510fc45735f40db7899884d2c0fe6ffb40
Reviewed-on: https://code.wireshark.org/review/2717
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-30 13:24:20 +00:00
Bill Meier 9cf40b67b2 Fix Bug #10238: Display filter expression dialog items do not expand/display properly.
Unfortunately, certain proto_hier_tree_model.c functions
    assume/require that a cookie generated by
    proto_(first|next)_protocol_field() will never have a NULL value.

    Bug introduced in gd47ae54.

Change-Id: I42763d02f700e15ca9b3ab9980943d4f8d933ca9
Reviewed-on: https://code.wireshark.org/review/2712
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-30 12:28:12 +00:00
Michael Mann dd63ae2b8c proto_tree_add_subtree[_format]
Change-Id: Id00f456479415adf0a219af6c9a2108d4b3642d0
Reviewed-on: https://code.wireshark.org/review/2702
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 21:18:04 +00:00
Pascal Quantin e39e44df24 GSM MAP: ensure that p2p_dir is always initialized before calling GSM SMS dissector
Bug: 10234
Change-Id: Ie340b849015febe46f91836440d44d4cfde005a4
Reviewed-on: https://code.wireshark.org/review/2695
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-29 17:56:35 +00:00
Gerald Combs f174370ddb [Automatic manuf, services and enterprise-numbers update for 2014-06-29]
Change-Id: Ife61b2e2c53f1faba34940035ac84a2b5ced3b71
Reviewed-on: https://code.wireshark.org/review/2696
Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-06-29 15:04:56 +00:00
Michael Mann e8a8d62dc3 proto_tree_add_subtree[_format]
Change-Id: I7e016f10fcfdc0523bf2fe8c11295c0334f7c332
Reviewed-on: https://code.wireshark.org/review/2694
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 14:52:33 +00:00
Michael Mann fe4b7ee625 convert to proto_tree_add_subtree[_format]
Change-Id: If110de1e0555637264f86f1508858d569871a9c7
Reviewed-on: https://code.wireshark.org/review/2675
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 13:10:02 +00:00
David Ameiss e1a8c9599f Standardize the names of, and document, the taps and heuristic dissector tables made avaialble by these dissectors.
Change-Id: If3a143eb9546c9de63cd32b2347000b09e0e3c93
Reviewed-on: https://code.wireshark.org/review/2688
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-29 00:03:35 +00:00
Graham Bloice 5b9ceae3e5 Remove unused variables post commit 7bf6862ecf
Change-Id: Id583ab1742241deb9325dcb1dbba8a8cb3df3b90
Reviewed-on: https://code.wireshark.org/review/2691
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-28 17:41:10 +00:00
Michael Mann 7bf6862ecf convert to proto_tree_add_subtree[_format]
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b
Reviewed-on: https://code.wireshark.org/review/2676
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-28 12:05:43 +00:00
Guy Harris efc0a00520 We're not currently using dissect_rtcp_psfb_remb(); #if 0 it out.
Also, note that we need to determine how to handle Application Layer
Feedback messages based on the SDP setup traffic for the session; recent
changes disabled dissection of REMB Application Layer Feedback messages
in favor of MS-RTP Application Layer Feedback messages.  (This is why we
shouldn't remove dissect_rtcp_psfb_remb() unless REMB isn't being used
any more.)

Change-Id: Ib320bdf4a64263fdef29fc4ea2583eaae1cc4bee
Reviewed-on: https://code.wireshark.org/review/2684
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-27 07:41:21 +00:00
AndersBroman f0d291be28 In function 'dissect_rtcp_psfb':
packet-rtcp.c:1232: warning: unused parameter 'top_item'

Change-Id: I76522a9c6094473ce0eeeb7cc929a66e6da21909
Reviewed-on: https://code.wireshark.org/review/2683
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-27 04:24:49 +00:00
Britt McKinley f36db97506 RTCP: Add support for MS-RTP
Support for Profile Specific Extensions from MS-RTP
Support for RTCP Feedback Messages
Support for Application Layer Feedback Messages. 
MS-RTP: Real-time Transport Protocol (RTP) Extensions
http://msdn.microsoft.com/en-us/library/office/cc431492.aspx

Change-Id: I1f1e6e60b5f9d09b1dffd7e308426c0b67914441
Reviewed-on: https://code.wireshark.org/review/2586
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-27 03:52:11 +00:00
Evan Huus a87e292272 Tighten the dump-glossary test.
1. The only indication we get of an out-of-order value string is a message on
 STDERR, so check that and fail the test if STDERR wasn't empty.

 2. This exposes an out-of-order value string in packet-stun.c; fix it.

 3. This triggered the pre-commit hook on packet-stun.c, which noticed an API
 error (ENC_ASCII -> ENC_ASCII|ENC_NA); fix that too.

Change-Id: I36f87a2a87b40537119562f22a7e3012716ff239
Lesson: automated testing/tooling is both wonderful and scary.
Reviewed-on: https://code.wireshark.org/review/2682
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-27 03:47:32 +00:00
Evan Huus 8d2eaaab51 If we have no fields, don't try to iterate through them.
Otherwise glib throws an assertion since the array we pass it is NULL.

Change-Id: I9159c1f5ad99b280c040cd790df3cf352738601f
Reviewed-on: https://code.wireshark.org/review/2680
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-27 03:27:24 +00:00
Martin Kaiser 1560b678ee show an expert info if a non-control urb contains a setup packet
Change-Id: I9339869defa47a862b6174d8821cdd8e6186f5c5
Reviewed-on: https://code.wireshark.org/review/2678
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-27 03:22:00 +00:00
Martin Kaiser 06ba7b4b3f a USB urb of an unknown transfer type does not contain a setup packet
Change-Id: Iac6a259a1081b907149c49023614a5053440e560
Reviewed-on: https://code.wireshark.org/review/2677
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-27 03:21:38 +00:00
Jeff Morriss 9d4af5fccd Check the validity of fields given to tshark with "-e": complain and exit if
they aren't valid.

Should help avoid confusion like that in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10201

Bug: 10201
Change-Id: Iff7f51ae042ca1a92d1c803b6cb61aa5d81ce205
Reviewed-on: https://code.wireshark.org/review/2654
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-27 00:48:51 +00:00
Graham Bloice 4742fc8ed2 Fixed linker flags for MSVC to not attempt to make and link a manifest
Added solution "folder" for tests.

Change-Id: I96dfb4a28fb7aaf3e84cea026e1f5d15afe6c0c6
Reviewed-on: https://code.wireshark.org/review/2635
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
2014-06-26 21:34:38 +00:00
Evan Huus c9b03b424f add a cast, the mask makes it safe (stupid compiler)
Change-Id: Iaf24c62295a93a1abd4fe3daf7e4c9587c3ef76b
Reviewed-on: https://code.wireshark.org/review/2670
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 15:38:11 +00:00
Yan Burman 1f724bc891 iSER: Add iSER dissector support
Bug: 10189
Change-Id: Ie99d99a1736b3c6446d5a00edf201a49dfcd4780
Reviewed-on: https://code.wireshark.org/review/2247
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 15:26:18 +00:00
Michael Mann a09de615b4 Fix Function call argument is an uninitialized value
Change-Id: I716e80e53477edd419164c61937800795a550869
Reviewed-on: https://code.wireshark.org/review/2651
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-26 14:07:31 +00:00
Pascal Quantin 7c1b5e9b7e Fix several compilation warnings
Followup of gf798709

Change-Id: I0afddfe2e9b9ac454377f2358a29b4ecdd011b91
Reviewed-on: https://code.wireshark.org/review/2668
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-26 13:08:59 +00:00
Michael Mann f7987091ba convert to proto_tree_add_subtree[_format]
Change-Id: I525ac2aae2bdbfd5f3a2f3b35f1bf10dde053f66
Reviewed-on: https://code.wireshark.org/review/2667
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-26 11:41:10 +00:00
Britt McKinley 732656c6f3 STUN: Add support of MS-ICE2 (Used by Lync)
Interactive Connectivity Establishment ICE Extensions 2.0
http://msdn.microsoft.com/en-us/library/office/cc431504.aspx

Change from review:
1) Change encoding for foundation to ASCII
2) Move case for MS_IMPLEMENTATION_VER.

Change-Id: Ic524a2fe811695478aba81af9cbb3dbd031bbce3
Reviewed-on: https://code.wireshark.org/review/2579
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-26 05:15:00 +00:00
Alexis La Goutte 06cf499eaf Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Icec39c64d952ccc9739df95135ed79b3196a427a
Reviewed-on: https://code.wireshark.org/review/2652
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2014-06-26 02:43:12 +00:00
Pascal Quantin fd5b0777bb DLSw: better fix, as suggested by Evan
Change-Id: I82556c40cc4f0618e9e1c927beafa19ea4659683
Reviewed-on: https://code.wireshark.org/review/2650
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 18:53:56 +00:00
Pascal Quantin a8652ea529 DLSw: ett2 proto_item variable is an input parameter for dissect_dlsw_capex()
Regression introduced in g888f22d

Change-Id: I6ae451ef31b188540db4e4687c9fa492e8aa195e
Reviewed-on: https://code.wireshark.org/review/2649
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 17:58:31 +00:00
Peter Wu 4224e353f9 ssl-utils: add missing ett registration
Fixes the dissector bug warning:
"epan/proto.c:4657: failed assertion "idx >= 0 && idx < num_tree_types"

Add some comments to avoid future mistakes, add folding markers and fix
alignment of curves hf.

Change-Id: Ibcb57bfeb09a9777324682704a86f1ce260d345e
Reviewed-on: https://code.wireshark.org/review/2642
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-06-25 17:16:26 +00:00
Pascal Quantin 13a972bac4 DTPT: remove unused variables
Change-Id: I9c8e26af6e0d71012b010dee24a0d0d7220b49f7
Reviewed-on: https://code.wireshark.org/review/2648
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-25 17:05:05 +00:00
Michael Mann 888f22de16 convert to proto_tree_add_subtree[_format]
Change-Id: I2ea1892b5963cc5578cbdd2b03029ca8424f2267
Reviewed-on: https://code.wireshark.org/review/2640
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-25 16:35:14 +00:00
Guy Harris a11879e218 Get rid of an unused variable.
Change-Id: I8e436b7e4724c85943200087783d3cf7dd7c1535
Reviewed-on: https://code.wireshark.org/review/2639
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-25 02:38:24 +00:00
Michael Mann 29ecd114bf convert to proto_tree_add_subtree[_format]
Change-Id: I5f573dffabb8685a8e5a334ff2bfb24d9838daa6
Reviewed-on: https://code.wireshark.org/review/2601
Tested-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 23:42:13 +00:00
Evan Huus 83da877fff Add back initializers dropped in g9356d5c689fa
They were actually necessary.

Bug:10224
Change-Id: I9973bf7bab670d12e5b90bb2a57e99f9125d6a07
Reviewed-on: https://code.wireshark.org/review/2632
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 22:28:11 +00:00
Evan Huus 2a1e3d16aa Fix two bugs in kafka dissection
- Respect the length field when dissecting message sets
 - Don't "wrap around" in capture when doing request/response matches

Also convert one instance to proto_tree_add_subtree, as an experiment.

Change-Id: Id161687865afa7ca83e6943a643bc54582f65554
Reviewed-on: https://code.wireshark.org/review/2624
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 21:59:41 +00:00
Anish Bhatt b4d4218a18 OSPF Cleanup. Remove unnecessary TFS declarations
Change-Id: I9b4205f6d579ea9e707d83baf81f77393e3098b4
Signed-off-by: Anish Bhatt <anish@chelsio.com>
Reviewed-on: https://code.wireshark.org/review/2478
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-24 19:56:52 +00:00
Michael Mann 65b75212e1 Ensure proto_item from subtree is initialized
bug:10223
Change-Id: I40ed92bcf436723ad3927a93181f7c732cf4690f
Reviewed-on: https://code.wireshark.org/review/2623
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-24 19:26:17 +00:00
Pascal Quantin eaf6bf3ec0 MBIM: add an option to force SMS PDU decoding format if MBIM_DEVICE_CAPS_INFO message was not captured
Change-Id: Iff78a00b463a7a33e1705c76ea49618af532f3aa
Reviewed-on: https://code.wireshark.org/review/2621
Tested-by: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-24 17:25:30 +00:00
Guy Harris 4f1d20abae proto_tree_add_uint() takes a value, not an encoding, as an argument.
Change-Id: Ie2c0523e32b54cd13506501d98215934a8d1304e
Reviewed-on: https://code.wireshark.org/review/2611
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24 06:57:32 +00:00
Martin Kaiser e68638fe6b usb iso urbs on linux can't possibly contain a setup packet
see mon_bin_event() in the linux kernel where the setup_flag is set only
for control urbs

clean up various things related to this assertion:
remove type_2 parameter
show the iso descriptors in any case
calculate the end offset correctly, the end offset is the byte after the
iso data

Change-Id: Iebfbe6443c224a958a1697563aa8fb853d7aa8c2
Reviewed-on: https://code.wireshark.org/review/2541
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-06-24 03:11:56 +00:00
Joerg Mayer 0f76609237 Remove unneeded include <sys/stat.h>
Change-Id: I3be8f29d2b4fba2cb1d7ee2f29bdb27e42dd40a5
Reviewed-on: https://code.wireshark.org/review/2607
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 02:32:26 +00:00
Joerg Mayer 836feeb559 Remove unneeded sys/types.h
Change-Id: I03cd66cb9a2d01ea40308b338955756d08a36516
Reviewed-on: https://code.wireshark.org/review/2604
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-24 02:08:07 +00:00
Michael Mann 4976d67184 Restore correct tree assignment.
Change-Id: Id06bd486114a80fb899f8dc148d48928e99e775e
Reviewed-on: https://code.wireshark.org/review/2602
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-24 02:01:05 +00:00
Peter Wu e22d3c9b74 ssl: fix ClientKeyExchange, fix TLSv1.2 SKE for DH
Since DTLS and TLS do not differ in handling ClientKeyExchange and
ServerKeyExchange, its dissection got moved to ssl-utils. The code is
based on the SSL dissector, with header field names adjusted to the
DTLS ones (those got capitalized). Besides a version difference (for
signatures), the header field and function names, the DTLS and SSL code
are equal (this is verified).

This patch refactors the dissectors for DHE_RSA and ECDHE to make use of
a common function to dissect the signed_params field. All offset
tracking is also removed in favor of exception handling by the
proto_tree_add_item function. Occurrences of proto_tree_add_uint are
also replaced by proto_tree_add_item for simplicity.

After those changes, the SKE dissector for DH key exchanges is updated
to handle the mandatory signature field in TLSv1.2, using the newly
added function. (bug 9208)

Another bug occurred after the length check removal, pre-TLS and
OpenSSL's old DTLS implemenation do not include a vector length in
the CKE. This is now also fixed. (bug 10222)

Other minor changes: comments added/corrected, renamed
keyex_dh -> keyex_dhe (includes DHE_RSA and DHE_DSS).

Bug: 9208
Bug: 10222
Change-Id: I76e835d56a65c91facce46840d79c1c48ce8d5dd
Reviewed-on: https://code.wireshark.org/review/2542
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 23:31:40 +00:00
Joerg Mayer 8702a6b827 Remove some unneeded includes
Change-Id: I4327ead0451244daa0d876ae3a770cbbf80760c8
Reviewed-on: https://code.wireshark.org/review/2590
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 23:19:28 +00:00
Guy Harris 1d92195de8 Have individual programs get libpcap and libz version info.
That way, the code that constructs the runtime version string doesn't
itself have to call libpcap and libz, and could be usable in programs
that don't call them.

While we're at it, add "with" to the run-time version information for
GnuTLS and libgcrypt, to match the compile-time version information, and
add the version information from libwireshark to TShark.

Change-Id: I3726a027d032270b032292da9314c1cec535dcd2
Reviewed-on: https://code.wireshark.org/review/2587
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-23 21:56:42 +00:00
Pascal Quantin dd7134d907 Initialize whole buffer in GPRS Mobility and Session Management dissector
Bug: 10216
Change-Id: I572a7a6ce0f816063f02397b667dd46c990cf73e
Reviewed-on: https://code.wireshark.org/review/2583
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-23 20:13:00 +00:00
Michal Labedzki 59e860cf2f [WIP] qt: Add support for Polish language
Change-Id: Ib63937e741b737f171a9b383a9cbabb55dfdd8ef
Reviewed-on: https://code.wireshark.org/review/2553
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 19:10:21 +00:00
Joerg Mayer 54cc0d86da Replace AF_ values by COMMON_AF_ values.
Remove no longer needed system includes

Change-Id: Id9ffffaa7da5185041db63fa7611d348a1cc4b68
Reviewed-on: https://code.wireshark.org/review/2577
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 16:48:26 +00:00
Joerg Mayer cb04fd57e9 Add all AF_ types for Windows that are in WinSock.h or WinSock2.h
Change-Id: Ia45f4aaea75d8cb08bb9016f9147f47db4434b06
Reviewed-on: https://code.wireshark.org/review/2576
Reviewed-by: Jörg Mayer <jmayer@loplof.de>
2014-06-23 16:48:16 +00:00
Evan Huus 02edc3369b Revert "Optimize sip_is_known_sip_header()"
This reverts commit c9a5fbeb1d.

Change-Id: Ic2e5d531f719ed1107ef7bb1de12175d4601fd6d
Reviewed-on: https://code.wireshark.org/review/2574
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 16:22:30 +00:00
Evan Huus 520190c77b Revert "Cheat and try to fix the generated file manually."
This reverts commit 9079e3ad1d.

Change-Id: I0430408e139ff8de068c970d02e36122552614fe
Reviewed-on: https://code.wireshark.org/review/2575
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-23 16:22:08 +00:00
AndersBroman 9079e3ad1d Cheat and try to fix the generated file manually.
Change-Id: Iabf1821aa0ef676ac4d1d7f2983460b2e671a98a
Reviewed-on: https://code.wireshark.org/review/2573
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 15:30:39 +00:00
Jakub Zawadzki c9a5fbeb1d Optimize sip_is_known_sip_header()
Profling SIP shows that gperf generated hashing code, is
3 times faster than using GHashTable & g_str_hash/_equal()

This result in about 1% improve of whole dissection (sip traffic with filter).

Change-Id: Id6bf64bacd872e2d1c30a1b6356db444b25ba326
Reviewed-on: https://code.wireshark.org/review/2116
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 14:42:20 +00:00
AndersBroman eaf6e551fe Fix a typo.
Change-Id: I6874a6f4a340c2b8e82d1ca5333cbeb31ff27f2d
Reviewed-on: https://code.wireshark.org/review/2570
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 08:24:49 +00:00
Jakub Zawadzki 6e0be0173b Add col_append_lstr(), speedup column generation for TCP.
When dissecting with columns TCP dissector spends
around 1/4 time in col_append_fstr(), add col_append_lstr()
and do formatting by ourselves.

Change-Id: If90bc26242761884b4991e8db0db62c8f9e32690
Reviewed-on: https://code.wireshark.org/review/2527
Reviewed-by: Evan Huus <eapache@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-23 03:33:59 +00:00
Guy Harris ab6a45aec6 Get rid of set-but-not-used variable.
Change-Id: Ic0f2c79b4bd9fc737bf33ef64512f4142d74de6b
Reviewed-on: https://code.wireshark.org/review/2568
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 22:18:12 +00:00
Guy Harris 6896def6da Get rid of some unused variables.
Change-Id: I2a806af639e5f0519ba93b0048ec7a4624fa33fc
Reviewed-on: https://code.wireshark.org/review/2567
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:49:26 +00:00
Guy Harris 9c35a5d8fd Make dissect_lltd() a new-style dissector and register it as such.
Presumably that was the intent.

Change-Id: Icf8529a23a9a36e7f12e446d67f3867771b221d8
Reviewed-on: https://code.wireshark.org/review/2566
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-22 21:42:43 +00:00