From owner-freebsd-net@FreeBSD.ORG Wed Nov 26 04:24:23 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 155FD16A4CE for ; Wed, 26 Nov 2003 04:24:23 -0800 (PST) Received: from hermes.ccf.auth.gr (hermes.ccf.auth.gr [155.207.1.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 24FC143FBF for ; Wed, 26 Nov 2003 04:24:21 -0800 (PST) (envelope-from gedimitr@auth.gr) Received: from a93 (a93.ee.auth.gr [155.207.19.93]) by hermes.ccf.auth.gr (8.12.10/8.12.10) with SMTP id hAQCOBIb025635; Wed, 26 Nov 2003 14:24:13 +0200 (EET) Message-ID: <00d101c3b418$32bbf760$5d13cf9b@ee.auth.gr> From: "Gerasimos Dimitriadis" To: "Juan Rodriguez Hervella" References: <200311261253.26282.jrh@it.uc3m.es> Date: Wed, 26 Nov 2003 14:24:09 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by helios.ccf.auth.gr. Virus data file v4305 created Nov 19 2003 cc: freebsd-net@freebsd.org Subject: Re: Question about Netgraph (I'm in a mess :) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Nov 2003 12:24:23 -0000 Hi, I believe that the best approach would be to divert all the traffic from/to the interface you are interested. Connect the 'upper' and 'lower' hooks of the corresponding ng_ether node to a node that implements the functionality you want. By checking the 'type' value in the ethernet header you can find when you are dealing with IP packets, while letting all the others simply pass through. Gerasimos ----- Original Message ----- From: "Juan Rodriguez Hervella" To: Sent: Wednesday, November 26, 2003 1:53 PM Subject: Question about Netgraph (I'm in a mess :) > Hello, > > I'd like to make some modifications to the IPv6 hearder of some packets > before sending them out the interface. I'm thinking where's the best > way of doing this. So, I've found out the Netgraph tool (I didn't know it > before :) but now I'm wondering how to use it properly. > > As far as I understand, I could have a "ng_iface" node which would > have a "ipv6" hook to my new node, which would change the IPv6 > packet.... I would grab the packets installing a new route towards the > "ng_iface" node, right ? Then, if I want to insert the modified packet > to send it out the interface, I should connect my new node to the > "ng_ether" node ? or again sending out the packet through the same > "ng_iface" node ? > > I'm a bit mix up with all this stuff, any help will be very appreciated. > > -- > ****** > JFRH > ****** > > With every passing hour our solar system comes forty-three thousand > miles closer to globular cluster M13 in the constellation Hercules, and > still there are some misfits who continue to insist that there is no > such thing as progress. > -- Ransom K. Ferm > > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"