let me know the following regarding USB Modem plugin & plug out notification handler APIs or system calls in Linux

醉酒当歌 提交于 2019-12-11 06:28:16

问题


Please let me know the following regarding USB Modem plugin & plug out notification handler APIs or system calls in Linux :

In my application I have to write a function which will receive notifications in the following scenarios :

  1. When a USB Modem is plugged in, I would like to receive a notification that a USB Modem is plugged in, any Linux system call or Linux kernel API is there to send these notifications, also along with notification if I receive additional information about that device, network speed, etc, that will be good

  2. When a USB Modem is plugged out, I would like to receive a notification that a USB Modem is plugged out, any Linux system call or Linux kernel API is there to send these notifications, also along with notification if I receive additional information that will be good

Regards


回答1:


Notification of hotplugging of hardware on modern Linux distributions is handled by udev, either via udevd directly or via D-Bus.



来源:https://stackoverflow.com/questions/13680702/let-me-know-the-following-regarding-usb-modem-plugin-plug-out-notification-han

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!