Hi, On Wed, Aug 06, 2008 at 02:02:52AM +0100, Samuel Thibault wrote: > Zheng Da, le Sat 02 Aug 2008 22:57:48 +0800, a écrit :
> > I'm going to write a translator that helps other programs open the > > underlying device. > > Mmm, there are already two: storeio (for disks) and streamio (for > character-based devices). Indeed. > > So other programs can open the device through a filesystem location. > > The program can open the eth0 interface by openning the /dev/eth0, > > for example. > > Then I guess we could have a netio? (for packet-based devices) There are indeed some parallels, and for a moment I was thinking along these lines too... But I soon realized that it is in fact quite a different thing. The purpose of streamio and storeio is wrapping the Mach devices in something that understands the standard IO protocol. (storeio additionally provides a way to obtain information about the store, which allows libstore-using clients to access the underlying device directly...) For network devices, standard IO just doesn't make sense however. (Which is why traditional UNIX systems don't have device files for network interfaces.) All we want here is a way to look up a Mach device by a filesystem node. Note that this doesn't carry any network-specific semantics: it can be done with any kind of device -- though I have no idea whether other use cases will actually come up... Of course, that doesn't mean that we are not interested in a store-like infrastructure for network devices at all. Certainly we do want that at some point -- as part of a modular, hurdish network stack... But that's another project :-) -antrik-