diff --git a/monitor/bt.h b/monitor/bt.h
index 74b758d..aed8a55 100644
--- a/monitor/bt.h
+++ b/monitor/bt.h
uint16_t supv_timeout;
} __attribute__ ((packed));
+#define BT_HCI_EVT_LE_DIRECT_ADV_REPORT 0x0b
+struct bt_hci_evt_le_direct_adv_report {
+ uint8_t num_reports;
+ uint8_t event_type;
+ uint8_t addr_type;
+ uint8_t addr[6];
+ uint8_t direct_addr_type;
+ uint8_t direct_addr[6];
+ int8_t rssi;
+} __attribute__ ((packed));
+
#define BT_HCI_ERR_SUCCESS 0x00
#define BT_HCI_ERR_UNKNOWN_COMMAND 0x01
#define BT_HCI_ERR_UNKNOWN_CONN_ID 0x02
diff --git a/monitor/packet.c b/monitor/packet.c
index 734f13b..0894ddb 100644
--- a/monitor/packet.c
+++ b/monitor/packet.c
le16_to_cpu(evt->supv_timeout));
}
+static void le_direct_adv_report_evt(const void *data, uint8_t size)
+{
+ const struct bt_hci_evt_le_direct_adv_report *evt = data;
+
+ print_num_reports(evt->num_reports);
+
+ print_adv_event_type(evt->event_type);
+ print_addr_type("Address type", evt->addr_type);
+ print_addr("Address", evt->addr, evt->addr_type);
+ print_addr_type("Direct address type", evt->direct_addr_type);
+ print_addr("Direct address", evt->direct_addr, evt->direct_addr_type);
+ print_rssi(evt->rssi);
+
+ if (size > sizeof(*evt))
+ packet_hexdump(data + sizeof(*evt), size - sizeof(*evt));
+}
+
struct subevent_data {
uint8_t subevent;
const char *str;
{ 0x08, "LE Read Local P-256 Public Key Complete" },
{ 0x09, "LE Generate DHKey Complete" },
{ 0x0a, "LE Enhanced Connection Complete" },
- { 0x0b, "LE Direct Advertising Report" },
+ { 0x0b, "LE Direct Advertising Report",
+ le_direct_adv_report_evt, 1, false },
{ }
};