监视 IOCTL 的最佳方法是什么?
我有一个 U9 Telit 调制解调器,它首先显示为 USB 总线上的磁盘驱动器。然后,本机软件在自动运行和安装后,发送几个 IOCTL 来告诉设备重新显示为其他内容。我可以在 procmon 中看到它们。
我想更好地监视这些,准确地知道它们发送了什么以及如何发送,以便以正确的方式做同样的事情。
I have a U9 Telit modem which, at first, appears as a disk drive on USB bus. Then, the native software after autorun and install, sends a couple of IOCTLs to tell the device to reappear as other things. I can see them in procmon.
I want to better spy on these, to know exactly what they send and how, in order to do the same in proper way.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试一些类似 Systemtap 的东西。附加一个从内核转储所有 ioctl 和参数的探测器,通过它们进行 grep。
Try something like Systemtap. Attach a probe that dumps all ioctls and arguments from the kernel, grep through them.
你可以在linux下使用strace之类的东西。此处讨论了 Windows 等效项Systrace for Windows。
这可能会显示发送的 ioctl 命令。
一些公司提供其设备的 Linux 内核,可以从其官方网页直接下载。在那里您可能会找到有关其工作原理的更多信息。对于某些设备,构建和部署您自己的内核很容易。这很有帮助,因为您可以添加自定义调试输出。
You could use something like strace under linux. The windows equivalent is discussed here Systrace for Windows.
This might show you the ioctl commands sent.
Some companies offer the linux kernels of their devices as direct download from their official webpage. There you might find more information on how it works. For some devices, it's easy to build and deploy your own kernel. This helps as you can add custom debug output.