summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-btl2cap.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-18From Reinhard Speyerer: Fix several misspellings/typos in WiresharkBill Meier1-2/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6967 svn path=/trunk/; revision=41645
2012-03-12Cleanup & minor bug fixes:Bill Meier1-1495/+1510
- 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-02-06Fix some Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-4/+6
svn path=/trunk/; revision=40900
2012-01-28From Michal Labedzki:Anders Broman1-8/+100
Fix:Wrong bluetooth PSM detected when parse the L2CAP packet. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6619 svn path=/trunk/; revision=40749
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-10 Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-2/+2
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_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) svn path=/trunk/; revision=39328
2011-10-06Convert 'encoding' parameter of certain proto_tree_add_item() calls in ↵Bill Meier1-92/+92
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-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-8/+8
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-08-23From Andrei Emeltchenko via Chris Maynard:Anders Broman1-10/+10
btl2cap extended window shows wrong bit. Patch would not apply cleanly so added by hand. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6257 svn path=/trunk/; revision=38680
2011-05-12Fix the test.sh failures based on Guy's suggestion in ↵Jeff Morriss1-17/+17
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5445#c15 : Add a new tap flag to indicate that a tap listener is just a "dissector helper", that is, a tap which is used by a dissector to help it do its dissection but does not, itself, require dissection. Use this new flag in the dissectors which register taps. Remove the (now-unused) have_tap_listeners() function. svn path=/trunk/; revision=37069
2011-02-17Fix some Visual C++ analysis warnings.Gerald Combs1-9/+9
svn path=/trunk/; revision=35988
2011-02-12The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's noGuy Harris1-1/+19
pseudo-header, and hence there's no direction indication. Don't set pinfo->p2p_dir for it. Use WTAP_ENCAP_BLUETOOTH_H4_WITH_PHDR, not WTAP_ENCAP_BLUETOOTH_H4, for capture files where we have the direction. Don't assume pinfo->p2p_dir is either P2P_DIR_SENT or P2P_DIR_RECV when setting the info column in various Bluetooth dissectors; it might be unknown. In the HCI H4 dissector, put the direction into the info column regardless of whether we have a type match or not; the dissectors for HCI packet types appear to assume it's been set (as they put a blank at the beginning of the stuff they append to the direction). svn path=/trunk/; revision=35933
2011-01-02From Allan M. Madsen via. bug 5445:Kovarththanan Rajaratnam1-113/+207
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
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-4/+4
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-10-30Rev 29427 added packet_add_new_data_source() with a comment indicating thatJeff Morriss1-1/+1
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-11Define some fcns & vars as static;Bill Meier1-59/+56
Minor whitespace and comments cleanup. svn path=/trunk/; revision=34477
2010-05-19Remove a couple of check_col()Kovarththanan Rajaratnam1-38/+28
svn path=/trunk/; revision=32896
2010-01-13From Didier Gautheron:Anders Broman1-51/+18
check_col.diff Remove redundant calls to check_col() if it guards only one columns function with one parameter after the column type. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4394 svn path=/trunk/; revision=31519
2009-10-18Remove a shadowed variable.Stig Bjørlykke1-2/+0
svn path=/trunk/; revision=30605
2009-09-24Don't guard col_append_str with check_colKovarththanan Rajaratnam1-6/+2
svn path=/trunk/; revision=30125
2009-09-23Don't col_clear() followed by col_set_str(). A col_set_str() will clear ↵Kovarththanan Rajaratnam1-1/+0
(replace) any existing string (the fence still needs to be respected though) svn path=/trunk/; revision=30086
2009-08-15This patch introduces packet_add_new_data_source() which effectively ↵Kovarththanan Rajaratnam1-1/+1
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-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=29345
2009-06-29From Kovarththanan Rajaratnam: Fix for Bug #3572 Bill Meier1-1/+11
[http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=3572] svn path=/trunk/; revision=28884
2009-06-23From Kovarththanan Rajaratnam:Jaap Keuter1-20/+446
The Bluetooth AMP Manager protocol was recently adopted by the Bluetooth SIG. This protocol sits on top of L2CAP and requires a few changes in order to accommodate the new move/create channel request. This patch includes: * a new Bluetooth AMP Manager Protocol dissector * changes to L2CAP to handle the new move/create channel signals * introduce a dissector table for fixed channel, allowing btamp dissector to handle the BT AMP Manager Protocol channel * Preliminary changes in L2CAP to support the new enhanced L2CAP modes (enhanced retransmission/streaming mode) svn path=/trunk/; revision=28819
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-12/+12
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770
2009-05-19From Artem Tamazov (bug 3472):Stig Bjørlykke1-0/+3
Save/Restore pinfo->private_data when used. svn path=/trunk/; revision=28412
2009-05-13Apply some of the patches from:Anders Broman1-2/+1
http://wiki.wireshark.org/Development/Optimization svn path=/trunk/; revision=28356
2009-05-08FT_BOOLEAN fields with bitmask: Display is 'parent bitfield width' not BASE...Bill Meier1-1/+1
svn path=/trunk/; revision=28316
2008-12-18Fix various typos and spelling errors (mostly in text strings)Bill Meier1-2/+2
svn path=/trunk/; revision=27050
2008-12-17Fix some typos and spelling (mostly in text strings)Bill Meier1-3/+3
svn path=/trunk/; revision=27037
2008-11-12Avoid crash when unable to lookup psm_data before calling dissect_options().Stig Bjørlykke1-9/+15
Removed an unused argument. This fixes bug 3054. svn path=/trunk/; revision=26759
2008-10-08From Shane Kearns:Jaap Keuter1-30/+368
The L2CAP dissector assumes all packets on a connection oriented channel are B-frames (basic mode, or v1.1 backwards compatibility). Retransmission mode or flow control mode (introduced in v1.2 bluetooth spec) use I-frames and S-frames, which are described in the current 2.1 spec here: Volume 3 (core, host volume) - Part A (L2CAP) - 3.3 (CONNECTION-ORIENTED CHANNEL IN RETRANSMISSION/FLOW CONTROL MODES). svn path=/trunk/; revision=26383
2008-02-03From Shane Kearns (bug 2239):Stig Bjørlykke1-12/+103
L2CAP dissector is missing retransmission & flow control modes (these were introduces in BT 1.2 specification) Configuration commands were not fully decoded because of a bigend/littleend issue L2CAP commands had the wrong length set to the protocol tree by reading from the wrong buffer offset Also the dissect_options() function consumes all remaining data in the L2CAP packet, which prevents decoding of other commands which follow a config request/config response in the same packet. From me: Mark an unused parameter. svn path=/trunk/; revision=24262
2007-10-23Apply the small performance enhancment patches for:Anders Broman1-1/+1
- if offset is 0, tvb_length is the same as tvb_length_remaining, just faster. Replace - col_append_fstr() with faster col_append_str() - col_add_str() with col_set_str() when it's safe svn path=/trunk/; revision=23252
2006-08-14rename some structures and defines from the se_tree to the emem_tree prefixRonnie Sahlberg1-2/+2
svn path=/trunk/; revision=18894
2006-06-04warning fix: guint16 is always <= 0xFFFFJörg Mayer1-1/+1
svn path=/trunk/; revision=18334
2006-05-27add reassembly of bluetooth ACL packetsRonnie Sahlberg1-7/+7
doing the reassembly internally in acl instead of calling reassembly.c since the fragmentation is so simple and packets are so small anyway so full reassembly.c support would be overkill. svn path=/trunk/; revision=18223
2006-05-26pass both chandle and cid from l2cap to higher layer protocols.Ronnie Sahlberg1-2/+13
higher layer protocols need the chandle, cid and direction (from pinfo) in order to identify packets for the same "conversation" (it is not a conversation per se in bluetooth butn one unidirectional flow that we track) svn path=/trunk/; revision=18220
2006-05-21change a whole bunch of ethereal into wiresharkRonnie Sahlberg1-4/+4
svn path=/trunk/; revision=18196
2006-05-17for "connection oriented channels" place a generated psm field in the ↵Ronnie Sahlberg1-1/+10
display to make it filterable and also to show what the payload should be. svn path=/trunk/; revision=18177
2006-05-16add dissection of the bluetooth btl2cap layerRonnie Sahlberg1-0/+842
svn path=/trunk/; revision=18170