diff --git a/src/netdev.h b/src/netdev.h index 72c39df5..97365c62 100644 --- a/src/netdev.h +++ b/src/netdev.h @@ -49,5 +49,8 @@ bool netdev_watch_remove(uint32_t id); void __netdev_watch_call_added(struct netdev *netdev); void __netdev_watch_call_removed(struct netdev *netdev); +uint32_t netdev_get_ifindex(struct netdev *netdev); +const uint8_t *netdev_get_address(struct netdev *netdev); + bool netdev_init(void); bool netdev_exit(void); diff --git a/src/wiphy.c b/src/wiphy.c index be42a4e6..5de7a99d 100644 --- a/src/wiphy.c +++ b/src/wiphy.c @@ -218,6 +218,16 @@ static const char *netdev_state_to_string(enum netdev_state state) return "invalid"; } +uint32_t netdev_get_ifindex(struct netdev *netdev) +{ + return netdev->index; +} + +const uint8_t *netdev_get_address(struct netdev *netdev) +{ + return netdev->addr; +} + static void netdev_enter_state(struct netdev *netdev, enum netdev_state state) { l_debug("Old State: %s, new state: %s",