Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Feb 2004 09:27:17 +0000
From:      Doug Rabson <dfr@nlsystems.com>
To:        Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
Cc:        Dario Freni <saturnero@gufi.org>
Subject:   Re: Will rfc2734 be supported?
Message-ID:  <1075800437.50848.14.camel@herring.nlsystems.com>
In-Reply-To: <87d68yowr7.wl@tora.nunu.org>
References:  <1075559223.615.9.camel@localhost> <87d68yowr7.wl@tora.nunu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 2004-02-02 at 05:50, Hidetoshi Shimokawa wrote:
> At Sat, 31 Jan 2004 15:27:03 +0100,
> Dario Freni wrote:
> > 
> > [1  <text/plain (quoted-printable)>]
> > 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.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1075800437.50848.14.camel>