Commit Graph

60 Commits

Author SHA1 Message Date
Evan Huus a155364c77 Pass the correct uuid when recursing (the other one is a temporary var that may
not be initialized).

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

svn path=/trunk/; revision=53929
2013-12-10 23:23:26 +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
Alexis La Goutte 95d4c4ac88 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=53057
2013-11-03 11:18:54 +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
Michael Mann 8baa713605 Bluetooth: SDP: Recognize attributes by record handle or by UUIDs in request. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
From Michal Labedzki

svn path=/trunk/; revision=53002
2013-10-31 14:35:22 +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 df5a9be3db Bluetooth: SDP: Decode custom 128bit UUIDs and minor fixes. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
From Michal Labedzki

svn path=/trunk/; revision=52869
2013-10-26 13:28:47 +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
Michael Mann 63869c4037 Bluetooth: SDP: Add MultiProfile UUIDs. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
From Michal Labedzki

svn path=/trunk/; revision=52861
2013-10-26 00:53:23 +00:00
Michael Mann 250568ca91 Bluetooth: SDP: Fix PBAP features presentation. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
From Michal Labedzki

svn path=/trunk/; revision=52859
2013-10-26 00:36:16 +00:00
Michael Mann 5030e21822 Replace tabs by spaces. Bug 9327 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327)
From Michal Labedzki

svn path=/trunk/; revision=52857
2013-10-26 00:26:41 +00:00
Evan Huus ced66131ab From Michal Labedzki via
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9232

Use wmem_strbuf instead of manual string management in btsdp. Fixes fuzz
failure.

From me: minor tweak to make the patch apply to current trunk.

svn path=/trunk/; revision=52438
2013-10-07 16:34:00 +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
Michael Mann 3ffb8e29b9 HCI: Full dissection of EIR/AD and little improve filtering, bug 9050 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050)
From Michal Labedzki.

From me:
1. Have boolean filters use tfs_true_false instead of NULL (because it appears previous functionality had "TRUE" and "FALSE").  Perhaps other tfs_ values could be used, but tfs_true_false makes a good placeholder.
2. Add FT_ETHER field as a proto_tree_add_item.

svn path=/trunk/; revision=51410
2013-08-18 02:11:36 +00:00
Anders Broman 46eabdf34d From Michal Labedzki:
Add initial support for 3DS Profile.

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

svn path=/trunk/; revision=50812
2013-07-23 04:09:50 +00:00
Anders Broman 511757f96c From Michal Labedzki:
SDP: Add support for USB Forum ProductID names.

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

svn path=/trunk/; revision=50810
2013-07-23 03:54:04 +00:00
Michael Mann 6b3ac2d952 Batch of filterable expert infos.
svn path=/trunk/; revision=50454
2013-07-09 01:18:52 +00:00
Evan Huus cf7a0dde68 Based on initial patch by Michal Labedzki
Don't return a negative value from get_type_length, it can get us into bad
loops. Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8831

svn path=/trunk/; revision=50134
2013-06-24 23:26:56 +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
Michael Mann a686f1713a Bluetooth: Highlight correct bytes in some SDP trees (Part 2). Bug 8700 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8700)
svn path=/trunk/; revision=49566
2013-05-24 19:40:09 +00:00
Michael Mann 1bdf3446c5 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8700 :
Highlight correct bytes in some SDP trees.

svn path=/trunk/; revision=49481
2013-05-21 13:27:48 +00:00
Pascal Quantin e157cf5bf4 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8558 :
Fix incompatible field type for field name "btsdp.service_uuid"

svn path=/trunk/; revision=48725
2013-04-04 08:45:30 +00:00
Evan Huus 6d17f1153a From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509
Round 3 of Bluetooth SDP updates. Update the list of company IDs and fix
service recognition.

svn path=/trunk/; revision=48660
2013-03-30 21:43:18 +00:00
Evan Huus 02dff20783 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509
Round 2 of Bluetooth SDP updates:
- replace a lot of proto_tree_add_text with named fields
- dissect more of the protocol
- misc fixes

svn path=/trunk/; revision=48655
2013-03-30 15:53:04 +00:00
Evan Huus ea6d7d8a34 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509
First round of fixes for Bluetooth SDP.

From me:
- rename one call of match_strval to try_val_to_str instead
- remove a few hf entries that really belong with the second patch (they
  weren't used in this one)

svn path=/trunk/; revision=48640
2013-03-29 17:25:23 +00:00
Anders Broman 55c498169d From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48400
2013-03-18 21:16:23 +00:00
Anders Broman 3b24b8bbef From Michal Labedzki:
Be consistent in short name of protocols

Use prefix "BT " in short name for all Bluetooth dissectors. A reason
for that is protocol names start by "bt", Bluetooth dissectors can
be easy identificated, also DecodeBy looks better (sorted).
Please be note that "SDP" is reserved for different dissector, so using
"BT SDP" is good choice.

Also fix two naming mistakes.

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

svn path=/trunk/; revision=48389
2013-03-18 06:23:22 +00:00
Anders Broman 5726546c63 From Michal Labedzki:
Update HID to version 1.1

Also fix SDP TAP to avoid crash.

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

svn path=/trunk/; revision=48386
2013-03-18 05:51:01 +00:00
Anders Broman 8dec6cccb9 From Michal Labedzki:
[PATCH 17] Bluetooth: Add GNSS services to SDP

Based on https://www.bluetooth.org/Technical/AssignedNumbers/home.htm

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

svn path=/trunk/; revision=45424
2012-10-09 10:45:14 +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 5a8783f5b1 Initial commit to support yet another method of passing data between dissectors.
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL

svn path=/trunk/; revision=44860
2012-09-10 21:40:21 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier ba2cda4ef0 Cleanup & minor bug fixes:
- Don't put a value_string array in a .h file (included in several .c files);
- 'if ((a!=NULL) && !b) {fail}' should be 'if ((a==NULL) || !b) {fail}' in a few cases;
- Use value_string_ext as appropriate;
- Use val_to_str_const() in place of val_to_str() as appropriate;
- Use tvb_new_subset_remaining(...) instead of tvb_new_subset(..., -1, -1);
- Use tvb_reported_length_remaining() in place of tvb_length_remaining() in some cases;
- tvb_reported_length_remaining() can return -1;
- Use of TFS(&true_false) not req'd since "True"/"False" is the default if no TFS provided;
- Reformat various (long lines, etc);
- Use consistent indentation.

svn path=/trunk/; revision=41502
2012-03-12 14:38:59 +00:00
Alexis La Goutte 971e3ff730 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39650
2011-10-28 10:24:57 +00:00
Bill Meier 794757ae8f For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.
Also: remove trailing whitespace for a number of files.

svn path=/trunk/; revision=39503
2011-10-21 02:10:19 +00:00
Bill Meier 4e57694d4a Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically:  Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as
 the encoding parameter for proto_tree_add_item() calls which directly reference
 an item in hf[] which has a type of:
    FT_UINT8
    FT_UINT16
    FT_UINT24
    FT_UINT32
    FT_UINT64
    FT_INT8
    FT_INT16
    FT_INT24
    FT_INT32
    FT_INT64
    FT_FLOAT
    FT_DOUBLE


svn path=/trunk/; revision=39288
2011-10-06 03:35:44 +00:00
Bill Meier 2bf572bc41 Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...
svn path=/trunk/; revision=38413
2011-08-08 17:59:32 +00:00
Bill Meier 1ab1009cc4 From Yaniv Kaul:
Some fixes for 'set but not used' errors that GCC 4.6 emits.
From me:
  Do some (minor) indentation cleanup..

svn path=/trunk/; revision=36909
2011-04-27 17:39:25 +00:00
Guy Harris 38bfb185aa "guint8 *" means "pointer to array of bytes that may or may not be
properly aligned"; "void *", at least when it's the return value of
ep_malloc(), means "pointer to properly-aligned chunk of memory".  Use
"void *" in get_sdp_data_element() and its callers in that case, to
squelch compiler warnings.

svn path=/trunk/; revision=36790
2011-04-22 03:25:48 +00:00
Guy Harris 38c6d248e8 When generating the Info column, don't assume the direction is either
P2P_DIR_SENT or P2P_DIR_RECV - it might be unknown.

Use some #defines for SDP data element IDs, and rename the routine that
gets data elements tor reflect what it does.

svn path=/trunk/; revision=35934
2011-02-12 20:08:47 +00:00
Stephen Fisher fe06217c35 Stop gcc warning about type-punned pointer breaks strict anti-aliasing
rules.  (Is this the right fix?  I had to remove a now meaningless
comparison of psm > 0x1000 (4096) since psm is now a guint8 not a guint16.)


svn path=/trunk/; revision=35463
2011-01-10 21:23:25 +00:00
Jeff Morriss d1df0f9130 Fix (or at least quiet Valgrind about) https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5542 :
Always initialize *all* the outputs of get_sdp_type().

svn path=/trunk/; revision=35347
2011-01-03 18:48:29 +00:00
Jeff Morriss 2250767f8a Partially fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5542 :
Fix one of the "Conditional jump or move depends on uninitialised value(s)"
errors from Valgrind: always initialize *val in get_sdp_type().

svn path=/trunk/; revision=35343
2011-01-03 17:55:23 +00:00
Kovarththanan Rajaratnam 46dd093b94 From Allan M. Madsen via. bug 5445:
Bluetooth profiles and protocols above RFCOMM and L2CAP can not be dissected correctly because the required information (server channel and dynamic PSM value mappings to services/profiles) about the type of data carried in the payload is not available. RFCOMM is currently hardcoded to handoff all payload data to the obex dissector though it may carry e.g. handsfree, dial-up networking or serial port profile related data.

The patch consists of modifcations to the following dissectors:

btsdp: Extraction of RFCOMM server channel and L2CAP dynamic PSM with service mapping is provided to RFCOMM and L2CAP through a tap interface. In addition, the packet list info is beautyfied and extended with more details for better
overview.

btl2cap: Adds a new dissector table with services and dynamic PSM mapping which is filled by a tap listner catching the info from btsdp. More info added to packet list.

btrfcomm: Adds a new dissector table with services and server channel mapping which is filled by a tap listner catching the info from btsdp. Dissectors for handsfree, dial-up netorking and serial port profiles (all based on RFCOMM) are also added.

btobex: Registers several obex based profiles (e.g. obex push, file transfer, basic printing etc.) in both RFCOMM and L2CAP. Some cleanup.


svn path=/trunk/; revision=35323
2011-01-02 08:13:40 +00:00
Guy Harris a8bc4a0d13 Rename the routines that handle dissector tables with unsigned integer
keys to have _uint in their names, to match the routines that handle
dissector tables with string keys.  (Using _port can confuse people into
thinking they're intended solely for use with TCP/UDP/etc. ports when,
in fact, they work better for things such as Ethernet types, where the
binding of particular values to particular protocols are a lot
stronger.)

svn path=/trunk/; revision=35224
2010-12-20 05:35:29 +00:00