On Tue, Mar 3, 2009 at 8:49 PM, Michael Richardson <m...@sandelman.ottawa.on.ca> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > >>>>>> "Chris" == Chris Morgan <chmor...@gmail.com> writes: > Chris> I'm working on a pcap/winpcap c# library, SharpPcap. I was > Chris> wondering what the best way to get a devices mac address was, > Chris> preferrably in a manner that would work in both pcap and with > Chris> winpcap. So far I've seen code that captures packets on the > > Which device? > Are you looking for your MAC address, or a remote one? >
I would be looking for the local adapter mac addresses. Under linux with pcap and the adapters I have, ethernet and wireless, I see hardware mac addresses in pcap_if_t.addresses. I wasn't sure if there were any known cases where pcap_if_t.addresses wouldn't have the hardware mac address, like with winpcap, particular devices etc. Users have reported difficulty getting the adapter mac addresses so it seemed useful to ask the experts. > Why does it matter if this is a library for C#... > Oh, I was just giving some background. Chris - This is the tcpdump-workers list. Visit https://cod.sandelman.ca/ to unsubscribe.