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
ICaptureDevice.MacAddress
应该为您提供适配器的mac地址,因此您的活动设备的MacAddress
属性为。
在Pcap.Net中 ,有一个扩展方法:
public static MacAddress GetMacAddress(this LivePacketDevice livePacketDevice)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.