Reputation: 189
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
Upvotes: 1
Views: 2033
Reputation: 6585
In Pcap.Net, there's an extension method for this:
public static MacAddress GetMacAddress(this LivePacketDevice livePacketDevice)
Upvotes: 0
Reputation: 1339
ICaptureDevice.MacAddress
should give you the adapter's mac address, so the MacAddress
property of your live devices.
Upvotes: 1