1

How can I get MAC address of a selected LivePacketDevice in pcap.net?

var allDevices = LivePacketDevice.AllLocalMachine;
LivePacketDevice dev = allDevices[0];
StarWind
  • 15
  • 6

1 Answers1

4

Use the LivePacketDeviceExtensions static method:

public static MacAddress GetMacAddress(this LivePacketDevice livePacketDevice)

It is defined in PcapDotNet.Core.Extensions Assembly in the PcapDotNet.Core.Extensions namespace.

brickner
  • 6,595
  • 3
  • 41
  • 54