我正在使用 pcap.net 进程广播一个数据包,并监听响应。我希望它接受的响应数据包具有一定的长度。但是,每当我添加过滤器时,它只返回长度为 100 的数据包。这是代码:
' Open the output device
Dim Communicator As PacketCommunicator = selectedOutputDevice.Open(100, PacketDeviceOpenAttributes.Promiscuous, 300)
Communicator.SetFilter("len >= 300")
' send broadcast packet
Communicator.SendPacket(BuildEthernetPacket(ReqInfoPkt, "ff:ff:ff:ff:ff:ff"))
' receive packets
While result = PacketCommunicatorReceiveResult.Ok And packetlist.Count < 500 And _
Not result = PacketCommunicatorReceiveResult.Timeout
result = Communicator.ReceivePacket(packet)
packetlist.Add(packet)
End While
这是屏幕截图的链接:我尝试在 pcap 论坛上询问但没有得到回复。
那么我做错了什么?有语法问题吗?