netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: hadi@cyberus.ca
Cc: "'netdev@oss.sgi.com'" <netdev@oss.sgi.com>
Subject: Re: Interconnect virtual device?
Date: Wed, 02 Mar 2005 14:34:18 -0800	[thread overview]
Message-ID: <42263F6A.3020405@candelatech.com> (raw)
In-Reply-To: <1109800554.1091.213.camel@jzny.localdomain>

jamal wrote:

> There are two ways to do this:
> 
> a) You could redirect to a packet socket - a small extension needed to
> the redirect action (mostly mechanical details involved like keeping
> state of which sockets are open etc).

I'd rather not take this approach, as I'd like to have this
functionality available in a kernel module as well as user-space.  Netdevices
are easy to work with in both user-space and kernel-space.

> b) My preference is to push this gentleman's PF_RING
> (http://www.ntop.org/ntop.html) netdevice into the kernel. He has
> replicated unfortunately a lot of the stuff already done by MMAPED
> packet socket - but i think we can forgive him since solution a) would
> require hacking packet socket.
> 
> Reinjection of packets still needs working for that device - just as
> much as a few cleanups here and there. The problem is the guy is not
> very responsive - I have a lot of notes on his stuff if you are willing
> to chase him around.
> You can then get redirection to this device for free (for either
> incoming or outgoing packets); something like:
> 
> tc filter add dev eth0 .... \
> match ip src 10.0.0.1/32 \
> action mirred egress redirect dev ring0
> 
> Assuming you have a program running on user space you should receive all
> packets incoming and/or outgoing on eth0.
> 
> And no, you dont need the eth device to have a ip address attached.

Just mirror-ing will not meet my goal.  I may also wish to drop packets
entirely, before they ever reach any of the protocol stacks.

That said, a brief glance at the ntop page leads me to believe that
his packet socket might be interesting for other reasons.  But, I have
enough fun trying to push my own stuff into the kernel... probably
won't bother trying to push his stuff in too :)

Ben


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com

  reply	other threads:[~2005-03-02 22:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-28  5:15 Interconnect virtual device? Ben Greear
2005-02-28 12:06 ` jamal
2005-02-28 17:24   ` Ben Greear
2005-03-02 21:55     ` jamal
2005-03-02 22:34       ` Ben Greear [this message]
2005-03-03  0:27         ` jamal
2005-03-02 22:55       ` Thomas Graf
2005-03-03  0:35         ` jamal
2005-03-14 22:53           ` Max Krasnyansky

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=42263F6A.3020405@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=hadi@cyberus.ca \
    --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).