title: Getting pointer's initialization of defined structs as global variables
body: <p>I wanna reserve memory for different  header struct pointers in order to fill it, as follow:</p>
  
  <pre><code>struct  icmp      *_icmp_hdr = (struct icmp *) Smalloc(hs_icmp, 0);   
  struct  icmp6_hdr *_icmp6 = (struct icmp6_hdr *) Smalloc(hs_icmp6, 0);
  struct  ip        *_ip_hdr = (struct ip *) Smalloc(hs_ip, 0);
  struct  ip6_hdr   *_ip6_hdr = (struct ip6_hdr *) Smalloc(hs_ip6, 0);
  union   data_err  *_payload = (union data_err *) Smalloc(s_payload, 0);
  </code></pre>
  
  <p>The problem comes when the size of header structs as: <code>struct icmp, icmp6_hdr, ip...</code> </p>
  
  <ol>
  <li>I've defined as it's shown, this size for every structure (eg. <code>hs_icmp, hs_icmp6, hs_ip, ...</code>) using <code>sizeof()</code> operator (eg.<code>#define hs_icmp sizeof(struct icmp)</code>).</li>
  </ol>
  
  <p>When i compile i get an error for every header struct pointer and i don't know how to solve it, eg:</p>
  
  <pre><code>error: initializer element is not constant
  struct icmp    *_icmp_hdr = (struct icmp *) Smalloc(hs_icmp, 0);
                                      ^
  </code></pre>