Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Nov 1999 16:17:30 -0800 (PST)
From:      Julian Elischer <julian@whistle.com>
To:        Vern Nichols <nichols@roundview.com>
Cc:        freebsd-net@FreeBSD.ORG
Subject:   Re: netgraph'd enet nics anyone?
Message-ID:  <Pine.BSF.4.10.9911251616360.544-100000@current1.whistle.com>
In-Reply-To: <Pine.BSF.4.20.9911231126300.3171-100000@home.elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
did you get this?

does it answer your toughts, or did I mis-understand what you wanted?


On Tue, 23 Nov 1999, Julian Elischer wrote:

> > I'm currently playing around with and learning what I can about netgraph
> > to see if I want to use it in a new project.  I thought I'd play around by
> > trying to use it on the ethernet card (rl0).  
> 
> There is already the following:
> 
> if_ethersubr.c when compiled with options NETGRAPH
> already generates a netgraph node for every etherenet NIC.
> You can decide if you want to pre-empt ALL packets, or just get those
> that are unrecognised by present protocols.
> If you have rl0 and compile if_ethersubr.c with options NETGRAPH you
> already have a node called rl0:
> 
> 
> There is an 'Iface' type that generated a system interface that shows up
> in ifconfig. This feeds data in to the bottom of ip abd effectively gives
> us a netgraph attachment to the botom of IP, without us needing to touch
> IP. 
> 
> There is a 'ksocket' type
> that pretends to be a socket. This allows us to catch packets at the top
> of udp or tcp that are destined to certain addresses.  
> Once again, this is the equivalent of having a netgraph attachment at the
> top of tcp/udp, except without having to actually touch tcp or udp.
> 
> 
> 
> 
> 
> On Tue, 23 Nov 1999, Vern Nichols wrote:
> 
> > 
> > 
> > I'm wondering if anyone has done that and if I'd also have to make a TCP
> > netgraph node to make it work the way I'd expect.  I think I'd be looking
> > at something like:
> > 
> > SocketNode->TCPNode(does not seem to exist)->IFaceNode(IP)->NICNode(enet)
> > 
> > Or am I off base on how netgraph can/should be used?  I see some
> > ngether_*() routines in if_ethersubr.c so I assume someone is already
> > looking into a netgraph enet node.
> > 
> > I'm currenlty working on 3.2 with the netgraph 3.0 patches applied.  I
> > see netgraph appears to be integrated into 4.0.  Is it worth moving up
> > to 4.0 before I start getting too deep in netgraph?
> 
> It's already applied to 3.3-STABLEB as well.
> 
> basically you can already do all that you say. though our aim is not to 
> replace the present 'fast path from socket to NIC' but to allow 
> people to make diversions if needed.
> e.g.
> 
> [tcp socket]        [netgraph socket]
>    |                      |
>    |                      |
>    |                [arbitrary processig node]
>    |                      |
>    |                      |
>    |                      |
>    |                [ksocket node]
>    |                      |
>    |                      |
>    |         /------------+
>    |        /  
> [--tcp/udp/ip--]
>    |        \
>    |         \
>    |          \
>    |           \
>    |            \
>    |             \
>    |             |
>    |             |
>    |         [iface node]
>    |             |
>    |             |
>    |         [arbitrary processing nodes]
>    |             |
>    |            /
>    |           /
>    |          /
>    |         /
>    |        /
>    |norm   /netgraph
> [NIC (with netgraph option]
> 
> 
> 
> 
> > 
> > Thanks for any insite.
> > 
> > Vern A. Nichols			Roundview, Inc.
> > nichols@roundview.com		10700 Old Co Rd. 15, Suite 303
> > 612.591.7777 ext. 14		Plymouth, MN  55441
> > 
> julian
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-net" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9911251616360.544-100000>