Dear Friends,
Thank you for your reply.
Actually when I was reading the code of the traceroute I saw the following statement.
outip = (struct ip *)malloc((unsigned)packlen);
if (outip == NULL) {
Fprintf(stderr, "%s: malloc: %s\n", prog, strerror(
errno));
exit(1);
}
memset((char *)outip, 0, packlen);
outip is of datatype struct ip *.
packlen is the size of the packet (i.e, 40 bytes).
My doubt is why here they not using the calloc function.
Regards,
Selvi.