aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btbnep.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-btbnep.c')
-rw-r--r--epan/dissectors/packet-btbnep.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/epan/dissectors/packet-btbnep.c b/epan/dissectors/packet-btbnep.c
index 3a55c3a30c..93bfa9af13 100644
--- a/epan/dissectors/packet-btbnep.c
+++ b/epan/dissectors/packet-btbnep.c
@@ -273,8 +273,8 @@ dissect_extension(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offse
return offset;
}
-static void
-dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static gint
+dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
proto_item *pi;
proto_tree *btbnep_tree;
@@ -287,6 +287,9 @@ dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
const guint8 *src_addr;
const guint8 *dst_addr;
+ pi = proto_tree_add_item(tree, proto_btbnep, tvb, offset, -1, ENC_NA);
+ btbnep_tree = proto_item_add_subtree(pi, ett_btbnep);
+
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BNEP");
col_clear(pinfo->cinfo, COL_INFO);
@@ -303,9 +306,6 @@ dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
- pi = proto_tree_add_item(tree, proto_btbnep, tvb, offset, -1, ENC_NA);
- btbnep_tree = proto_item_add_subtree(pi, ett_btbnep);
-
proto_tree_add_item(btbnep_tree, hf_btbnep_extension_flag, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(btbnep_tree, hf_btbnep_bnep_type, tvb, offset, 1, ENC_BIG_ENDIAN);
bnep_type = tvb_get_guint8(tvb, offset);
@@ -375,6 +375,8 @@ dissect_btbnep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
call_dissector(data_handle, next_tvb, pinfo, tree);
}
}
+
+ return offset;
}
void
@@ -512,7 +514,7 @@ proto_register_btbnep(void)
};
proto_btbnep = proto_register_protocol("Bluetooth BNEP Protocol", "BT BNEP", "btbnep");
- register_dissector("btbnep", dissect_btbnep, proto_btbnep);
+ new_register_dissector("btbnep", dissect_btbnep, proto_btbnep);
proto_register_field_array(proto_btbnep, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));