如何在pcap.net中获取所选LivePacketDevice的MAC地址?
var allDevices = LivePacketDevice.AllLocalMachine;
LivePacketDevice dev = allDevices[0];
答案 0 :(得分:3)
使用LivePacketDeviceExtensions
静态方法:
public static MacAddress GetMacAddress(this LivePacketDevice livePacketDevice)
它在PcapDotNet.Core.Extensions
名称空间中的PcapDotNet.Core.Extensions
程序集中定义。