mirror of
https://github.com/apache/nuttx.git
synced 2026-05-13 18:48:11 +08:00
9a23ebdbc0
We're using the `sll_ifindex` inside `struct sockaddr_ll` to bind device, so we don't need to translate it into mac address, we can just match the index, which also let us bind to different type of devices other than Ethernet. Ref: Linux also uses `ifindex` to find related device and note it down without mac addresses. https://man7.org/linux/man-pages/man7/packet.7.html https://github.com/torvalds/linux/blob/v6.7/net/packet/af_packet.c#L3328 https://github.com/torvalds/linux/blob/v6.7/net/packet/af_packet.c#L3264-L3265 Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>