Commit Graph

63 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
Michal Labedzki 928ce9f966 Bluetooth: Fix remaining lengths
ACL and L2CAP payload contain its length field.
Of course it may be broken for many reasons, so
there is need to check it and show expert info warning.

Bug: 11677

Change-Id: I1988faec9faef70c95161513049ec16ceb8fcf45
Reviewed-on: https://code.wireshark.org/review/11982
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-11-20 16:02:27 +00:00
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the asn1 and epan directories.

Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4
Reviewed-on: https://code.wireshark.org/review/11200
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22 11:45:56 +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
Michal Labedzki f5cd21543d Bluetooth: Add generic Bluetooth dissector
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-12-18 11:03:05 +00:00
Michal Labedzki 9fce9ba188 Bluetooth: ACL/AVDTP: Fix ACL session handling
In case like reusing "connection handle" number in next connection
(2 -> 3 -> 2 again) AVDTP dissector does not properly dissected packets
(it should be Signal, but dissect as Media).

Add expert error to all packets that are not in ACL connection. This will
show invalid packages (send after dissconnect), however incomplete
(mostly beginning) connection will be marked too, but I think it have more
pros than cons.

Change-Id: I29cf706600cb12c8b93d0188dd2fba18dd5eba88
Reviewed-on: https://code.wireshark.org/review/4167
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-09-19 20:13:18 +00:00
Michal Labedzki 33976181a1 Bluetooth: Fix some Clang Analyzer warnings
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-09-18 16:15:38 +00:00
Michal Labedzki 164af0050d Bluetooth: Complete sessions
Some interfaces support multiple Bluetooth adapters with events like
add/remove. We must support that to distinquish adapters streams
in case that new adapter has the same id that old one.

Next one is create session for "Connection Handle", so
next layer will now when it is connected and disconnected.
This is also used to distinguish streams.

Change-Id: I9e062c8e4cc9c033b75f1a596e8351a215169843
Reviewed-on: https://code.wireshark.org/review/2548
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:56:31 +00:00
Michal Labedzki f4591ef55d Bluetooth: Avoid using find_dissector()
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-06 21:58:07 +00:00
Michal Labedzki c9dd46c278 Bluetooth: Make Source/Destination BD_ADDRs and names filterable
Source/Destination BD_ADDRs and name are filterable.
Also simplify code around wmem trees, and enable commented "data"
field in unreassembled case and fix btl2cap offsets
(discovered by enabling "data" field).

Change-Id: Ic28c9bf19bcd6281b652be538b221da74df4bb76
Reviewed-on: https://code.wireshark.org/review/471
Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-06 05:58:06 +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
Jakub Zawadzki deb2b236f2 Add missing includes
svn path=/trunk/; revision=54332
2013-12-21 17:23:17 +00:00
Chris Maynard b5e3775535 eject the packet if data is NULL without doing anything else.
svn path=/trunk/; revision=53733
2013-12-02 21:13:29 +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
Bill Meier 2ac134b3c5 whitespace fixes; mostly: remove trailing blanks
svn path=/trunk/; revision=52591
2013-10-13 19:56:52 +00:00
Pascal Quantin 6cedc2c336 Convert a few more dissectors to wmem
svn path=/trunk/; revision=51991
2013-09-12 22:03:31 +00:00
Jeff Morriss 2808e853ed Actually initialize the localhost ethernet address before setting
dl_src/dl_dst to it.

Fixes uninitialized-read warnings from Valgrind on the capture in
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8827

svn path=/trunk/; revision=50268
2013-06-30 21:34:40 +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
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
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
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 434aae5245 From beroset:
remove C++ incompatibilities 
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416

svn path=/trunk/; revision=48396
2013-03-18 19:47:33 +00:00
Michael Mann bfeeba6f5e Fix AVCTP, AVRCP, HCI AVL and L2CP for multiple interfaces/adapters
From Michal Labedzki, bug 8367 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8367)

svn path=/trunk/; revision=47809
2013-02-21 21:35:19 +00:00
Anders Broman 4dc754f454 From: Michal Labedzki:
Bluetooth: Improve support of MAP, PBAP, BPP and BIP in OBEX

Add support for recognize profiles using OBEX (by "Target"), then add
all Application Parameters specific for MAP, PBAP, BPP, BIP.
Also fix one FIXME, so now dissecting by OBEX does not cause malformed
frames while jumping over dissected packets.

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

svn path=/trunk/; revision=47632
2013-02-11 15:04:53 +00:00
Bill Meier c439b805e2 Comment out unused hf[] entries & etc.
(found by checkhf)

svn path=/trunk/; revision=47389
2013-01-31 17:55:31 +00:00
Anders Broman 07c92db36b From Michal Labedzki: To ensure that names are correct copy NULL too This fixes unknown characters sometimes show in src/dst columns, etc. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639
svn path=/trunk/; revision=46789
2012-12-26 15:28:28 +00:00
Evan Huus b9c6f71fe4 Create a wmem pool in pinfo and use it for some address allocations.
A (better?) fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030

See also thread starting at:
http://www.wireshark.org/lists/wireshark-dev/201212/msg00001.html

svn path=/trunk/; revision=46331
2012-12-02 17:01:04 +00:00
Jeff Morriss a92bbbcd5c Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030 :
Don't store an AT_STRINGZ address in ep_ allocated memory: that memory is
freed before the addresses may be used.  Use se_ memory instead (no, that's
not really ideal either).

It would appear that several other dissectors have the same problem.

svn path=/trunk/; revision=46320
2012-12-02 02:46:12 +00:00
Anders Broman d67f89f45b From Michal Labedzki:
Couple of coding style changes and fixes for:
warning: declaration of ‘k_frame_number’ shadows a previous local
warning: assignment discards qualifiers from pointer target type

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

svn path=/trunk/; revision=46304
2012-11-30 11:31:28 +00:00
Jeff Morriss 5063663377 Another couple size_t-to-int warning fixes (I hope).
svn path=/trunk/; revision=46288
2012-11-29 16:26:12 +00:00
Jeff Morriss 79d3e696a8 (Try to) fix some size_t-to-int warnings.
svn path=/trunk/; revision=46286
2012-11-29 15:39:34 +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
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
Anders Broman 179e7bb4b6 From Michal Labedzki:
Bluetooth: Use correct names for ACL dissector

Dissector name is "bthci_acl" so use it for convention.
Also some cosmetic alignments

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

svn path=/trunk/; revision=44837
2012-09-10 12:12:05 +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 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
Chris Maynard 49fed7ed0d Display filter name cleanup.
svn path=/trunk/; revision=39452
2011-10-18 00:49:16 +00:00
Anders Broman 4b952c1324 Get rid of check_col, while at it set ENC.
svn path=/trunk/; revision=39146
2011-09-26 08:25:18 +00:00
Gerald Combs dae5200002 Fix some Visual C++ analysis warnings.
svn path=/trunk/; revision=35988
2011-02-17 23:00:34 +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
Jeff Morriss 7fb975bb90 From Allan M. Madsen via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5446 :
Bluetooth ACL packets are not defragmented when the packet boundary flags is set
to 'flushable first fragment'.

svn path=/trunk/; revision=35117
2010-12-03 23:44:35 +00:00
Jeff Morriss e17b9ccec1 Rev 29427 added packet_add_new_data_source() with a comment indicating that
the data source does not need to be allocated if (!tree).

Rev 30158 took the if (!tree) check out indicating that the check was invalid.

So: (since packet_add_new_data_source() now only calls add_new_data_source()),
remove packet_add_new_data_source().

svn path=/trunk/; revision=34717
2010-10-30 16:00:30 +00:00
Kovarththanan Rajaratnam d10ca62304 Fix value strings in packet boundary lookup table
svn path=/trunk/; revision=30830
2009-11-05 07:36:02 +00:00
Kovarththanan Rajaratnam 7d44262406 This patch introduces packet_add_new_data_source() which effectively deprecates add_new_data_source(). This is based on the following observation:
1) The tvb + name (aka. data_source) is only used when the protocol tree is visible

The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify.

A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated!

svn path=/trunk/; revision=29427
2009-08-15 06:38:10 +00:00
Kovarththanan Rajaratnam 6110a96f68 Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_check
svn path=/trunk/; revision=29345
2009-08-09 07:59:51 +00:00