From owner-freebsd-net@FreeBSD.ORG Tue Feb 3 01:27:33 2004 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 147DC16A4CE; Tue, 3 Feb 2004 01:27:33 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7A6B043D45; Tue, 3 Feb 2004 01:27:30 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) i139RHpE055169; Tue, 3 Feb 2004 09:27:18 GMT (envelope-from dfr@nlsystems.com) From: Doug Rabson To: Hidetoshi Shimokawa In-Reply-To: <87d68yowr7.wl@tora.nunu.org> References: <1075559223.615.9.camel@localhost> <87d68yowr7.wl@tora.nunu.org> Content-Type: text/plain Message-Id: <1075800437.50848.14.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Tue, 03 Feb 2004 09:27:17 +0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on herring.nlsystems.com cc: freebsd-net@freebsd.org cc: freebsd-firewire@freebsd.org cc: Dario Freni Subject: Re: Will rfc2734 be supported? 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: Tue, 03 Feb 2004 09:27:33 -0000 On Mon, 2004-02-02 at 05:50, Hidetoshi Shimokawa wrote: > At Sat, 31 Jan 2004 15:27:03 +0100, > Dario Freni wrote: > > > > [1 ] > > Hi guys, > > I was wondering if the standard implementation of IPoFW is planning to > > be implemented. I'm not expert on device writing, I was also looking for > > some workarounds, like attach the fwe0:lower netgraph hook to a virtual > > interface, but reading the rfc I realized that the normal IP packet > > needs an encapsulation before it's sent on the wire. > > I have no plan to implement rfc2734 by myself near future. > IEEE1394 is somewhat complicated, compared with Ethernet. > Because there are some types of packets, fwe and IPoFW uses very > different packet type and formats, so you don't have an easy > workaround using netgraph. > > If you are interested in implementing rfc2734, you need several steps. > > - Implement rfc2734 encapsulation as /sys/net/if_ethersubr.c for > ethernt. rfc2734 uses very different packet format from ethernet. > > - Implement generic GASP receive routin in the firewire driver. > You need this service for multicast/broadcast packet such as an arp > packet. > > - Implement if_fw.c for the interface device. > > Though I'm not sure it actually worked, the firewire driver for > FreeBSD-4.0 seems to have a support for IPoFW > See ftp://ftp.uec.ac.jp/pub/firewire/ for the patch. I spent a little time recently thinking about what would be needed for this and came to similar conclusions. The most interesting part is implementing generic GASP receive. I think the nicest way of doing that would be to implement a new network protocol for firewire, allowing userland programs to do something like: struct sockaddr_firewire a; s = socket(PF_FIREWIRE, SOCK_DGRAM, 0); a.sof_address = 0x12345000; ...; bind(s, &a, sizeof a); ...; len = recv(s, buf, sizeof buf, 0); Internally, this probably means arranging for all asynchronous packets to be DMA'd directly into mbufs and would probably change the firewire code a great deal. Still, it might be worth it to gain a familiar socket-based user api.