All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart De Schuymer <bdschuym@pandora.be>
To: Luke Gorrie <luke@member.fsf.org>, bridge@osdl.org
Subject: Re: [Bridge] Bridge and PACKET-socket
Date: Tue, 6 Jan 2004 00:13:38 +0100	[thread overview]
Message-ID: <200401060013.38748.bdschuym@pandora.be> (raw)
In-Reply-To: <lhznd2do0m.fsf@dodo.bluetail.com>

On Monday 05 January 2004 23:33, Luke Gorrie wrote:
> My interpretation is that ETH_P_ALL handlers are expected to be
> programs like tcpdump which can safely be fed all packets, whereas
> more specific handlers are expected to be actual protocol
> implementations that shouldn't run directly on enslaved ports.
>
> Is that correct?

Well, with the ebtables BROUTING chain it is possible to have an enslaved port 
as input device for the protocol handlers. In the case of IP, to make any 
sense, this enslaved port should then have its own IP address.

> In my case I am implementing a specific protocol in userspace (via
> PACKET-socket) and this protocol must run directly on enslaved
> ports. It's an old layer-2 neighbour-discovery protocol that has to
> operate on physical ports, below other abstractions like
> bridges. ("don't ask.") It looks like I can't do this today, unless I
> use ETH_P_ALL, perhaps with a BPF filter -- but I'm fearful of
> introducing overhead on all packets.

Well, if you're sending all IP packets to userspace I doubt that's faster than 
an ebtables kernel module...

> I was thinking of adding an extra hashtable in dev.c, like ptype_base
> but processed before offering packets to the bridge. Then an ioctl to
> have a PACKET-socket moved into this table if it's supposed to receive
> packets on enslaved interfaces.
>
> Does that sound like a good solution?

I don't know the details, but can't you hook some kernel function onto 
ETH_P_ALL that only sends IP packets to userspace?

cheers,
Bart


  reply	other threads:[~2004-01-05 23:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-05 22:33 [Bridge] Bridge and PACKET-socket Luke Gorrie
2004-01-05 23:13 ` Bart De Schuymer [this message]
2004-01-05 23:50   ` Luke Gorrie
2004-01-08 16:34     ` Jason Lunz
2004-01-12 21:02       ` Luke Gorrie
2004-01-12 21:47         ` Bart De Schuymer
2004-01-12 22:14           ` Luke Gorrie
2004-01-13 19:35             ` Bart De Schuymer
2004-01-12 22:24         ` [Bridge] " Jason Lunz
2004-02-02 16:50 [Bridge] " Eble, Dan

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=200401060013.38748.bdschuym@pandora.be \
    --to=bdschuym@pandora.be \
    --cc=bridge@osdl.org \
    --cc=luke@member.fsf.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.