aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Dieb Martins <andre.dieb@signove.com>2011-03-21 09:18:32 -0300
committerJohan Hedberg <johan.hedberg@nokia.com>2011-03-22 12:38:03 +0200
commitbeaf9f10f9b59a8dcfae9666196eaa21f6ef21ac (patch)
treebf93e07ed51cf292ba2c292bcd338babfdd47611
parenta5233e7b3585f33eb0388178648834b2cf2155db (diff)
downloadbluez-hcidump-beaf9f10f9b59a8dcfae9666196eaa21f6ef21ac.tar.gz
bluez-hcidump-beaf9f10f9b59a8dcfae9666196eaa21f6ef21ac.tar.xz
bluez-hcidump-beaf9f10f9b59a8dcfae9666196eaa21f6ef21ac.zip
Add parsing for ATT Read Blob
-rw-r--r--parser/att.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/parser/att.c b/parser/att.c
index 134143c..1cba543 100644
--- a/parser/att.c
+++ b/parser/att.c
@@ -415,6 +415,26 @@ static void att_read_req_dump(int level, struct frame *frm)
printf("handle 0x%2.2x\n", handle);
}
+static void att_read_blob_req_dump(int level, struct frame *frm)
+{
+ uint16_t handle = btohs(htons(get_u16(frm)));
+ uint16_t offset = btohs(htons(get_u16(frm)));
+
+ p_indent(level, frm);
+ printf("handle 0x%4.4x offset 0x%4.4x\n", handle, offset);
+}
+
+static void att_read_blob_resp_dump(int level, struct frame *frm)
+{
+ p_indent(level, frm);
+ printf("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)));
@@ -473,6 +493,12 @@ void att_dump(int level, struct frame *frm)
case ATT_OP_READ_RESP:
raw_dump(level + 1, frm);
break;
+ case ATT_OP_READ_BLOB_REQ:
+ att_read_blob_req_dump(level + 1, frm);
+ break;
+ case ATT_OP_READ_BLOB_RESP:
+ att_read_blob_resp_dump(level + 1, frm);
+ break;
case ATT_OP_HANDLE_NOTIFY:
att_handle_notify_dump(level + 1, frm);
break;