From: Pedro Fortuna <pedro.fortuna@gmail.com>
To: netdev@oss.sgi.com
Subject: Re: filtering packtes before OS takes care about them
Date: Tue, 1 Mar 2005 16:33:49 +0000 [thread overview]
Message-ID: <db95d40c050301083351fff729@mail.gmail.com> (raw)
In-Reply-To: <7bca1cb50502281935557b45cc@mail.gmail.com>
This subject is rather new to me. Is there some literature about linux
kernel networking API that you would recommend?
thanks,
-Pedro Fortuna
On Mon, 28 Feb 2005 21:35:09 -0600, Asim Shankar <asimshankar@gmail.com> wrote:
> > In my case, I'll need to intercept all outgoing IP packets and change
> > them (including L2 frame) before they are passed to the network
> > interface driver.
> > The reverse operation is applied to incoming IP Packets in the destination host.
> > I didnt investigate the packet_type example you provided but I hope I
> > will be able to used for the purposes I explained.
>
> If the type field of the struct packet_type you register ==
> htons(ETH_P_ALL), then your packet handling function will be added to
> the head of the ptype_all list.
>
> As a result, it will see all incoming and outgoing packets - incoming
> will be delivered to your function from netif_receive_skb() before the
> IP/other packet handlers get to see it and outgoing packets will be
> delivered from dev_queue_xmit() (which calls dev_queue_xmit_nit())
> just before the packet is queued for sending by the NIC. This may work
> for you.
>
> I'm assuming all outgoing packets go through dev_queue_xmit(), though
> that may not always be the case (someone more knowledgeable would have
> to explain this).
>
> Regards,
>
> -- Asim
>
next prev parent reply other threads:[~2005-03-01 16:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-28 16:16 filtering packtes before OS takes care about them Weber Matthias
2005-02-28 17:38 ` bert hubert
2005-02-28 20:09 ` Asim Shankar
2005-03-01 0:30 ` Pedro Fortuna
2005-03-01 1:53 ` jamal
2005-03-01 3:35 ` Asim Shankar
2005-03-01 16:33 ` Pedro Fortuna [this message]
2005-03-05 14:08 ` Pedro Fortuna
2005-03-05 18:58 ` Asim Shankar
2005-03-05 19:36 ` Pedro Fortuna
[not found] ` <7bca1cb50503051729e3273d3@mail.gmail.com>
2005-03-06 2:04 ` Pedro Fortuna
2005-03-07 2:46 ` Pedro Fortuna
2005-03-01 17:20 ` Stephen Hemminger
-- strict thread matches above, loose matches on Subject: below --
2005-02-28 18:59 AW: " Weber Matthias
2005-03-01 0:26 ` Thomas Graf
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=db95d40c050301083351fff729@mail.gmail.com \
--to=pedro.fortuna@gmail.com \
--cc=netdev@oss.sgi.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).