title: Conversion of Ethernet address to readable form?
body: <pre><code>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 &lt;6; i++)
    printf("dest ether:%x",ethernet-&gt;ether_dhost);
  </code></pre>
  
  <p>How to print the Ethernet address in proper readable form with spaces after each byte? The o/p I get is in hex. Here Ethernet is the pointer to the structure <code>ethernet_header</code>.</p>