开发者

Linux carrier detection notification

开发者 https://www.devze.com 2023-04-05 15:17 出处:网络
Is there an interface in Linux to get notification of a network interface carrier change?I know its possible to poll an interface with SIOCETHTOOL, but was wondering if there was any way to get notifi

Is there an interface in Linux to get notification of a network interface carrier change? I know its possible to poll an interface with SIOCETHTOOL, but was wondering if there was any way to get notified or any blockin开发者_如何学Gog calls that would return on carrier detection changes?


Do you need carrier transition or interface state change? For the interface state you could listen to the NETLINK_ROUTE netlink socket and wait for RTM_NEWLINK and RTM_DELLINK messages

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号