【发布时间】:2014-09-22 15:34:49
【问题描述】:
我正在使用 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
这是屏幕截图的链接:link 我尝试在 pcap 论坛上提问,但没有得到回复。
那我做错了什么?有语法问题吗?
【问题讨论】: