title: set socket option is why so important for a socket (IP_HDRINCL) In ICMP request?
body: <p>I am new to socket programming</p>
  
  <p>I saw a <strong>ICMP request</strong> program , in that they used <code>setsockopt</code> to a socket </p>
  
  <p><code>int on = 1;</code></p>
  
  <pre><code>setsockopt(s, IPPROTO_IP, IP_HDRINCL, &amp;on, sizeof(on))
  </code></pre>
  
  <p>but even if I do not use this statement, the program runs correctly. Why is it so 
  important to mention to the kernel this socket including the IP structure? </p>