I am capturing packets with Sharp Pcap, I can easily check IP of IPpacket or ARP packet:
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
I wanted to find properties for ICMPPacket, with no luck. How can I check source/destination address of ICMPPacket?