Though I'll need to figure out a good cross-platform way to get the
hardware ethernet address from pcap's device handle. I suppose I
could send my own IP address a packet, capture it, and then read the
data out of the header...but that seems roundabout! Better ideas
appreciated...
I'm not too clear about cross platform mechanisms since
this is basically a function of the driver at the data link
layer.
In most UNIX systems, you can use Sysctl to get the
NET_RT_IFLIST and read it from there as described
in Stevens "UNIX Network Programming"
CTL_NET.AF_ROUTE.0.AF_INET.NET_RT_IFLIST.0
This might at least cover other UNIX like systems
(versus the System Configuration Framework
which is Mac OS X only).