I'm not sure what your trying to do. You want to add your custom icmp between two machines? Make icmp2 , the next general protocol in fact
General tip:
I use cscope for browsing the kernel, you should install it, its very small and pretty effective
then in /usr/src/linux (kernel source tree or whereever it is):
cscope -R, it will make a crossreference of the kernel
then you can make a search ("find this text string")
for example:
ICMP_ECHO
This is the simplest ICMP (its payload is exactly what was received)
You should have a line
Quote:
7 icmp.c 768 * Handle ICMP_ECHO ("ping") requests.
|
You should also have a look at ICMP_ECHO_REPLY for the response.
Go on this line, hit enter, and look how it is done. Exit csope with CtrlD
Make your own, rebuild your kernel (you can't have tcp/ip as a module). Try
Hope its what you want to do.