[Pkg-running-devel] [openambit] 126/131: Add boot strap loader (BSL) version to the dissector
Christian Perrier
bubulle at moszumanska.debian.org
Thu Jul 17 20:19:18 UTC 2014
This is an automated email from the git hooks/post-receive script.
bubulle pushed a commit to branch master
in repository openambit.
commit f2f93ae01cd9685b7330c5255f31d80b6286b141
Author: Olaf Meeuwissen <paddy-hack at member.fsf.org>
Date: Mon Jun 2 22:18:33 2014 +0900
Add boot strap loader (BSL) version to the dissector
---
wireshark_dissector/ambit-dissector.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/wireshark_dissector/ambit-dissector.c b/wireshark_dissector/ambit-dissector.c
index 5c630d4..e9e5e77 100644
--- a/wireshark_dissector/ambit-dissector.c
+++ b/wireshark_dissector/ambit-dissector.c
@@ -76,6 +76,7 @@ static int hf_ambit_model = -1;
static int hf_ambit_serial = -1;
static int hf_ambit_fw_version = -1;
static int hf_ambit_hw_version = -1;
+static int hf_ambit_bsl_version = -1;
static int hf_ambit_personal_compass_declination = -1;
static int hf_ambit_personal_map_orientation = -1;
static int hf_ambit_personal_date_format = -1;
@@ -400,6 +401,8 @@ static gint dissect_ambit_device_info_reply(tvbuff_t *tvb, packet_info *pinfo, p
guint16 fw3;
guint8 hw1,hw2;
guint16 hw3;
+ guint8 bv1,bv2;
+ guint16 bv3;
gint offset = 0;
proto_tree_add_item(tree, hf_ambit_model, tvb, offset, 16, ENC_LITTLE_ENDIAN);
offset += 16;
@@ -415,8 +418,13 @@ static gint dissect_ambit_device_info_reply(tvbuff_t *tvb, packet_info *pinfo, p
hw3 = tvb_get_letohs(tvb, offset+2);
proto_tree_add_string_format_value(tree, hf_ambit_hw_version, tvb, offset, 4, "HW version", "%d.%d.%d", hw1, hw2, hw3);
offset += 4;
- dissect_ambit_add_unknown(tvb, pinfo, tree, offset, 8);
- offset += 8;
+ bv1 = tvb_get_guint8(tvb, offset);
+ bv2 = tvb_get_guint8(tvb, offset+1);
+ bv3 = tvb_get_letohs(tvb, offset+2);
+ proto_tree_add_string_format_value(tree, hf_ambit_bsl_version, tvb, offset, 4, "BSL version", "%d.%d.%d", bv1, bv2, bv3);
+ offset += 4;
+ dissect_ambit_add_unknown(tvb, pinfo, tree, offset, 4);
+ offset += 4;
}
static gint dissect_ambit_personal_settings_get(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
@@ -1752,6 +1760,8 @@ proto_register_ambit(void)
{ "FW version", "ambit.fwversion", FT_STRING, BASE_NONE, NULL, 0x0,NULL, HFILL } },
{ &hf_ambit_hw_version,
{ "HW version", "ambit.hwversion", FT_STRING, BASE_NONE, NULL, 0x0,NULL, HFILL } },
+ { &hf_ambit_bsl_version,
+ { "BSL version", "ambit.bslversion", FT_STRING, BASE_NONE, NULL, 0x0,NULL, HFILL } },
{ &hf_ambit_personal_compass_declination,
{ "Compass declination", "ambit.personal.compass_declination", FT_STRING, BASE_NONE, NULL, 0x0,NULL, HFILL } },
{ &hf_ambit_personal_map_orientation,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/openambit.git
More information about the Pkg-running-devel
mailing list