SharpPcap发包失败!!!!发UDP数据包
SharpPcap发包失败!!!!发UDP数据包。。看看什么原因????
byte[] bytes = new byte[60];
UDPPacket p = new UDPPacket(lLen, bytes);//
p.SourceHwAddress = strSouMac;
p.DestinationHwAddress = strGateWayMac;
p.SourceAddress = "201.23.12.88";
p.SourcePort = 12345;
p.DestinationAddress = "192.168.100.106";
p.DestinationPort = 9000;
p.ComputeUDPChecksum(true);
int k=0;
while(k<10000)
{
device2.PcapOpen(true, 200);
device2.PcapSendPacket(p); k++;
device2.PcapClose();
}