aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zbee-nwk.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-3/+3
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-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-4/+4
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-01ZigBee: fix dissection of Link Status Address fieldPascal Quantin1-1/+1
Bug: 11564 Change-Id: I4320c794a0b6ba1693e2729eea424a0a43cf54d8 Reviewed-on: https://code.wireshark.org/review/10715 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-08-10Try to fix the build bou by copying tha cast made in glib.AndersBroman1-1/+1
Change-Id: I6da06b8e6ae272b940ef4ee47ce6b253bf9f3699 Reviewed-on: https://code.wireshark.org/review/9961 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10g_slist_free_full () does not exist until GLIB 2.28AndersBroman1-0/+5
Change-Id: I81df5b4dbe1916eca51cdb72199de7a90471bd07 Reviewed-on: https://code.wireshark.org/review/9960 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-10zigbee: fix two memory leaksMartin Kaiser1-3/+8
==17992== 4 bytes in 1 blocks are definitely lost in loss record 68 of 4,102 ==17992== at 0x4C28BED: malloc (vg_replace_malloc.c:263) ==17992== by 0x9FB2F30: g_malloc (gmem.c:159) ==17992== by 0x9FC89E5: g_memdup (gstrfuncs.c:384) ==17992== by 0x703F977: dissect_zbee_aps (packet-zbee-aps.c:1300) ==17992== by 0x67B4F1E: call_dissector_through_handle (packet.c:618) ==17992== 8 bytes in 1 blocks are definitely lost in loss record 580 of 4,102 ==17992== at 0x4C272B8: calloc (vg_replace_malloc.c:566) ==17992== by 0x9FB2F88: g_malloc0 (gmem.c:189) ==17992== by 0x703F962: dissect_zbee_aps (packet-zbee-aps.c:1299) ==17992== by 0x67B4F1E: call_dissector_through_handle (packet.c:618) second version that uses glib memory routines and does not mix g_hash_table and wmem remove an obsolete comment and an unnecessary return; while at it Change-Id: I2e92db0613f01b6c3009e8ad82ceb65a87cba12e Reviewed-on: https://code.wireshark.org/review/9830 Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-09zigbee: remove a numer of unnecessary if (tree) checksMartin Kaiser1-63/+31
Change-Id: Ifd0dcc220cfdd0809f2e7cf2fc54fc8bdeb987be Reviewed-on: https://code.wireshark.org/review/9947 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2015-07-17Remove all preferences related to enabling/disabling heuristic dissectors.Michael Mann1-3/+3
The preferences are still supported for backwards compatibility, but the heuristic_protos file has final say on the "preference" to enable/disable a heuristic dissector. Also add parameter to heur_dissector_add() for the "default" enable/disable of a heuristic dissector. With this parameter, a few more (presumably weak) heuristic dissectors have been "registered" but of course default to being disabled. Change-Id: I51bebb2146ef3fbb8418d4f5c7f2cb2b58003a22 Reviewed-on: https://code.wireshark.org/review/9610 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Roland Knall <rknall@gmail.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-12Add "user presentable" and "unique string ids" to heuristic table entries.Michael Mann1-3/+3
This allows better presentation of heuristic dissectors to the end user. Change-Id: I2ff3985ab914e83c2989880cc0c7b9904045b3f6 Reviewed-on: https://code.wireshark.org/review/9602 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy and move g_hash_table_destroyPeter Wu1-6/+10
This patch moves g_hash_table_destroy calls from the init routine to the cleanup routine. Besides that, the conditional check for the hash table has been removed, assuming that init is always paired with a cleanup call. If reassembly_table_init is found, a reassembly_table_destroy call is prepended to the cleanup function as well. Comments have been removed from the init function as well as these did not seem to have additional value ("destroy hash table" is clear from the context). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4d11f07180d9c115eb14bd860e9a47d82d3d1dcd Manually edited files (for assignment auditing): dvbci, ositp, sccp, tcp. Other files that needed special attention due to the use of register_postseq_cleanup_routine: - ipx: keep call, do not add another cleanup routine. - ncp: remove empty mncp_postseq_cleanup. mncp_hash_lookup is used even if a frame is visited before (see dissect_ncp_common), hence the hash table cannot be destroyed here. Do it in cleanup instead. - ndps: add cleanup routine to kill reassembly table, but do not destroy the hash table as it is already done in ndps_postseq_cleanup. Change-Id: I95a72b3df2978b2c13fefff6bd6821442193d0ed Reviewed-on: https://code.wireshark.org/review/9223 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-27Convert proto_tree_add_boolean to ↵Michael Mann1-17/+14
proto_tree_add_bitmask_[value|value_with_flags|list] Final part. While there change deprecated tvb_length-xxx() calls Change-Id: I8b0cf823c2d37a92c58fcb653f7fe1e8fdad5a79 Reviewed-on: https://code.wireshark.org/review/8642 Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-01Use COPY_ADDRESS_SHALLOW instead of duplicating TVB_SET_ADDRESS and ↵Michael Mann1-2/+2
SET_ADDRESS calls for the same address. Change-Id: I0c9cc5d574fdd73ecf1f8b32dbbf0ddb2b885116 Reviewed-on: https://code.wireshark.org/review/7437 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-21Remove some dead initializersBill Meier1-10/+10
Change-Id: I16c88b5e8f6e79a0d9b33b9c3c4d94f77ecfdfa2 Reviewed-on: https://code.wireshark.org/review/6723 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-09Convert EUI64 address APIs to use wmem.Michael Mann1-1/+1
Change-Id: I57d2e435ac72ea07ec9a567e0b1ce4410966e3d2 Reviewed-on: https://code.wireshark.org/review/6419 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-26Remove proto_tree_add_text from ZigBee dissectors.Michael Mann1-176/+156
Change-Id: I0488cb0ab33f2cc6dee227f1bfacec58eafc4190 Reviewed-on: https://code.wireshark.org/review/6055 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-25Deleting unnecessary #includes from dissectors.Martin Mathieson1-2/+0
Fifth batch (packet-rtp.c -> end). Will look at cleaning up and committing script afterwards. Change-Id: I8ed61dc941d98d3f7259a9d1f74e214eb7b4bfa2 Reviewed-on: https://code.wireshark.org/review/6052 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-4/+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-17Fixed bug in ZigBee (zbee) decryption, added Key Establishment cluster and ↵Chris Brandson1-10/+10
moved IAS, Thermostat and Poll clusters out of the ZCL foundation dissector. Removed attrID and cmdID ZCL cluster functions. Bug in ZCL HVAC attribute registration. Fixed bug in ZCL command ID field registration. Update Manufacturer Codes and Profile Ids to ZigBee-053874r26 Oct 2014 Fixed broken fragmented ZigBee packet collection and reassembly Use protocol fields for Thermostat schedule transitions. Added support for Key Establishment Cluster (CBKE) at SE 1.2a Updated Message cluster to SE 1.2a spec Added attribute reporting status which is common to all SE 1.2a clusters Added SE 1.2a tunnel cluster support ZigBee Smart Energy (SE) decryption appears to have been broken for some time. For SE you do not know the Link Key until after successful completion of Key Establishment and then manually enter it into preferences. Entry in preferences was broken such that when the new Link Key was entered all existing link keys would be lost. This lead to the loss of the Network Key as well when the Transport Key message was re-processed without the Pre-Configured Link Key. The Link Key 'key ring' has been moved to the UAT post-update callback so that it will always be updated correctly after changes to the link keys in preferences The attribute reporting status attribute which is common to all SE clusters was accidentally shared, now each cluster has it's own instance ZigBee security added key display for decrypted packets ZigBee Security Preferences fixed UAT type for Label so key label is editable again Added definition for Retail Service profile Added dissection for profile-wide (General Command Frame) commands when the profile is unknown Added zbee-zcl-misc.c to precommit check whitelist as it contains ias and hvac clusters avoiding proliferation of too many small files Change-Id: I53d85ba9d782db6a0e7e78c51b0bc7cdcdbca3ad Reviewed-on: https://code.wireshark.org/review/5565 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-12-01Use proto_tree_add_bitmask for groups of proto_tree_add_boolean.Michael Mann1-25/+15
Part 3 of many, but this concludes the strict conversion to proto_tree_add_bitmask. Patches to follow with use proto_tree_add_bitmask_xxx (some functions still need to be written) Change-Id: Ic2435667c6a7f1d40602124e5044954d2a296180 Reviewed-on: https://code.wireshark.org/review/5553 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-09-29Add editor modelines; fix indentation as needed.Bill Meier1-0/+13
Change-Id: I1ad94654343e5a018a0b3159481d45ffb3a91263 Reviewed-on: https://code.wireshark.org/review/4363 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-06-28convert to proto_tree_add_subtree[_format]Michael Mann1-14/+8
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-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-19Add dissectors to match the groups of display filters they represent instead ↵Michael Mann1-17/+14
of all coming from proto_zbee_nwk. Change-Id: I8049e84af4670b3dec436d2bab143d59557c07aa Reviewed-on: https://code.wireshark.org/review/2450 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-13/+13
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-13/+13
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-4/+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-05-22Tighten heuristic checks for IEEE 802.15.4 protocols, and add Decode-As by ↵Owen Kirby1-25/+190
PANID for when we still get it wrong. Change-Id: Icc2b274d2478a9426da881998bbbbfb3bf34ec4a Reviewed-on: https://code.wireshark.org/review/1167 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-04-19More name changes.Guy Harris1-1/+1
Add ep_ to routines that may return ephemeral strings. Change "get_XXX" to "XXX_to_display" if the routine returns a formatted string if it can't get a name. Change-Id: Ia0e82784349752cf4285bf82788316c9588fdd88 Reviewed-on: https://code.wireshark.org/review/1217 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-28Add ZigBee Green Power dissector. Bug 9424 ↵Michael Mann1-28/+61
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9424) From DSR Corporation svn path=/trunk/; revision=54478
2013-12-15Make checkAPI happyAlexis La Goutte1-2/+2
Error: hf_zbee_beacon_router_capacity: FT_BOOLEAN with a bitmask must specify a 'parent field width' for 'display' in packet-zbee-nwk.c Error: hf_zbee_beacon_end_device_capacity: FT_BOOLEAN with a bitmask must specify a 'parent field width' for 'display' in packet-zbee-nwk.c svn path=/trunk/; revision=54124
2013-12-15proto_tree_add_xxx -> proto_tree_add_itemMichael Mann1-49/+25
svn path=/trunk/; revision=54112
2013-12-13Return FALSE from dissect_zbee_nwk_heur() if data is NULL.Chris Maynard1-1/+2
svn path=/trunk/; revision=54064
2013-12-09Reject the packet if data is NULL.Chris Maynard1-2/+12
svn path=/trunk/; revision=53893
2013-11-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-3/+3
(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-10Add missing includes in order to remove exceptions.h from proto.h (next commit).Jakub Zawadzki1-0/+1
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-25Fix checkAPIs: don't add hf_zbee_beacon_protocol withJeff Morriss1-1/+1
proto_tree_add_uint(..., ENC_NA); use proto_tree_add_item() as it appears was intended. svn path=/trunk/; revision=52840
2013-10-25Pass ieee802154_packet data into the heuristic check instead of using ↵Michael Mann1-21/+20
private_data. svn path=/trunk/; revision=52836
2013-10-24Have ZigBee dissectors pass data through subdissector parameter instead of ↵Michael Mann1-35/+20
using struct _packet_info. svn path=/trunk/; revision=52827
2013-09-12In some cases add include emem.hJörg Mayer1-1/+2
In other cases emem -> wmem svn path=/trunk/; revision=51994
2013-05-28Batch of filterable expert infos. This (mostly) completes the non-ASN.1 ↵Michael Mann1-1/+12
list of (built-in) dissectors that only had a small handful of add_expert_info_format calls. svn path=/trunk/; revision=49602
2013-05-12Add the posibillity to use a key for per-packet-data.Anders Broman1-3/+3
svn path=/trunk/; revision=49259
2013-03-19From beroset:Anders Broman1-2/+2
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48430
2012-10-22Memory for address->data store in pinfo can no longer be ep_ allocated.Jakub Zawadzki1-2/+1
svn path=/trunk/; revision=45720
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-10Initial commit to support yet another method of passing data between dissectors.Jakub Zawadzki1-1/+1
Add new parameter 'data' to heur_dissector_t and new_dissector_t, for now it's always NULL svn path=/trunk/; revision=44860
2012-08-10Use val_to_str_const() where appropriate;Bill Meier1-7/+7
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-25zbee.aps was renamed zbee_aps (in r43990).Jeff Morriss1-1/+1
svn path=/trunk/; revision=44015
2012-07-25Converted ZigBee dissectors display filter format from zbee.<protocol> to ↵Michael Mann1-67/+67
zbee_<protocol> Also corrected zbee_afp filters as they were incorrectly using zbee.app svn path=/trunk/; revision=43990