diff --git a/emulator/btdev.c b/emulator/btdev.c
index 7f00b47..38769d8 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
return btdev->features;
}
+uint8_t btdev_get_scan_enable(struct btdev *btdev)
+{
+ return btdev->scan_enable;
+}
+
uint8_t btdev_get_le_scan_enable(struct btdev *btdev)
{
return btdev->le_scan_enable;
diff --git a/emulator/btdev.h b/emulator/btdev.h
index 324e63b..40c7219 100644
--- a/emulator/btdev.h
+++ b/emulator/btdev.h
const uint8_t *btdev_get_bdaddr(struct btdev *btdev);
uint8_t *btdev_get_features(struct btdev *btdev);
+uint8_t btdev_get_scan_enable(struct btdev *btdev);
+
uint8_t btdev_get_le_scan_enable(struct btdev *btdev);
void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler,
diff --git a/emulator/hciemu.c b/emulator/hciemu.c
index dd6cf12..c8d9db5 100644
--- a/emulator/hciemu.c
+++ b/emulator/hciemu.c
return btdev_get_bdaddr(hciemu->client_dev);
}
+uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu)
+{
+ if (!hciemu || !hciemu->master_dev)
+ return NULL;
+
+ return btdev_get_scan_enable(hciemu->master_dev);
+}
+
uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu)
{
if (!hciemu || !hciemu->master_dev)
diff --git a/emulator/hciemu.h b/emulator/hciemu.h
index bfc184d..c5578d1 100644
--- a/emulator/hciemu.h
+++ b/emulator/hciemu.h
const uint8_t *hciemu_get_master_bdaddr(struct hciemu *hciemu);
const uint8_t *hciemu_get_client_bdaddr(struct hciemu *hciemu);
+uint8_t hciemu_get_master_scan_enable(struct hciemu *hciemu);
+
uint8_t hciemu_get_master_le_scan_enable(struct hciemu *hciemu);
typedef void (*hciemu_command_func_t)(uint16_t opcode, const void *data,