title: Casting char array to struct pointer
body: <p>I am trying to understand the following casting from <a href="https://github.com/gih900/IPv6--DNS-Frag-Test-Rig/blob/master/dns-server-frag.c#L542" rel="nofollow noreferrer">this code</a></p>
  
  <pre><code>char out_packet_buffer[4500] ;  
  struct ip6_hdr *iphdr ;
  
  iphdr = (struct ip6_hdr *) &amp;out_packet_buffer[0]; 
  </code></pre>
  
  <p>Is my understanding correct that the member variables of the struct iphdr are stored in char array out_packet_buffer? Later in the code, out_packet_buffer is never used. Instead, iphdr is memcpyied to an uint8_t memory location (ether_frame). But iphdr is not uint8_t.</p>
  
  <p>I'd appreciate any guidance for me to understand what is happening here.</p>
  
  <p>Thanks</p>