Commit Graph

66 Commits

Author SHA1 Message Date
Michal Labedzki 56a09d24dc Try to fix some buildbot warnings
Most interesting are:
 warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
 warning: ISO C forbids zero-size array [-Wpedantic]
 warning: ISO C90 doesn't support unnamed structs/unions [-Wpedantic]
 warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual
 warning: initializer element is not computable at load time [enabled by default]

Change-Id: I5573c6bdca856a304877d9bef643f8c0fa93cdaf
Reviewed-on: https://code.wireshark.org/review/3174
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>
2014-09-22 10:52:03 +00:00
Michal Labedzki 846a9332ed Bluetooth: HCI: Add support for user/vendor commands
Some Vendors can provide own subset of HCI commands/events, so provide them
possibility to write own dissectors and use them by "Decode As".

Change-Id: I87ff60ae12ac63ddd4b12b26951aa9f5143eabc6
Reviewed-on: https://code.wireshark.org/review/4166
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-20 18:18:06 +00:00
Bill Meier 18d72987cb Do encoding-arg changes (all benign)
For:
- FT_BYTES: Always use just ENC_NA
- integral/floating (other than FT_[U]INT8): Do ENC_NA --> ENC_BIG_ENDIAN

Also:
- FT_UINT... --> FT_UINT8 in a few cases (to match proto_tree_add_item...)
- Change one case of incorrect '||' to '|'

Change-Id: I427e0e61618ff8faf55691c8a695930f67d455b0
Reviewed-on: https://code.wireshark.org/review/4184
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 01:38:08 +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
Michael Mann 73217d9f3f tvb_new_subset -> tvb_new_subset_length when length parameters are equal.
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is.

Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d
Reviewed-on: https://code.wireshark.org/review/1999
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-06-07 15:41:07 +00:00
Michal Labedzki 8e3e0fdce9 Bluetooth: Add Member "Company" UUIDs
Change-Id: I8f455f12eeeaa51a0699e4cc1ee639d7031ce2c6
Reviewed-on: https://code.wireshark.org/review/803
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-24 12:23: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
Anders Broman 3a96d94c50 From Michal Labedzki:
Bluetooth/Ubertooth: Improvements: Support for new btsnoop format, almost finished btle and minor fixes.

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

svn path=/trunk/; revision=54862
2014-01-20 20:36:42 +00:00
Michael Mann 11a61d757d Bluetooth/Ubertooth improvements. Bug 9606 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606)
From Michal Labedzki

1. Bluetooth: Implement the rest of fields in Low Energy Link Layer dissector
2. Bluetooth: Merge all UUIDs together
3. Bluetooth: Extract LE Channel MAP to separate dissector
4. Ubertooth: Dissect CC2400 registers

svn path=/trunk/; revision=54700
2014-01-12 02:29:51 +00:00
Michael Mann c071a1c728 Bluetooth/Ubertooth improvements. Bug 9606 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606)
From Michal Labedski

1. add support for new btsnoop "format" introduced by BlueZ team in "btmon" tool
2. Bluetooth: Make EIR, AD and COD more generic
3. Bluetooth: HCI/LL: Update Error Codes to Core 4.1  Specification
4. Ubertooth: Fix response command handling
5. Ubertooth: Update to support firmware version
6. Ubertooth: Dissect by Vendor Id/Product Id

svn path=/trunk/; revision=54699
2014-01-12 00:50:41 +00:00
Alexis La Goutte eb68a7b8d3 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9562
USB: Add support for Bluetooth Ubertooth with initial version of Low Energy Link Layer protocol and NFC ACR122

Bluetooth: HCI: Clarify roles for Switch Role command

Descriptions now based on Core 4.1 specification.

svn path=/trunk/; revision=54403
2013-12-23 18:55:37 +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 ea63042f9b Bluetooth improvements. Bug 9446 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446)
From Michal Labedzki 

svn path=/trunk/; revision=53525
2013-11-23 21:41:08 +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 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
Alexis La Goutte 01af8f057a Fix some Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=51652
2013-09-02 23:10:31 +00:00
Anders Broman 0e81643540 From Michal Labedzki:
Full dissection of EIR/AD and little improve filtering, cd 

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

svn path=/trunk/; revision=51527
2013-08-27 05:08:34 +00:00
Michael Mann edf1436360 Bluetooth: HCI: Synchronize and update Voice command. Bug 9050 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050)
From Michal Labedzki.

svn path=/trunk/; revision=51411
2013-08-18 02:32:23 +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 d91b6a1872 From Michal Labedzki:
HCI: Improve Class of Device dissection. 

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

svn path=/trunk/; revision=50814
2013-07-23 04:23:19 +00:00
Anders Broman 0bbb2cbbaf From Michal Labedzki:
HCI: Add latest Assigned Numbers 

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

svn path=/trunk/; revision=50813
2013-07-23 04:15:23 +00:00
Evan Huus 6976653023 From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509
Unify bluetooth direction handling (sent vs rcvd).

svn path=/trunk/; revision=48661
2013-03-30 21:47:27 +00:00
Pascal Quantin d31620a7bf From Michal Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 :
Remove C++ incompatibilities from Bluetooth dissectors and switch to wmem API

svn path=/trunk/; revision=48414
2013-03-19 13:51:52 +00:00
Anders Broman 2ae1d08bbe From Michal Labedzki:
Fix issues found by fix-encoding-args.pl
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8304

svn path=/trunk/; revision=48388
2013-03-18 06:13:09 +00:00
Anders Broman c2976ac508 From Michal Labedzki:
Fix issues discovered by cppcheck

Also use global OUI array in AVRCP.
Thanks to Evan Huus for cppcheck.

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

svn path=/trunk/; revision=48387
2013-03-18 06:04:09 +00:00
Michael Mann e094c21301 Minor Bluetooth fixes
1. Allow to DecodeBy payload over AVCTP
2. Fix L2CAP CID payload recognize after disc
3. Removed unneeded _U_
4. Fall back to control channel in AVRCP
5. Fix time-tracking for passthrough and capability AVRCP commands

From Michal Labedzki, bug 8367 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8367)

svn path=/trunk/; revision=47810
2013-02-21 22:00:32 +00:00
Pascal Quantin d2c32e27ed Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8038 :
Prevent a counter overflow in while loops

svn path=/trunk/; revision=46345
2012-12-03 14:44:12 +00:00
Evan Huus 2461373edd Remove unneeded variable initializers.
svn path=/trunk/; revision=46328
2012-12-02 15:21:53 +00:00
Anders Broman 900b884f55 From Michal Labedzki:
Bluetooth: Add support for source/destination addresses

Within resolving devices names. Also make header file more generic,
packet-hci_h4.h renamed to packet-bluetooth-hci.h.

Part of:
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032

svn path=/trunk/; revision=46278
2012-11-29 13:21:10 +00:00
Jörg Mayer c0d20887f0 Fix
wireshark/svn/trunk/epan/dissectors/packet-bthci_cmd.c:2611:13: error: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘int’ [-Werror=format]
wireshark/svn/trunk/epan/dissectors/packet-bthci_cmd.c:2617:13: error: format ‘%g’ expects argument of type ‘double’, but argument 3 has type ‘int’ [-Werror=format]


svn path=/trunk/; revision=45711
2012-10-22 14:02:10 +00:00
Anders Broman 576b37ddd8 from Allan M. Madsen:
Add support for HCI 3.0+HS and v4.0, Bluetooth Low Energy. This includes
dissection of additional HCI commands and events, Attribute Protocol and
Security Manager Protocol.

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

svn path=/trunk/; revision=45709
2012-10-22 12:49:04 +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 b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Jeff Morriss 1731fc958e From Martin Kaiser via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6977 :
The attached (trivial) patch adds some missing breaks in switch-case blocks.

This fixes coverity defects #445, #446, #1316 and #1380.

svn path=/trunk/; revision=41727
2012-03-21 22:18:15 +00:00
Bill Meier 3dd8ed0279 Use consistent indentation;
Do minor reformatting.

svn path=/trunk/; revision=41503
2012-03-12 14:40:09 +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
Alexis La Goutte 3f5cf478f4 Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
svn path=/trunk/; revision=39481
2011-10-19 21:55:08 +00:00
Bill Meier 126aa85393 Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
    then use ENC_ASCII.
 2. For all but FT_UINT_STRING, always use ENC_NA
    (replacing any existing True/1/FALSE/0
    /ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).



svn path=/trunk/; revision=39426
2011-10-15 18:46:26 +00:00
Bill Meier 94f36ca4ff Use ENC_NA as encoding for proto_tree_add_item() calls which directly reference an hf item (in hf[] with types:
FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_OID

Note: Encoding field set to ENC_NA only if the field was previously TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN

svn path=/trunk/; revision=39260
2011-10-04 22:44:31 +00:00
Anders Broman fc447d3377 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39147
2011-09-26 09:01:17 +00:00
Stig Bjørlykke 1c45c1a243 From Michael Mann via bug 2794:
Fixed display filters with obvious typos.

svn path=/trunk/; revision=36713
2011-04-19 08:22:58 +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
Anders Broman da383952df "Fill" value_strings.
svn path=/trunk/; revision=34935
2010-11-17 21:58:35 +00:00
Bill Meier 9675740701 Use value_string_ext fcns to access certain value_string arrays;
Sort several value_string arrays to be in ascending order.
Also: Minor whitespace cleanup.

svn path=/trunk/; revision=34766
2010-11-03 22:08:49 +00:00
Kovarththanan Rajaratnam 0c8a3cbb4f Extract ogf from the opcode
svn path=/trunk/; revision=32860
2010-05-18 06:09:52 +00:00