lkml.org 
[lkml]   [2005]   [May]   [7]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 6 May 2005 22:00:17 -0700
Fromrajat swarup <>
Subjectsending ICMP messages in kernel module
Hi,
I have placed a netfilter hook in which I grab the packets in the
pre-routing stage.
I need to send ICMP messages in response to certain messages in this hook.
I looked at alloc_skb(), skb_reserve() and skb_put() functions but it
is still not clear to me as to how to construct the packets using
these methods.
Since I am getting the packets in the Pre-routing stage should I
explicitly construct the MAC header, IP header & data & ICMP message?
Also, I'll need to calculate the checksum to be transmitted in the
ICMP packet...which method could I use to do that?

Any help will be really appreciated!

Thanks and regards,
Rajat.
http://rajatswarup.blogspot.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-05-07 07:04    [from the cache]
©2003-2008