summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-btsdp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-06-27tvb_get_string_enc + proto_tree_add_item = proto_tree_add_item_ret_stringMichael Mann1-63/+37
Also some other tricks to remove unnecessary tvb_get_string_enc calls. Change-Id: I2f40d9175b6c0bb0b1364b4089bfaa287edf0914 Reviewed-on: https://code.wireshark.org/review/16158 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2016-05-08Remove the MIBenum stuff from the WAP code.Guy Harris1-4/+4
MIBenum values are from an IANA registry, not a WAP specification; add <epan/iana_charsets.h> to declare the MIBenum -> Wireshark encoding mapper routine and the value_string_ext for MIBenum values, and epan/iana_charsets.c to define them. Change-Id: I6d9c82cd011bd5211c688322e6423de38e161f41 Reviewed-on: https://code.wireshark.org/review/15298 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-05-08Show MIBenum values for character sets as decimal.Guy Harris1-1/+1
http://www.iana.org/assignments/character-sets/character-sets.xhtml is the official IANA registry for character sets, including MIBenum values, and it shows MIBenum values in decimal, not hex, so show them in decimal, not hex. Change-Id: Id00a0d351a1f758401232aba621cc60aeccf360a Reviewed-on: https://code.wireshark.org/review/15292 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-5/+5
That removes most of the uses of the frame number field in the frame_data structure. Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22 Reviewed-on: https://code.wireshark.org/review/13509 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
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-11-25Use try_val_to_str_ext() in print_uuid().Guy Harris1-2/+2
That's a much cleaner way of determining whether you found no matchin bluetooth_uuid_vals_ext than checking whether val_to_str_ext_const() returned the "use this if unknown" value. It also lets us avoid a wmem_strdup(). Make print_numeric_uuid() and print_uuid() return const gchar *; there's no reason for them *not* to be const, and that means we don't have to throw away constness. Change-Id: I62fb0b81c64c107dfea6c16ca8c5b9593f8f2a9d Reviewed-on: https://code.wireshark.org/review/12126 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-20Bluetooth: Add ability to add custom UUID descriptionMichal Labedzki1-15/+4
Some vendors use UUID128 as own services/attributes. Sometimes they use UUID16 for it too. Support both cases. Change-Id: I001692b94fcc2f86eafa81012790e9134b0f2a36 Reviewed-on: https://code.wireshark.org/review/11976 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-09-20Don't hand zero-length UUIDs to print_numeric_uuid().Guy Harris1-0/+2
It returns a null pointer if you do. Change-Id: I3bc934a576dba261d1e71767978e3789a892e728 Reviewed-on: https://code.wireshark.org/review/10590 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-07-17Bluetooth: Add generic UUID table for DecodeByMichal Labedzki1-8/+2
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-06-12Bluetooth: SDP: Fix alone DID attributesMichal Labedzki1-4/+6
Fix "malformed" packets where there is only one attribute of DID. Change-Id: If71ec66e09edbb7c1ca2ebf97acbf65cc52ab038 Reviewed-on: https://code.wireshark.org/review/8898 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-09Fix some more constants to be unsigned.Guy Harris1-59/+59
Change-Id: I714078683cff517c79a15abf29e1ae4a9a60271d Reviewed-on: https://code.wireshark.org/review/8365 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-04-14Bluetooth: SDP: Update to MAP 1.2 and PBAP 1.2Michal Labedzki1-14/+294
There are some new attributes comparing MAP 1.1 to 1.2 and PBAP 1.1 to 1.2. Change-Id: I4be2691e99d176c22676a00549aa550ea07e77e3 Reviewed-on: https://code.wireshark.org/review/8042 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-02Bluetooth: Fix tools/checkAPI issuesMichal Labedzki1-10/+10
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-02-07Don't call the Bluetooth code's UUID type "uuid_t".Guy Harris1-33/+33
uuid_t is a data type provided by a number of environments, thanks to the Open Software Fuundation; calling the Bluetooth code's data type, which includes an actual OSF-style UUID as a member, "uuid_t" can lead to confusion and *does* lead to compile errors on platforms where, for better or worse, system headers such as <unistd.h> define uuid_t (and are included by, for example, Qt headers). Just rename it "bluetooth_uuid_t". Change-Id: Ic742723913ba4105cd3269dd24fc821147285176 Reviewed-on: https://code.wireshark.org/review/7017 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-07Bluetooth/GUI: ATT: Add Server Attribute TableMichal Labedzki1-4/+4
It is a GUI+QT feature that introduce Bluetooth menu and "ATT Server Attributes" that present all handle+UUID pairs as table. User may copy cell value, row, selected rows or whole table within header. On activate user will go to packet that introduce UUID for specified handle. Change-Id: If17e53aff5feb89ededc740a595ba5882b90be5e Reviewed-on: https://code.wireshark.org/review/6911 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-03Bluetooth: ATT: Decode some HOGP attributesMichal Labedzki1-1/+1
Change-Id: I169f767b699a2f95e5a1553f1380f0b88cd7c67d Reviewed-on: https://code.wireshark.org/review/6908 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-03Bluetooth: ATT: Dissect GATT levelMichal Labedzki1-34/+0
ATT dissector is now able to decode GATT level fields. This is results of added request-response tracking/share information. Change-Id: I41ac622a38916a7a20f625fa30ac72d7812446c6 Reviewed-on: https://code.wireshark.org/review/6904 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-02Bluetooth: Simplify to "UnknownDirection" in Info column when direction is ↵Michal Labedzki1-2/+1
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-01-09Some typos fixed.Dario Lombardo1-1/+1
Change-Id: I65df0c40d771c4854b73fd5c35d1af600f15f324 Reviewed-on: https://code.wireshark.org/review/6445 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-01-08Use G_GINT64_CONSTANT() for 64-bit constants.Guy Harris1-59/+59
Change-Id: I2b4f24c0e68f8d1edb53981b2ada7db6cd0eff72 Reviewed-on: https://code.wireshark.org/review/6433 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-08Bluetooth: Update to latest Assigned Numbers (up to 4.2)Michal Labedzki1-5/+651
Also start decoding next two profile attribute groups in SDP (MPS and CTN) and add new two fields in EIR/AD. Change-Id: I4dc13df2b3b13e8c2a2a5c4af2cabae9ee83d539 Reviewed-on: https://code.wireshark.org/review/6409 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-01-08BTSDP: Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+0
Change-Id: I48ddaa9ffe8f81094d63dd886dd15bb63888cbd7 Reviewed-on: https://code.wireshark.org/review/6396 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-08bytes_to_ep_str -> bytes_to_strMichael Mann1-1/+1
Change-Id: Ifcda8328dedec0ef4104c3a124d6246f99493750 Reviewed-on: https://code.wireshark.org/review/6389 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-4/+2
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-26Replace ip_to_str with [ep_]address_to_str and tvb_ip_to_str.Michael Mann1-2/+1
Change-Id: I40d0c8253743183aecef252040b7dd6742ae5c71 Reviewed-on: https://code.wireshark.org/review/5934 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-2/+0
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9 Reviewed-on: https://code.wireshark.org/review/5997 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+0
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-18Bluetooth: Add generic Bluetooth dissectorMichal Labedzki1-7/+7
Bluetooth dissector is used to add ability to filter all bluetooth payload from capture files (there are many transport like: hci_h4, hci_h1, hci_usb, hci_mon, btle). Also it is used to placeholder for all data tree used to store additional informations like bd_addrs, names, etc. Finally it is used to be one point for Bluetooth Endpoints/Conversation filtering what is enabled now. Also add Master/Slave Role and Connection Mode tracking. Change-Id: I67048080fb8ee16fa0f4ec429c1257de81ddd737 Reviewed-on: https://code.wireshark.org/review/5771 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-29Rename some hf[] display filter names to fix dups.Bill Meier1-2/+2
Change-Id: Ibe932bc37e03194f1801ec4eed4da1ff31370de3 Reviewed-on: https://code.wireshark.org/review/5535 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-22Try to fix some buildbot warningsMichal Labedzki1-72/+49
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-19Do encoding-arg changes (all benign)Bill Meier1-2/+2
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-18Bluetooth: Fix some Clang Analyzer warningsMichal Labedzki1-3/+3
Logic error Dereference of null pointer epan/dissectors/packet-bthci_acl.c 379 Logic error Dereference of null pointer epan/dissectors/packet-bthci_acl.c 390 Logic error Dereference of null pointer epan/dissectors/packet-btsdp.c 3673 Logic error Dereference of null pointer epan/dissectors/packet-btsdp.c 1439 Logic error Dereference of null pointer epan/dissectors/packet-btsdp.c 1662 Thanks for Alexis La Goutte for pointing that. Change-Id: Ia646b33de9e368d32983efddfaa41edf7896d7fd Reviewed-on: https://code.wireshark.org/review/4165 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>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-1/+1
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-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-7/+7
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-7/+7
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-31/+31
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-25Bluetooth: Fix wrong recognized RFCOMM servicesMichal Labedzki1-9/+26
It seems that RFCOMM service can be dynamically changed while connection is still alive. In other words: host can connect to remote device and set one RFCOMM service (remote service), but later remote device can change service to one of host service without any disconnection. This patch add support for this case. Also improve searching for useful UUID service through SDP. Change-Id: I9e03b9b965d6b0d9761b4a451cdeb4a1a33ca017 Reviewed-on: https://code.wireshark.org/review/808 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-06Bluetooth: Avoid using find_dissector()Michal Labedzki1-4/+3
Also remove SVN $Id$ lines. Change-Id: I4f2925e6ad8dcfe4a62d879a2cef44447f8ae916 Reviewed-on: https://code.wireshark.org/review/476 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(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-01-12Bluetooth/Ubertooth improvements. Bug 9606 ↵Michael Mann1-118/+5
(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-12Bluetooth/Ubertooth improvements. Bug 9606 ↵Michael Mann1-22/+29
(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
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-19Rename a couple of to_str functions to have ep_ in the name. This makes itEvan Huus1-3/+3
obvious that the returned string is ephemeral, and opens up the original names in the API for versions that take a wmem pool (and thus can work in any scope). svn path=/trunk/; revision=54249
2013-12-14Remove not needed ';'Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=54088
2013-12-10Pass the correct uuid when recursing (the other one is a temporary var that mayEvan Huus1-1/+1
not be initialized). Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9535 svn path=/trunk/; revision=53929
2013-12-07Bluetooth enhancements. Bug 9446 ↵Michael Mann1-21/+29
(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-02Reject the packet if data is NULL without doing anything else.Chris Maynard1-3/+5
svn path=/trunk/; revision=53735
2013-11-30Replace "btsdp" tap with function to query service_infos tree, since that's ↵Michael Mann1-8/+7
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-03Fix Dead Store (Dead assignement/Dead increment) warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=53057
2013-11-02Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 ↵Michael Mann1-43/+37
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53051