summaryrefslogtreecommitdiff
path: root/monitor
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2013-10-11 22:10:05 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2013-10-11 22:10:05 +0300
commitd2ed418da8c4be2a8611af33bedf556b850c75a7 (patch)
tree8f632aae5ef56e1bdbb3adb9f6e0d063ffbf9c2e /monitor
parent11ec2d244b7c6d535cc06c4f540df60064175d4b (diff)
downloadbluez-d2ed418da8c4be2a8611af33bedf556b850c75a7.tar.gz
monitor: Add ATT Prepare Write Response decoding
Diffstat (limited to 'monitor')
-rw-r--r--monitor/l2cap.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/monitor/l2cap.c b/monitor/l2cap.c
index 0f194f817..ad6e64b0c 100644
--- a/monitor/l2cap.c
+++ b/monitor/l2cap.c
@@ -1971,6 +1971,13 @@ static void att_prepare_write_req(const struct l2cap_frame *frame)
print_hex_field(" Data", frame->data + 4, frame->size - 4);
}
+static void att_prepare_write_rsp(const struct l2cap_frame *frame)
+{
+ print_field("Handle: 0x%4.4x", bt_get_le16(frame->data));
+ print_field("Offset: 0x%4.4x", bt_get_le16(frame->data + 2));
+ print_hex_field(" Data", frame->data + 4, frame->size - 4);
+}
+
static void att_execute_write_req(const struct l2cap_frame *frame)
{
uint8_t flags = *(uint8_t *) frame->data;
@@ -2065,7 +2072,8 @@ static const struct att_opcode_data att_opcode_table[] = {
att_write_rsp, 0, true },
{ 0x16, "Prepare Write Request",
att_prepare_write_req, 4, false },
- { 0x17, "Prepare Write Response" },
+ { 0x17, "Prepare Write Response",
+ att_prepare_write_rsp, 4, false },
{ 0x18, "Execute Write Request",
att_execute_write_req, 1, true },
{ 0x19, "Execute Write Response" },