aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Dieb Martins <andre.dieb@signove.com>2011-03-30 11:01:29 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2011-03-30 19:44:37 +0300
commit0c6186711a5201de5a654df324e3cd224db28fe3 (patch)
treee46bdacdbdf8a22a484616be0b127e7aecf54aef
parent633d0d38daafad0f9a439bc2f2d7f8e632b87161 (diff)
downloadbluez-hcidump-0c6186711a5201de5a654df324e3cd224db28fe3.tar.gz
bluez-hcidump-0c6186711a5201de5a654df324e3cd224db28fe3.tar.xz
bluez-hcidump-0c6186711a5201de5a654df324e3cd224db28fe3.zip
Add parsing for ATT Write Request
Note we do not need extra parsing for ATT Write Response as it only has one field (opcode).
-rw-r--r--parser/att.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/parser/att.c b/parser/att.c
index 7b8b83c..3804206 100644
--- a/parser/att.c
+++ b/parser/att.c
@@ -476,6 +476,18 @@ static void att_read_by_group_resp_dump(int level, struct frame *frm)
}
}
+static void att_write_req_dump(int level, struct frame *frm)
+{
+ uint16_t handle = btohs(htons(get_u16(frm)));
+
+ p_indent(level, frm);
+ printf("handle 0x%4.4x value ", handle);
+
+ while (frm->len > 0)
+ printf(" 0x%2.2x", get_u8(frm));
+ printf("\n");
+}
+
static void att_handle_notify_dump(int level, struct frame *frm)
{
uint16_t handle = btohs(htons(get_u16(frm)));
@@ -549,6 +561,9 @@ void att_dump(int level, struct frame *frm)
case ATT_OP_READ_BY_GROUP_RESP:
att_read_by_group_resp_dump(level + 1, frm);
break;
+ case ATT_OP_WRITE_REQ:
+ att_write_req_dump(level + 1, frm);
+ break;
case ATT_OP_HANDLE_NOTIFY:
att_handle_notify_dump(level + 1, frm);
break;