I need to find the ethernet address associated with a network device, [...] Normally, you use SIOCGIFCONF to do this. You search the returned table for an ifreq with the correct device name and an address type of AF_LINK. There are several programs in our source tree that do this; one that comes to mind is rarpd(8).