summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-btobex.c
AgeCommit message (Collapse)AuthorFilesLines
2012-03-12Cleanup & minor bug fixes:Bill Meier1-517/+516
- 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-07Fix incorrect packet-details display of certain 1 bit FT_BOOLEAN fields.Bill Meier1-1/+1
(Use a valid 'parent field width' in the hf[] 'display' field. svn path=/trunk/; revision=41401
2011-10-26Fix Dead Store (Dead assignement/Dead increment) Warning found by ClangAlexis La Goutte1-1/+1
svn path=/trunk/; revision=39611
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-16Do some conversions of proto_tree_add_item() 'encoding' arg.Bill Meier1-1/+1
(previously missed). 57 FT_BOOLEAN: FALSE-->ENC_BIG_ENDIAN 31 FT_BOOLEAN: TRUE-->ENC_LITTLE_ENDIAN 10 FT_BYTES: ENC_BIG_ENDIAN-->ENC_NA 1 FT_BYTES: ENC_LITTLE_ENDIAN-->ENC_NA 21 FT_BYTES: FALSE-->ENC_NA 2 FT_BYTES: TRUE-->ENC_NA 2 FT_IPXNET: ENC_BIG_ENDIAN-->ENC_NA 6 FT_IPv6: ENC_BIG_ENDIAN-->ENC_NA 1 FT_IPv6: FALSE-->ENC_NA 6 FT_NONE: ENC_BIG_ENDIAN-->ENC_NA 19 FT_NONE: FALSE-->ENC_NA 3 FT_NONE: TRUE-->ENC_NA 1 FT_STRING: ENC_BIG_ENDIAN-->ENC_ASCII|ENC_NA 1 FT_STRING: ENC_LITTLE_ENDIAN-->ENC_ASCII|ENC_NA 5 FT_STRING: FALSE-->ENC_ASCII|ENC_NA 1 FT_STRING: TRUE-->ENC_ASCII|ENC_NA 4 FT_STRINGZ: ENC_NA-->ENC_ASCII|ENC_NA 8 FT_STRINGZ: FALSE-->ENC_ASCII|ENC_NA 1 FT_INT32: FALSE-->ENC_BIG_ENDIAN 1 FT_INT32: TRUE-->ENC_LITTLE_ENDIAN 11 FT_UINT8: 0-->ENC_BIG_ENDIAN 111 FT_UINT8: FALSE-->ENC_BIG_ENDIAN 17 FT_UINT8: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT16: 0-->ENC_BIG_ENDIAN 68 FT_UINT16: FALSE-->ENC_BIG_ENDIAN 18 FT_UINT16: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT24: FALSE-->ENC_BIG_ENDIAN 70 FT_UINT32: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT32: TRUE-->ENC_LITTLE_ENDIAN 4 FT_UINT64: FALSE-->ENC_BIG_ENDIAN 1 FT_UINT64: TRUE-->ENC_LITTLE_ENDIAN 1 FT_UINT_STRING: FALSE-->ENC_ASCII|ENC_BIG_ENDIAN svn path=/trunk/; revision=39442
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-16/+16
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-1/+1
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-08Remove unneeded #includes: proto.h,tvbuff.h,value_string.h,stdlib.h,...Bill Meier1-2/+0
svn path=/trunk/; revision=38413
2011-04-18Removed some unneeded assignments.Stig Bjørlykke1-1/+1
Found by clang. svn path=/trunk/; revision=36698
2011-02-17Fix some Visual C++ static analyzer complaints.Gerald Combs1-1/+3
svn path=/trunk/; revision=35971
2011-02-12The lack of _WITH_PHDR in WTAP_ENCAP_BLUETOOTH_H4 means there's noGuy Harris1-2/+20
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-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-0/+6
svn path=/trunk/; revision=35705
2011-01-16Use tvb_memeql() and tvb_memcpy().Jeff Morriss1-7/+5
Use tvb_ip_to_str() and tvb_ip6_to_str(). There's no need to pass the result of tvb_get_ptr() as the 'value' in proto_tree_add_*(): just use proto_tree_add_item(). Replace some tvb_get_ptr()s with tvb_get_ephemeral_string()s to ensure the return string is NULL terminated. svn path=/trunk/; revision=35546
2011-01-02From Allan M. Madsen via. bug 5445:Kovarththanan Rajaratnam1-487/+498
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-09-24(Refining the regexp...) Replace blurbs that match the name (case ↵Jeff Morriss1-4/+4
insensitive) with NULL. svn path=/trunk/; revision=34230
2010-09-23Replace blurbs that match the name (case insensitive) with NULL.Jeff Morriss1-6/+6
svn path=/trunk/; revision=34227
2010-05-19Add svn 'keywords' and 'eol-style' propertiesBill Meier1-750/+750
svn path=/trunk/; revision=32898
2010-05-19Add and use BTOBEX_CODE_VALS_MASK to avoid hardcoding valuesKovarththanan Rajaratnam1-3/+4
svn path=/trunk/; revision=32897
2010-05-19Use newly introduced BTOBEX_CODE_VALS_CONNECT defineKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=32895
2010-05-19Introduce defines to avoid hardcoding valuesKovarththanan Rajaratnam1-14/+22
svn path=/trunk/; revision=32894
2010-05-19Tighten scope of code variableKovarththanan Rajaratnam1-1/+2
svn path=/trunk/; revision=32893
2010-05-19Remove weird assignment to pinfo->private_dataKovarththanan Rajaratnam1-3/+0
svn path=/trunk/; revision=32890
2010-05-18Add FIXMEKovarththanan Rajaratnam1-0/+1
svn path=/trunk/; revision=32874
2010-05-18Remove NULL pointer guard in defragment_init()Kovarththanan Rajaratnam1-5/+2
svn path=/trunk/; revision=32873
2010-05-18Remove a couple of superfluous NULL assignmentsKovarththanan Rajaratnam1-5/+6
svn path=/trunk/; revision=32872
2010-05-18Remove a couple of check_col()Kovarththanan Rajaratnam1-28/+12
svn path=/trunk/; revision=32871
2010-05-18Mark defragment_init() as an init routineKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=32866
2010-05-18Fix several GCC build issuesKovarththanan Rajaratnam1-18/+13
svn path=/trunk/; revision=32865
2010-05-18Include (local) packet-btl2cap.h properlyKovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=32863
2010-05-18From Allan M. Madsen:Kovarththanan Rajaratnam1-0/+765
Initial implementation of Bluetooth OBEX dissector. Work in progress. svn path=/trunk/; revision=32862