c - 将 WireShark 集成到我的应用程序中

标签 c network-programming wireshark

我可以将 WireShark(作为命令或 system() 命令)集成到我的 C 程序中,以便嗅探我的 PC 中收到的所有数据包吗?我尝试使用NETCAT。但它不起作用,因为我想要嗅探的数据包是在 UDP 多播地址中发送的:224.1.1.113。

最佳答案

这个工具似乎有你想要的

http://www.netresec.com/?page=RawCap

此外,这里还有对wireshark CLI的引用

https://www.wireshark.org/docs/wsug_html_chunked/ChCustCommandLine.html

它有很多选项可以进行过滤,因此您可以将其设置为您想要的确切数据包类型。您可以调用此命令。

这里是多播过滤器的 wiki 引用

https://en.wikiversity.org/wiki/Wireshark/IPv4_multicast您可以使用。

关于c - 将 WireShark 集成到我的应用程序中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49075958/

相关文章:

c++ - 在 Windows 上制作一个带有拉丁字符 (Á ,ò ,ã ) 的简单程序

将 AST 转换为字节码

java - 如何在android中获取连接到同一网络的设备的mac地址?

c++ - 共享内存不在进程之间共享

java - 使用 Java 时隐藏 HTTP 中的发件人信息

ssl - 使用 wireshark 捕获 google plus https 流量?

c - windows:如何停止 irda dongle 定期自动检测

c - 大小数组的分配非常大

c++ - 使用 POCO 查找公共(public) IP

tcp - Wireshark 中的 "raw packet data"字段是什么意思?