diff options
author | Tedd Ho-Jeong An <tedd.an@intel.com> | 2021-10-25 13:31:19 -0700 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-10-25 13:38:36 -0700 |
commit | 435a55db08aa6019b718124810f770c4d565d901 (patch) | |
tree | 051bcc9b331519f97ebce38ec7d24b9472bbc9c5 /emulator/hciemu.c | |
parent | 9dcd6ea1f9803d8fc40fae8eee9929883ff094ea (diff) | |
download | bluez-435a55db08aa6019b718124810f770c4d565d901.tar.gz |
emulator: Add support to get the advertising address
This patch add supprt emulator to get the advertising address of the
central device.
Diffstat (limited to 'emulator/hciemu.c')
-rw-r--r-- | emulator/hciemu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/emulator/hciemu.c b/emulator/hciemu.c index 1f7af3b93..057f76ff3 100644 --- a/emulator/hciemu.c +++ b/emulator/hciemu.c @@ -629,6 +629,21 @@ void hciemu_set_central_le_rl_len(struct hciemu *hciemu, uint8_t len) btdev_set_rl_len(dev, len); } +const uint8_t *hciemu_get_central_adv_addr(struct hciemu *hciemu, + uint8_t handle) +{ + struct btdev *dev; + + if (!hciemu || !hciemu->vhci) + return NULL; + + dev = vhci_get_btdev(hciemu->vhci); + if (!dev) + return NULL; + + return btdev_get_adv_addr(dev, handle); +} + bool hciemu_add_central_post_command_hook(struct hciemu *hciemu, hciemu_command_func_t function, void *user_data) { |