aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-aps.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-06Add printf-format annotations, fix garbagePeter Wu1-1/+1
The WRETH dissector showed up some garbage in the column display. Upon further inspection, it turns out that the format string had a trailing percent sign which caused (unsigned)-1 to be returned by g_printf_string_upper_bound (in emem_strdup_vprintf). Then ep_alloc is called with (unsigned)-1 + 1 = 0 memory, no wonder that garbage shows up. ASAN could not even catch this error because EP is in charge of this. So, start adding G_GNUC_PRINTF annotations in each header that uses the "fmt" or "format" paramters (grepped + awk). This revealed some other errors. The NCP2222 dissector was missing a format string (not a security vuln though). Many dissectors used val_to_str with a constant (but empty) string, these have been replaced by val_to_str_const. ASN.1 dissectors were regenerated for this. Minor: the mate plugin used "%X" instead of "%p" for a pointer type. The ncp2222 dissector and wimax plugin gained modelines. Change-Id: I7f3f6a3136116f9b251719830a39a7b21646f622 Reviewed-on: https://code.wireshark.org/review/2881 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-28convert to proto_tree_add_subtree[_format]Michael Mann1-5/+3
Change-Id: Ia7014003a3cff5181295172978d6c613c3b83b0b Reviewed-on: https://code.wireshark.org/review/2676 Tested-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-20Cleanup display filters reported by checkfiltername.plMichael Mann1-2/+2
Also ensured some files have their correct names at the top so they are more easily grepped Change-Id: Ib0f5ddf14eb1616a93dee496107dc0eb09048825 Reviewed-on: https://code.wireshark.org/review/2452 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-18/+18
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-18/+18
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-3/+2
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-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>
2013-12-26ZigBee Test Profile #2 and ZDP fixes. Bug 9584 ↵Michael Mann1-4/+139
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9584) From DSR Corporation svn path=/trunk/; revision=54466
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-09Reject the packet if data is NULL.Chris Maynard1-1/+6
svn path=/trunk/; revision=53893
2013-11-29Improved ZCL dissectors. Bug 9423 ↵Michael Mann1-0/+2
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9423) From DSR Corporation svn path=/trunk/; revision=53636
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-1/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470) I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future. And search/replace of a function name is easy enough to do. The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As. All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope(). All other dissectors were converted to using file_scope() which was the original scope for "proto" data. svn path=/trunk/; revision=53520
2013-11-19add editor modelinesMartin Kaiser1-68/+80
svn path=/trunk/; revision=53429
2013-11-19remove unnecessary if(tree) checksMartin Kaiser1-185/+106
svn path=/trunk/; revision=53428
2013-11-19From DSR CorporationMartin Kaiser1-8/+10
fix segfault in ZigBee APS tunnel commands pass the data parameter to subdissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9438 svn path=/trunk/; revision=53427
2013-11-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+2
svn path=/trunk/; revision=53230
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-2/+1
- 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-25Mark unused parameter, remove moved .h file from Makefile.commonEvan Huus1-1/+1
svn path=/trunk/; revision=52831
2013-10-24Have ZigBee dissectors pass data through subdissector parameter instead of ↵Michael Mann1-61/+50
using struct _packet_info. svn path=/trunk/; revision=52827
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+4
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-09-15emem -> wmem (except uat or init routines)Pascal Quantin1-2/+3
svn path=/trunk/; revision=52087
2013-09-12In some cases add include emem.hJörg Mayer1-0/+1
In other cases emem -> wmem svn path=/trunk/; revision=51994
2013-08-05Keep result of [new_]register_dissector in some dissectors.Jakub Zawadzki1-5/+5
svn path=/trunk/; revision=51156
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-06-20From Fabio Tarabelloni viaEvan Huus1-0/+11
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8718 Zigbee partition cluster dissector. svn path=/trunk/; revision=50089
2013-05-28Batch of filterable expert infos. This (mostly) completes the non-ASN.1 ↵Michael Mann1-2/+14
list of (built-in) dissectors that only had a small handful of add_expert_info_format calls. svn path=/trunk/; revision=49602
2013-05-25From Fabio Tarabelloni via ↵Evan Huus1-0/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8387 ZigBee ZCL OnOff cluster dissection. Also, fix decryption of APS commands. svn path=/trunk/; revision=49571
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-1/+1
svn path=/trunk/; revision=49259
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-8/+8
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-02-19How can I get a new tvbuff that starts at an offset within a givenGuy Harris1-2/+1
tvbuff and runs to the end of the tvbuff? Let me count the ways.... Replace a bunch of different ways of doing that (some incorrect, in that they're not properly handling tvbuffs where the captured and reported lengths are different) with tvb_new_subset_remaining(). svn path=/trunk/; revision=47751
2012-12-26Fix a bunch of warnings.Guy Harris1-2/+2
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-09-07From Robert Bullen via ↵Jeff Morriss1-0/+2
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7683 : The reassembled fragments tree in the Packet Details view is awesome, but it lacks one thing: a field that exposes the reassembled data. tcp.data already exists for exposing a single TCP segment's payload as a byte array. It would be handy to have something similar for a single application layer PDU when TCP segment reassembly is involved. I propose tcp.reassembled.data, named and placed after the already existing field tcp.reassembled.length. My primary use case for this feature is outputting tcp.reassembled.data with tshark for further processing with a script. The attached patch implements this very feature. Because the reassembled fragment tree code is general purpose, i.e. not specific to just TCP, any dissector that relies upon it can add a similar field very cheaply. In that vein I've also implemented ip.reassembled.data and ipv6.reassembled.data, which expose reassembled fragment data as a single byte stream for IPv4 and IPv6, respectively. All other protocols that use the reassembly code have been left alone, other than inserting NULL into their initializer lists for the newly introduced struct field reassemble.h:fragment_items.hf_reassembled_data. svn path=/trunk/; revision=44802
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-4/+4
Also (for a few files): - create/use some extended value strings; - remove unneeded #include files; - remove unneeded variable initialization; - re-order fcns slightly so prefs_reg_handoff...() at end, etc svn path=/trunk/; revision=44438
2012-07-25Converted ZigBee dissectors display filter format from zbee.<protocol> to ↵Michael Mann1-44/+44
zbee_<protocol> Also corrected zbee_afp filters as they were incorrectly using zbee.app svn path=/trunk/; revision=43990
2012-07-18Fix non-proto_tree_add_item() calls passing an ENC_ value as the lastGuy Harris1-2/+2
argument. svn path=/trunk/; revision=43812
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2011-12-22From Fred Fierling:Anders Broman1-1/+10
Update the ZigBee dissectors to the latest profile identifier database, 05-3298-18. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6693 svn path=/trunk/; revision=40272
2011-10-04Use ENC_NA as encoding for proto_tree_add_item() calls which directly ↵Bill Meier1-6/+6
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-05-19Don't assign a value which is never used to a 'proto item *': Covertiy 1135;Bill Meier1-4/+2
Remove some unneeded #includes. svn path=/trunk/; revision=37305
2011-05-08Add FT_EUI64 Field TypeAlexis La Goutte1-67/+38
* Remove proto_tree_add_eui64 function from 802.15.4 Dissector * Replace print_eui64/print_eui64 by eui64_to_str/get_eui64_name * Update Documentation (README.dev) * Add new function in libwireshark.def * Support of encoding for tvb_eui64_to_str * Use FT_EUI64 for ICMPv6, CAPWAP, Zbee ... dissector svn path=/trunk/; revision=37015
2011-03-22Allocate correct size of nwk_keyring.Stig Bjørlykke1-1/+1
Coverity 715. svn path=/trunk/; revision=36265
2011-01-30Introduce "Fragment count" filter element for all protocols doing reassembly.Stig Bjørlykke1-0/+6
svn path=/trunk/; revision=35705
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-1/+1
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-14Minor cleanup:Bill Meier1-11/+11
- Initialize a few static global variables; - Remove two unnecessary calls to g_hash_table_foreach_remove; - Do whitespace cleanup and use consistent indentation; - Fix a few typos and fix up several comments. svn path=/trunk/; revision=35183
2010-12-03From Fred Fierling:Anders Broman1-48/+47
Fixes invalid long address mappings in NWK layer. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5456 svn path=/trunk/; revision=35106
2010-11-03From Fred Fierling:Jaap Keuter1-2/+2
Patch to correct various typos svn path=/trunk/; revision=34757
2010-11-02From Fred Fierling:Jaap Keuter1-0/+19
Update Profile ID Information to ZigBee-053298r17 (2010/7/21) svn path=/trunk/; revision=34749
2010-10-27From Fred Fierling:Anders Broman1-2/+1
Found a bug in the changes from sizeof -> numeric. svn path=/trunk/; revision=34656
2010-10-26From Fred Fierling:Anders Broman1-51/+89
Multi-key Support and Extended Address Mapping for ZigBee Dissectors https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5331 svn path=/trunk/; revision=34647