Hello All,
I am new to Go, so please bear with me. I was trying to implement an ICMP type 8(echo) request in Go for practice. The ICMP packet has a size of 12 bytes(4 bytes as my data). I retrieve the When I allocate an buffer of say 100 bytes and pass it to ReadFromIp function, I find that I only receive the ICMP echo response packet, with no IP header. But when I allocate exactly 32 bytes for my buffer, I find that the data is an IP header followed by the ICMP response packet.
Is that a bug? I am also unsure about how to decide an appropriatly sized buffer to pass to the ReadFromIp function if the size changes like this.
Please advice,
Srihari.