public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Robert Pfister" <robertp@ustri.com>
To: <prade@cs.sunysb.edu>, <linux-kernel@vger.kernel.org>
Subject: RE: Trapping all Incoming Network Packets
Date: Mon, 18 Mar 2002 11:27:31 -0700	[thread overview]
Message-ID: <003501c1ceaa$91678f90$1e00a8c0@nomaam> (raw)
In-Reply-To: <Pine.GSO.4.33.0203171840250.5841-100000@compserv3>

There are ways to accomplish similar things in user space. Is there some
reason that you need to do this in the kernel? What is your end-goal with
this?

Robb

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of
prade@cs.sunysb.edu
Sent: Sunday, March 17, 2002 4:57 PM
To: linux-kernel@vger.kernel.org
Cc: prade@cs.sunysb.edu
Subject: Trapping all Incoming Network Packets


Hi,

I am trying to write a module that will redirect all the packets to my
recv routine, instead of going to the recv routines of the specific
protocols. For example, a packet with the protocol field ETH_P_IP should
come to "my_recv" before going to ip_rcv.

My restriction is I cannot add my own header. In other words, I cannot
register my own protocol handler and attach a header to each packet to
redirect it to "my_recv".

The option I figured out seems to be changing the function pointers, eg.
net_rx_action by my own net_rx_action at init_module time and restoring it
at cleanup. But since 2.4 kernel does not export any function to deal with
the data structures holding the function pointers, I am in a fix.

I look forward to some interesting suggestions about how to get around the
problem for 2.4 kernels.

Thanks,
-- pradipta.

NB. Plz say "yes" to the cc-option. Thx. :-)

-
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/


  parent reply	other threads:[~2002-03-18 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-17 23:57 Trapping all Incoming Network Packets prade
2002-03-18  2:09 ` Bernd Eckenfels
2002-03-18 18:27 ` Robert Pfister [this message]
2002-03-18 18:40   ` prade
2002-03-18 19:15     ` Robert Pfister
2002-03-18 19:17     ` Chris Friesen
  -- strict thread matches above, loose matches on Subject: below --
2002-03-18 19:41 Hari Gadi
2002-03-18 21:49 ` prade

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='003501c1ceaa$91678f90$1e00a8c0@nomaam' \
    --to=robertp@ustri.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=prade@cs.sunysb.edu \
    /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