This helper function returns bdaddr field from btdev. --- emulator/btdev.c | 5 +++++ emulator/btdev.h | 1 + 2 files changed, 6 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index b74442e..41d0e0e 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -319,6 +319,11 @@ void btdev_set_bdaddr(struct btdev *btdev, uint8_t *bdaddr) memcpy(btdev->bdaddr, bdaddr, 6); } +const uint8_t *btdev_get_bdaddr(struct btdev *btdev) +{ + return btdev->bdaddr; +} + void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler, void *user_data) { diff --git a/emulator/btdev.h b/emulator/btdev.h index ef71a9b..fb4df66 100644 --- a/emulator/btdev.h +++ b/emulator/btdev.h @@ -66,6 +66,7 @@ struct btdev *btdev_create(enum btdev_type type, uint16_t id); void btdev_destroy(struct btdev *btdev); void btdev_set_bdaddr(struct btdev *btdev, uint8_t *bdaddr); +const uint8_t *btdev_get_bdaddr(struct btdev *btdev); void btdev_set_command_handler(struct btdev *btdev, btdev_command_func handler, void *user_data); -- 1.8.2 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html