hcidump: Add parsing for ATT Prepare Write

This commit is contained in:
Andre Dieb Martins 2011-03-30 11:01:33 -03:00 committed by Marcel Holtmann
parent 87420ada41
commit 245bb41fd5

View File

@ -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;