aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-lmp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-07-02 16:51:03 +0000
committerMichael Mann <mmann78@netscape.net>2013-07-02 16:51:03 +0000
commit090ddb6afc7fcc55a0b02da6ef58a58a8dd04db1 (patch)
tree2ccd8ac3e4155e1fa45e0f464588e46762a03301 /epan/dissectors/packet-lmp.c
parent2ab52de57238649b79ea47510f6c9712d451fa3c (diff)
Remove dependency on proto_malformed as it should be encapsulated in expert info API (through show exception API)
svn path=/trunk/; revision=50315
Diffstat (limited to 'epan/dissectors/packet-lmp.c')
-rw-r--r--epan/dissectors/packet-lmp.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/epan/dissectors/packet-lmp.c b/epan/dissectors/packet-lmp.c
index 2ce07bc32a..5dee147ad3 100644
--- a/epan/dissectors/packet-lmp.c
+++ b/epan/dissectors/packet-lmp.c
@@ -54,7 +54,6 @@
#include <epan/etypes.h>
#include <epan/ipproto.h>
#include <epan/expert.h>
-#include <show_exception.h>
#include "packet-ip.h"
#include "packet-rsvp.h"
@@ -673,7 +672,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
proto_tree *lmp_object_header_tree;
proto_tree *lmp_flags_tree;
proto_tree *lmp_subobj_tree;
- proto_item *hidden_item;
+ proto_item *hidden_item, *msg_item;
guint8 version;
guint8 flags;
@@ -721,7 +720,7 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
tvb, offset+2, 1, flags);
proto_tree_add_boolean(lmp_header_flags_tree, hf_lmp_filter[LMPF_HDR_FLAGS_REBOOT],
tvb, offset+2, 1, flags);
- proto_tree_add_uint(lmp_header_tree, hf_lmp_filter[LMPF_MSG], tvb,
+ msg_item = proto_tree_add_uint(lmp_header_tree, hf_lmp_filter[LMPF_MSG], tvb,
offset+3, 1, message_type);
proto_tree_add_text(lmp_header_tree, tvb, offset+4, 2, "Length: %d bytes",
msg_length);
@@ -735,8 +734,8 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
tvb, offset+3, 1, 1);
PROTO_ITEM_SET_HIDDEN(hidden_item);
} else {
- proto_tree_add_protocol_format(lmp_header_tree, proto_malformed, tvb, offset+3, 1,
- "Invalid message type: %u", message_type);
+ expert_add_info_format(pinfo, msg_item, PI_MALFORMED, PI_ERROR,
+ "Invalid message type: %u", message_type);
return tvb_length(tvb);
}
@@ -777,16 +776,15 @@ dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
object_type = val_to_str_const(lmp_class, lmp_class_vals, "Unknown");
hidden_item = proto_tree_add_uint(lmp_tree, hf_lmp_filter[LMPF_OBJECT], tvb,
offset, 1, lmp_class);
- PROTO_ITEM_SET_HIDDEN(hidden_item);
+ PROTO_ITEM_SET_GENERATED(hidden_item);
if (lmp_valid_class(lmp_class)) {
ti = proto_tree_add_item(lmp_tree,
hf_lmp_filter[lmp_class_to_filter_num(lmp_class)],
tvb, offset, obj_length, ENC_NA); /* all possibilities are FT_NONE */
} else {
- proto_tree_add_protocol_format(lmp_tree, proto_malformed, tvb,
- offset+1, 1,
- "Invalid class: %u", lmp_class);
+ expert_add_info_format(pinfo, hidden_item, PI_MALFORMED, PI_ERROR,
+ "Invalid class: %u", lmp_class);
return tvb_length(tvb);
}
lmp_object_tree = proto_item_add_subtree(ti, lmp_class_to_subtree(lmp_class));