From 11ec2d244b7c6d535cc06c4f540df60064175d4b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Fri, 11 Oct 2013 21:07:00 +0200 Subject: [PATCH] monitor: Add ATT Prepare Write Request decoding --- monitor/l2cap.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/monitor/l2cap.c b/monitor/l2cap.c index c363d7a11..0f194f817 100644 --- a/monitor/l2cap.c +++ b/monitor/l2cap.c @@ -1964,6 +1964,13 @@ static void att_write_rsp(const struct l2cap_frame *frame) { } +static void att_prepare_write_req(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; @@ -2056,7 +2063,8 @@ static const struct att_opcode_data att_opcode_table[] = { att_write_req, 2, false }, { 0x13, "Write Response", att_write_rsp, 0, true }, - { 0x16, "Prepare Write Request" }, + { 0x16, "Prepare Write Request", + att_prepare_write_req, 4, false }, { 0x17, "Prepare Write Response" }, { 0x18, "Execute Write Request", att_execute_write_req, 1, true }, -- 2.11.0