struct ethernet_header { u_char ether_dhost[ ETHER_ADDR_LEN]; u_char ether_shost[ETHER_ADDR_LEN]; u_short ether_type; }; for(i = 0;i <6; i++) printf(
I think the best way would be to use ether_ntoa() which is available on just about any *nix operating system (available in net/ethernet.h). The following works quite well for me.
char *addr; struct ether_addr host; memcpy(&host, ethernet->ether_dhost, sizeof(host)); addr = ether_ntoa(&host);