summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bt3ds.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-bt3ds.c')
-rw-r--r--epan/dissectors/packet-bt3ds.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/epan/dissectors/packet-bt3ds.c b/epan/dissectors/packet-bt3ds.c
index cc0ee988..d955b9b3 100644
--- a/epan/dissectors/packet-bt3ds.c
+++ b/epan/dissectors/packet-bt3ds.c
@@ -19,20 +19,20 @@
#include "packet-btl2cap.h"
#include "packet-btsdp.h"
-static int proto_bt3ds = -1;
+static int proto_bt3ds;
-static int hf_message_opcode = -1;
-static int hf_association_notification = -1;
-static int hf_user_request_for_battery_level_display = -1;
-static int hf_reserved = -1;
-static int hf_battery_level = -1;
+static int hf_message_opcode;
+static int hf_association_notification;
+static int hf_user_request_for_battery_level_display;
+static int hf_reserved;
+static int hf_battery_level;
-static expert_field ei_message_opcode_reserved = EI_INIT;
-static expert_field ei_reserved = EI_INIT;
-static expert_field ei_battery_level_reserved = EI_INIT;
-static expert_field ei_unexpected_data = EI_INIT;
+static expert_field ei_message_opcode_reserved;
+static expert_field ei_reserved;
+static expert_field ei_battery_level_reserved;
+static expert_field ei_unexpected_data;
-static gint ett_bt3ds = -1;
+static int ett_bt3ds;
static dissector_handle_t b3ds_handle;
@@ -44,14 +44,14 @@ static const value_string message_opcode_vals[] = {
void proto_register_bt3ds(void);
void proto_reg_handoff_bt3ds(void);
-static gint
+static int
dissect_bt3ds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
{
proto_item *main_item;
proto_tree *main_tree;
proto_item *sub_item;
- gint offset = 0;
- guint8 value;
+ int offset = 0;
+ uint8_t value;
main_item = proto_tree_add_item(tree, proto_bt3ds, tvb, offset, -1, ENC_NA);
main_tree = proto_item_add_subtree(main_item, ett_bt3ds);
@@ -71,23 +71,23 @@ dissect_bt3ds(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
}
sub_item = proto_tree_add_item(main_tree, hf_message_opcode, tvb, offset, 1, ENC_BIG_ENDIAN);
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value > 0)
expert_add_info(pinfo, sub_item, &ei_message_opcode_reserved);
offset += 1;
- col_add_str(pinfo->cinfo, COL_INFO, val_to_str_const(value, message_opcode_vals, "Unknown"));
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(value, message_opcode_vals, "Unknown"));
sub_item = proto_tree_add_item(main_tree, hf_reserved, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(main_tree, hf_user_request_for_battery_level_display, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(main_tree, hf_association_notification, tvb, offset, 1, ENC_BIG_ENDIAN);
- value = tvb_get_guint8(tvb, offset) >> 2;
+ value = tvb_get_uint8(tvb, offset) >> 2;
if (value != 0)
expert_add_info(pinfo, sub_item, &ei_reserved);
offset += 1;
sub_item = proto_tree_add_item(main_tree, hf_battery_level, tvb, offset, 1, ENC_BIG_ENDIAN);
- value = tvb_get_guint8(tvb, offset);
+ value = tvb_get_uint8(tvb, offset);
if (value >= 101 && value <= 254)
expert_add_info(pinfo, sub_item, &ei_battery_level_reserved);
else if (value == 255)
@@ -145,7 +145,7 @@ proto_register_bt3ds(void)
}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_bt3ds
};