I am new to socket programming
I saw a ICMP request program , in that they used setsockopt
to a socket
int on = 1;
setsockopt(s, IPPROTO_IP, IP_HDRINCL, &on, sizeof(on))
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?