Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 VC++ 上发送免费 ARP 请求和接收 ARP 回复包需要什么类型的 RAW 套接字。
int s = socket(AF_PACKET, SOCK_DGRAM, htons(ETH_P_ARP));
Windows的相应代码应该是什么?
我一直在试图弄清楚同样的事情。但似乎你不能在 Windows 中这样做:在 Windows 中你只能构造 Internet 层数据包,但 ARP 在链路层。所以如果你真的必须这样做,我认为你需要使用winPcap。
是的。如果以太网,Windows 不允许您在顶部发送 RAW 流量,但可以发送 RAW 以太网流量。
因此,如果您构建自己的以太网标头,则可以发送 ARP 数据包。