Diff between d74391573c6a33f3a12ac2c40ada7a3b43618e63 and 484150cbfd46ec98456af9c5faf42a6f5a78d9fb

Changed Files

File Additions Deletions Status
lib/mgmt.h +1 -0 modified
monitor/main.c +4 -1 modified

Full Patch

diff --git a/lib/mgmt.h b/lib/mgmt.h
index f486d1e..7642747 100644
--- a/lib/mgmt.h
+++ b/lib/mgmt.h
@@ -342,6 +342,7 @@ struct mgmt_ev_new_long_term_key {
 #define MGMT_EV_DEVICE_CONNECTED	0x000B
 struct mgmt_ev_device_connected {
 	struct mgmt_addr_info addr;
+	uint32_t flags;
 	uint16_t eir_len;
 	uint8_t eir[0];
 } __packed;
diff --git a/monitor/main.c b/monitor/main.c
index 79ed247..93e406e 100644
--- a/monitor/main.c
+++ b/monitor/main.c
@@ -784,6 +784,7 @@ static void mgmt_new_long_term_key(uint16_t len, void *buf)
 static void mgmt_device_connected(uint16_t len, void *buf)
 {
 	struct mgmt_ev_device_connected *ev = buf;
+	uint32_t flags;
 	char str[18];
 
 	if (len < sizeof(*ev)) {
@@ -791,9 +792,11 @@ static void mgmt_device_connected(uint16_t len, void *buf)
 		return;
 	}
 
+	flags = btohs(ev->flags);
 	ba2str(&ev->addr.bdaddr, str);
 
-	printf("@ Device Connected: %s (%d)\n", str, ev->addr.type);
+	printf("@ Device Connected: %s (%d) flags 0x%4.4x\n",
+						str, ev->addr.type, flags);
 
 	buf += sizeof(*ev);
 	len -= sizeof(*ev);