我正在使用 Sharp Pcap 捕获数据包,我可以轻松检查 IPpacket 或 ARP 数据包的 IP:
Dim ip1 As IpPacket = IpPacket.GetEncapsulated(pack)
Dim arp As ARPPacket = ARPPacket.GetEncapsulated(pack)
If (Not ip1 Is Nothing) Then
log1.WriteLine("Received IP packet from {0}", ip1.SourceAddress.ToString)
End If
If (Not arp Is Nothing) Then
log1.WriteLine("Received ARP packet from {0}", arp.SenderProtocolAddress.ToString)
End If
我想找到 ICMPPacket 的属性,但没有运气。如何检查 ICMPPacket 的源/目标地址?