aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Dieb Martins <andre.dieb@signove.com>2011-03-30 11:01:31 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2011-03-30 19:45:20 +0300
commit55835194f59a021ceb4075c2591e1f6df229c7e8 (patch)
tree5b61863d98abb3041aad4830c7fabaa892897e31
parent0f213ad978769603e04b3e12a46e8cbfa9dbc5d5 (diff)
downloadbluez-hcidump-55835194f59a021ceb4075c2591e1f6df229c7e8.tar.gz
bluez-hcidump-55835194f59a021ceb4075c2591e1f6df229c7e8.tar.xz
bluez-hcidump-55835194f59a021ceb4075c2591e1f6df229c7e8.zip
Add parsing for ATT Signed Write
-rw-r--r--parser/att.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/parser/att.c b/parser/att.c
index 595c984..5bff925 100644
--- a/parser/att.c
+++ b/parser/att.c
@@ -488,6 +488,25 @@ static void att_write_req_dump(int level, struct frame *frm)
printf("\n");
}
+static void att_signed_write_dump(int level, struct frame *frm)
+{
+ uint16_t handle = btohs(htons(get_u16(frm)));
+ int value_len = frm->len - 12; /* handle:2 already accounted, sig: 12 */
+
+ p_indent(level, frm);
+ printf("handle 0x%4.4x value ", handle);
+
+ while (value_len--)
+ printf(" 0x%2.2x", get_u8(frm));
+ printf("\n");
+
+ p_indent(level, frm);
+ printf("auth signature ");
+ 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)));
@@ -565,6 +584,9 @@ void att_dump(int level, struct frame *frm)
case ATT_OP_WRITE_CMD:
att_write_req_dump(level + 1, frm);
break;
+ case ATT_OP_SIGNED_WRITE_CMD:
+ att_signed_write_dump(level + 1, frm);
+ break;
case ATT_OP_HANDLE_NOTIFY:
att_handle_notify_dump(level + 1, frm);
break;