1

I'm using the PacketDevice or LivePacketDevce in order to send and receive packets. I have 2 network interfaces that I have to use and I can't find an attribute of Packet Device that has it's MAC or IP address. It's a problem using the destination of incoming packets as I am relying on arp broadcasts. Is there any way to get the IP or MAC addresss of a packet device in pcap.net or using SharpPacap? thanks

Foxman
  • 189
  • 13

2 Answers2

1

ICaptureDevice.MacAddress should give you the adapter's mac address, so the MacAddress property of your live devices.

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

In Pcap.Net, there's an extension method for this:

public static MacAddress GetMacAddress(this LivePacketDevice livePacketDevice)
brickner
  • 6,595
  • 3
  • 41
  • 54