From owner-freebsd-hackers Mon Feb 14 13:51:35 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by builder.freebsd.org (Postfix) with SMTP id 8D0684BB1; Mon, 14 Feb 2000 13:50:41 -0800 (PST) Date: Mon, 14 Feb 2000 21:50:59 +0000 From: David Malone To: Archie Cobbs Cc: myevmenkin@att.com, freebsd-hackers@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Subject: Re: raw socket, bpf, netgraph, etc Message-ID: <20000214215059.A34982@salmon.maths.tcd.ie> References: <200002141833.KAA05390@bubba.whistle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200002141833.KAA05390@bubba.whistle.com>; from archie@whistle.com on Mon, Feb 14, 2000 at 10:33:47AM -0800 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Feb 14, 2000 at 10:33:47AM -0800, Archie Cobbs wrote: > Yevmenkin, Maksim N, CSCIO writes: > > i was thinking about netgraph. would't it be nice to have netgraph interface > > in each network driver? > > You already do. See ng_ether(8). > > Compile your kernel with options NETGRAPH and then each Ethernet > interface is a netgraph node. Take control of it by connecting > to the "divert" hook. I was trying to figure out if it is possible to route stuff out on a particular interface based on source address using netgraph. At the moment we have an NFS server which pretends to be two machines on the same subnet. To get this to work we're using a small hack in the ipfw divert code. I looked at the netgraph man pages and reckoned it might be possible to do somthing like: fxp0 / ng0 -> bpf \ fxp1 then ifconfig ng0 up with both IP addresses and use the bpf to determine which ethernet card to transmit it on. However, I don't think this will work. First 'cos arp stuff will probably be broken and second because ng0 is a point to point device and won't correctly encapsulate packets for ethernet. Am I correct in thinking that this isn't currently possible with the net graph nodes currently available? David. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message