From: rajat swarup <rajats@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: sending ICMP messages in kernel module
Date: Fri, 6 May 2005 22:00:17 -0700 [thread overview]
Message-ID: <7d04ec5605050622006f3ad56c@mail.gmail.com> (raw)
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/
next reply other threads:[~2005-05-07 5:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-07 5:00 rajat swarup [this message]
2005-05-07 22:17 ` sending ICMP messages in kernel module J. Scott Kasten
2005-05-07 23:39 ` rajat swarup
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7d04ec5605050622006f3ad56c@mail.gmail.com \
--to=rajats@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.