Commit Graph

41 Commits

Author SHA1 Message Date
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:38:06 +00:00
Balint Reczey c297df134b More spelling fixes found by lintian
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56
Reviewed-on: https://code.wireshark.org/review/11946
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Diederik de Groot <dkgroot@talon.nl>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-11-20 05:47:29 +00:00
Michal Labedzki bdf3c0b558 Bluetooth: Make dissectors independent of passed data
If Bluetooth dissectors has additional data from previous layer - good.
But if do not... try to decode as much as possible - probably using
some "force" dissector preferences you can decode payload correctly.

Change-Id: I6427afafb987ed3b9b751fd91616e670802b3542
Reviewed-on: https://code.wireshark.org/review/11021
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-17 10:22:02 +00:00
Michael Mann 2be3820912 Address "shadow" warnings found by checkAPI script.
These aren't "true" shadow issues, but the script doesn't completely understand C syntax (for things like struct member names "time" and "index").  But fixing them creates less noise.

Change-Id: I5a2db1549095824530428529e86cab453c031a04
Reviewed-on: https://code.wireshark.org/review/10368
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>
2015-09-03 06:05:43 +00:00
Guy Harris 9d24a26c9b Don't register in a non-existent dissector table.
There's no "btrfcomm.channel" dissector table any more; there's a
"btrfcomm.dlci" table.

Change-Id: Ia7cdf45c04b6b116a67ef4b7dfdce509cdb15327
Reviewed-on: https://code.wireshark.org/review/9684
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-17 11:17:12 +00:00
Michal Labedzki dac7cf9f8c Bluetooth: Add generic UUID table for DecodeBy
Replace L2CAP Service, RFCOMM Service and AVCTP PID dissector table
by shared Bluetooth Service UUID table. It also supports UUID16,
UUID32 and UUID128 by hex-string, like for AVRCP: "110e".

Change-Id: I473bc73d10939e8ed6dd55a6a92387c7a1ec125a
Reviewed-on: https://code.wireshark.org/review/9678
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-17 08:06:40 +00:00
Michael Mann aeb9827e4a Convert proto_tree_add_boolean to proto_tree_add_bitmask_[value|value_with_flags|list]
Part 1 of a few

Change-Id: I413f23dfa92da5488ca8a7f62ca0738b25004635
Reviewed-on: https://code.wireshark.org/review/8117
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-18 16:32:27 +00:00
Alexis La Goutte 1c86217387 Bluetooth: HFP: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: I1509a9ee9b136c15b5da8ff88fa6eadab3dd7f99
Reviewed-on: https://code.wireshark.org/review/8113
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-04-18 14:46:46 +00:00
Michal Labedzki 57911165b8 Bluetooth: HFP: Update to HFP 1.7
Update to latest Bluetooth specification: 1.7 (previously 1.6)
Add +BIND and +BIEV commands, also update +BRSF to support new features.
There is still some things to implement, but need more work to do it, like
request-response tracking.

Change-Id: I195380b9588f3a3e5b07628fbe9d5c66ed46fbfd
Reviewed-on: https://code.wireshark.org/review/8046
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-04-14 05:42:55 +00:00
Alexis La Goutte b428477f67 BTHFP: fix missing Break in switch (CID: 1287325)
Change-Id: I26156e928b5fc07cff8a7c83cfed2f1cccff1994
Reviewed-on: https://code.wireshark.org/review/7851
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-30 11:58:12 +00:00
Alexis La Goutte 49b8f99449 bthfp: Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
Change-Id: Ic87f34d793bdddb3843dd8007231a70d5d08d6c6
Reviewed-on: https://code.wireshark.org/review/7539
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2015-03-06 04:04:09 +00:00
Michal Labedzki 768e37b792 Bluetooth: Fix tools/checkAPI issues
Change-Id: I8ffbd4a0da800594d9888f6a30612d4fc5273119
Reviewed-on: https://code.wireshark.org/review/7474
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-02 18:28:17 +00:00
Michal Labedzki 77d2dc5892 Bluetooth: HFP: Temporary disable partial message dissection
Maybe this case never happen, so disable broken feature.

Also fix unexpected Data dissectors and command tree items.

Bug: 10460
Change-Id: I4ea76f20db21c6c9b5dca912b94a0aff99c42160
Reviewed-on: https://code.wireshark.org/review/7473
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-02 18:27:52 +00:00
Michal Labedzki 724c2ed4c8 Bluetooth: HFP: Improve HFP dissector by dissecting all commands
Decode as far as possible AT commands according to
specifications: HFP 1.6

Change-Id: Ib2cee4df4d9338cc98f28e0fadd067378fba63a9
Reviewed-on: https://code.wireshark.org/review/7472
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-02 13:18:11 +00:00
Michal Labedzki 6521771124 Bluetooth: Simplify to "UnknownDirection" in Info column when direction is unknown
Change-Id: Ibad679c0b6c95d65389ce087f65b8f31cf3acd68
Reviewed-on: https://code.wireshark.org/review/6903
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-02 10:48:56 +00:00
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +00:00
Guy Harris 80e6f6251e Get rid of calls to ctype.h functions.
They don't handle values outside the range -1 to 127, and their behavior
is locale-dependent.  Use g_ascii_isXXX() and g_ascii_toXXX() instead of
isXXX() and toXXX().

If you're checking for printable ASCII, don't use isascii() and don't
use iscntrl(), use g_ascii_isprint().  If you're checking for graphical
ASCII, i.e. printable ASCII except for a space, use g_ascii_isgraph().

Use ws_xton() to convert a hex digit character to the corresponding
numeric value.

Change-Id: Id3039bc586fbf66d8736c2df248c790c0d7a2330
Reviewed-on: https://code.wireshark.org/review/4851
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-10-20 06:15:19 +00:00
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +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
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
Alexis La Goutte 296591399f Remove all $Id$ from top of file
(Using sed : sed -i '/^ \* \$Id\$/,+1 d')

Fix manually some typo (in export_object_dicom.c and crc16-plain.c)

Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8
Reviewed-on: https://code.wireshark.org/review/497
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04 14:27:33 +00:00
Michael Mann cc5543f824 Bluetooth enhancements. Bug 9446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446)
Bluetooth: SCO: Add Source/Destination addresses 
Bluetooth: HCRP: Use information from SDP to decoding PSM payload

From Michal Labedzki

svn path=/trunk/; revision=53816
2013-12-07 01:01:31 +00:00
Chris Maynard ae2e12d1f7 Reject the packet if data is NULL without doing anything else.
svn path=/trunk/; revision=53735
2013-12-02 21:34:23 +00:00
Michael Mann e2d2d12098 Replace "btsdp" tap with function to query service_infos tree, since that's all dissectors were doing with it. Not used outside of dissectors and cuts down on a few redundant global variables.
svn path=/trunk/; revision=53677
2013-11-30 19:26:18 +00:00
Michael Mann a31d10208b Bluetooth: HSP: Add support for HSP. Bug 9446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446)
HSP is modest version of HFP.

From Michal Labedzki.

svn path=/trunk/; revision=53629
2013-11-28 18:33:26 +00:00
Michael Mann 8dab82556c Bluetooth improvements. Bug 9446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446)
From Michal Labedzki.

1. Bluetooth: HFP: Fix recognizing roles. There is need to check which side SDP record is, then it is possible to recognize roles.
2. Bluetooth: RFCOMM/HFP: Fix recognizing services and roles. Direction bit means only that device is initiator of connection or not. But need information who is owner of connection (remote device or localhost), so use this information from L2CAP.
3. Bluetooth: HFP: Fix unexpected expert info
4. Bluetooth: HCI: Set addresses to host/controller. Also optimize a little handing of dissectors handles.

svn path=/trunk/; revision=53628
2013-11-28 18:11:02 +00:00
Michael Mann a267501b82 Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893)
From Michal Labedzki

svn path=/trunk/; revision=53051
2013-11-02 19:20:04 +00:00
Bill Meier 0ad98563a2 From didier gautheron: remove redundant or use faster col_xxx functions
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster.
- same for  replace col_append_fstr and col_append_str
- remove col_clear() when it's redundant:
    + before a col_set/col_add if the dissector can't throw an exception.
- replace col_append() after a col_clear() with faster col_add... or col_set

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


svn path=/trunk/; revision=52948
2013-10-29 14:09:20 +00:00
Michael Mann 2ebf40a1c2 Bluetooth: SDP: Decode all types of UUIDs. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327).
From Michal Labedzki

svn path=/trunk/; revision=52864
2013-10-26 02:36:56 +00:00
Michael Mann 3cc6957fa8 Bluetooth: Use items for logical block objects. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
Bluetooth protocols use items, so dissect it to improve filtering and better user experience - text object cannot be filterable or comparable.

From Michal Labedzki

svn path=/trunk/; revision=52863
2013-10-26 02:24:04 +00:00
Pascal Quantin a0c53ffaa1 emem -> wmem conversion:
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits()
- tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup()
- tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode()
- tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string()
- tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string()
- tvb_get_ephemeral_string_enc() -> tvb_get_string_enc()
- update docs accordingly

svn path=/trunk/; revision=52172
2013-09-22 15:50:55 +00:00
Pascal Quantin b46f9bebe2 Change some dissectors to use pinfo memory pool instead of malloc if it can trigger an exception between between buffer allocation and tvb_set_free_cb call
svn path=/trunk/; revision=51427
2013-08-19 14:55:41 +00:00
Chris Maynard 8bfc3f6865 Return from dissect_at_command() immediately if tvb_length_remaining() returns -1.
svn path=/trunk/; revision=50284
2013-07-01 05:58:41 +00:00
Evan Huus 5d53d63cd7 From Michal Labedzki via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8824

Convert bluetooth emem trees to wmem trees.
Add modelines and fix indentation.
Correct typo in wmem_tree.h that still referred to emem.

svn path=/trunk/; revision=50076
2013-06-20 16:31:53 +00:00
Martin Kaiser e94463b0df fix compiler warning
(gcc version 4.4.5 (Debian 4.4.5-8))

cc1: warnings being treated as errors
packet-bthfp.c: In function ‘dissect_at_command’:
packet-bthfp.c:875: error: ‘col_str’ may be used uninitialized in this function

svn path=/trunk/; revision=49900
2013-06-12 12:20:50 +00:00
Evan Huus 2a1ad7683c From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8740
Improve Bluetooth HFP dissection.

svn path=/trunk/; revision=49886
2013-06-11 14:05:48 +00:00
Anders Broman 3805f354a4 From Michal Labedzki:
[PATCH 15] Bluetooth: Add modelines 

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

svn path=/trunk/; revision=45422
2012-10-09 10:36:04 +00:00
Anders Broman aa3c9034f5 From Michal Labedzki:
Bluetooth: Cleanup headers
Remove redundant headers and sort existing to chosen convention.

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

svn path=/trunk/; revision=45039
2012-09-21 10:49:44 +00:00
Jeff Morriss 2552c750e5 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45017
2012-09-20 02:03:38 +00:00
Jakub Zawadzki 95de6e0ecb Bluetooth: Move HFP dissector from RFCOMM file
HFP is moved from RFCOMM where named HF.
Then fix name to one used by SIG specification: HFP.
Next step is improve dissection of HFP by dissect
specific for this profile AT commands.

From Michal Labedzki on behalf of Tieto Corporation
Part of bug #7639 

svn path=/trunk/; revision=44877
2012-09-11 11:53:34 +00:00