aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Dieb Martins <andre.dieb@signove.com>2011-03-30 11:01:33 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2011-03-30 19:46:19 +0300
commit33a50369148f4cb03099c6d79c8b2b15f65e1340 (patch)
tree54e9300c0740f8430e7d289264d263ca82efda61
parent385d8e843baf5612e1e961405df22e13f684c2c2 (diff)
downloadbluez-hcidump-33a50369148f4cb03099c6d79c8b2b15f65e1340.tar.gz
bluez-hcidump-33a50369148f4cb03099c6d79c8b2b15f65e1340.tar.xz
bluez-hcidump-33a50369148f4cb03099c6d79c8b2b15f65e1340.zip
Add parsing for ATT Prepare Write
-rw-r--r--parser/att.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/parser/att.c b/parser/att.c
index a1cd9af..7046357 100644
--- a/parser/att.c
+++ b/parser/att.c
@@ -507,6 +507,22 @@ static void att_signed_write_dump(int level, struct frame *frm)
printf("\n");
}
+static void att_prep_write_dump(int level, struct frame *frm)
+{
+ uint16_t handle = btohs(htons(get_u16(frm)));
+ uint16_t val_offset = btohs(htons(get_u16(frm)));
+
+ p_indent(level, frm);
+ printf("attr handle 0x%4.4x, value offset 0x%4.4x\n", handle,
+ val_offset);
+
+ p_indent(level, frm);
+ printf("part attr value ");
+ 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)));
@@ -587,6 +603,10 @@ void att_dump(int level, struct frame *frm)
case ATT_OP_SIGNED_WRITE_CMD:
att_signed_write_dump(level + 1, frm);
break;
+ case ATT_OP_PREP_WRITE_REQ:
+ case ATT_OP_PREP_WRITE_RESP:
+ att_prep_write_dump(level + 1, frm);
+ break;
case ATT_OP_HANDLE_NOTIFY:
att_handle_notify_dump(level + 1, frm);
break;