diff options
author | Michael Mann <mmann78@netscape.net> | 2013-05-28 03:11:44 +0000 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2013-05-28 03:11:44 +0000 |
commit | 553bec65bab1b29317a4a2882af9e36bcf92aafd (patch) | |
tree | ffb845da44f6ecf27b6e645a73ee25fed0ad5ad7 /epan/dissectors/packet-zbee-nwk.c | |
parent | 292e50ed1dc51216ad1b157c3e2d3938528be11e (diff) |
Batch of filterable expert infos. This (mostly) completes the non-ASN.1 list of (built-in) dissectors that only had a small handful of add_expert_info_format calls.
svn path=/trunk/; revision=49602
Diffstat (limited to 'epan/dissectors/packet-zbee-nwk.c')
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 44ac257bf6..11c680fd80 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -151,6 +151,8 @@ static gint ett_zbee_nwk_cmd = -1; static gint ett_zbee_nwk_cmd_options = -1; static gint ett_zbee_nwk_cmd_cinfo = -1; +static expert_field ei_zbee_nwk_missing_payload = EI_INIT; + static dissector_handle_t data_handle; static dissector_handle_t aps_handle; @@ -668,7 +670,7 @@ dissect_zbee_nwk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) */ if (offset >= tvb_length(tvb)) { /* Non-existent or truncated payload. */ - expert_add_info_format(pinfo, proto_root, PI_MALFORMED, PI_ERROR, "Missing Payload"); + expert_add_info(pinfo, proto_root, &ei_zbee_nwk_missing_payload); THROW(BoundsError); } /* Payload is encrypted, attempt security operations. */ @@ -1819,6 +1821,15 @@ void proto_register_zbee_nwk(void) &ett_zbee_nwk_cmd_cinfo }; + static ei_register_info ei[] = { + { &ei_zbee_nwk_missing_payload, { "zbee_nwk.missing_payload", PI_MALFORMED, PI_ERROR, "Missing Payload", EXPFILL }}, + }; + + expert_module_t* expert_zbee_nwk; + + expert_zbee_nwk = expert_register_protocol(proto_zbee_nwk); + expert_register_field_array(expert_zbee_nwk, ei, array_length(ei)); + register_init_routine(proto_init_zbee_nwk); /* Register the protocol with Wireshark. */ |