0

I've been following the guide over at http://www.codeproject.com/KB/IP/sharppcap.aspx for implementing a simple packet sniffer.

I am getting an error while converting 'PacketDotNet.EthernetPacket' to 'SharpPcap.RawCapture'. Following is the piece of code that does the conversion part.

SharpPcap.RawCapture nextPacket = (SharpPcap.RawCapture)(lvMessages.Items[packetIndex].Tag);

I am not getting any compilation errors with this code. How should i convert this successfully ? Thanks in advance.

Calum
  • 1,889
  • 2
  • 18
  • 36
  • What are you storing in lvMessages.Items[]? I'm not sure what this structure is or what type you are putting in there. You might provide a link to your code on pastebin to provide more context. Also, the SharpPcap and Packet.Net source packages have a whole set of example applications that might help. – Chris Morgan Apr 03 '14 at 12:10

1 Answers1

0

What are you storing in lvMessages.Items[]? I'm not sure what this structure is or what type you are putting in there. You might provide a link to your code on pastebin to provide more context. Also, the SharpPcap and Packet.Net source packages have a whole set of example applications that might help.

Chris Morgan
  • 1,277
  • 1
  • 13
  • 33