All of lore.kernel.org
 help / color / mirror / Atom feed
* sending ICMP messages in kernel module
@ 2005-05-07  5:00 rajat swarup
  2005-05-07 22:17 ` J. Scott Kasten
  0 siblings, 1 reply; 3+ messages in thread
From: rajat swarup @ 2005-05-07  5:00 UTC (permalink / raw)
  To: linux-kernel

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-07 23:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-07  5:00 sending ICMP messages in kernel module rajat swarup
2005-05-07 22:17 ` J. Scott Kasten
2005-05-07 23:39   ` rajat swarup

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.