开发者

Linux carrier detection notification

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜