summaryrefslogtreecommitdiff
path: root/monitor/lmp.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-10-07 22:39:05 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-10-07 22:39:05 +0200
commit8cfdd8d0093582ebd9f657fdcb2d5f03f2b04e0a (patch)
treefc407ecd66c7278cb36d40f90992afe8c367c435 /monitor/lmp.c
parent7eea0b56b052bec2830527519390b8540c95884c (diff)
downloadbluez-8cfdd8d0093582ebd9f657fdcb2d5f03f2b04e0a.tar.gz
monitor: Print LMP master vs slave transaction identification
Diffstat (limited to 'monitor/lmp.c')
-rw-r--r--monitor/lmp.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/monitor/lmp.c b/monitor/lmp.c
index 9fad20fc7..d36861aac 100644
--- a/monitor/lmp.c
+++ b/monitor/lmp.c
@@ -738,11 +738,14 @@ void lmp_packet(const void *data, uint8_t size, bool padded)
const char *opcode_color, *opcode_str;
uint16_t opcode;
uint8_t tid, off;
+ const char *tid_str;
int i;
tid = ((const uint8_t *) data)[0] & 0x01;
opcode = (((const uint8_t *) data)[0] & 0xfe) >> 1;
+ tid_str = tid == 0x00 ? "Master" : "Slave";
+
switch (opcode) {
case 127:
opcode = LMP_ESC4(((const uint8_t *) data)[1]);
@@ -777,10 +780,12 @@ void lmp_packet(const void *data, uint8_t size, bool padded)
if (opcode & 0xff00)
print_indent(6, opcode_color, "", opcode_str, COLOR_OFF,
- " (%u/%u) TID %u", opcode >> 8, opcode & 0xff, tid);
+ " (%u/%u) %s transaction (%u)",
+ opcode >> 8, opcode & 0xff, tid_str, tid);
else
print_indent(6, opcode_color, "", opcode_str, COLOR_OFF,
- " (%u) TID %d", opcode, tid);
+ " (%u) %s transaction (%d)",
+ opcode, tid_str, tid);
if (!lmp_data || !lmp_data->func) {
packet_hexdump(data + off, size - off);