Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!metro!natmlab.dap.csiro.au!megadata!andrew From: andrew@megadata.mega.oz.au (Andrew McRae) Newsgroups: comp.protocols.tcp-ip Subject: Re: sockets vs. streams Summary: User mode file systems? Message-ID: <339@megadata.mega.oz.au> Date: 5 Sep 90 14:03:43 GMT References: <6964@milton.u.washington.edu> <2350@cirrusl.UUCP> <1990Sep5.020521.803@mlb.semi.harris.com> Organization: Megadata P/L, North Ryde, Sydney, Aust. Lines: 56 In article <1990Sep5.020521.803@mlb.semi.harris.com>, del@thrush.mlb.semi.harris.com (Don Lewis) writes: >In article <2350@cirrusl.UUCP> dhesi%cirrusl@oliveb.ATC.olivetti.com (Rahul Dhesi) writes: >>In <6964@milton.u.washington.edu> mrc@Tomobiki-Cho.CAC.Washington.EDU >>(Mark Crispin) writes: >> >>>If I want to connect to port 0.143 on host 128.95.112.69, why can't I >>>do something like >>> open ("/tcp/128.95.112.69-0.143",O_RDWR|O_CREAT,0);... > >Now, if the printer is on a terminal server somewhere, it would >sure would be nice to be able to do the same sort of thing. > cat somefile >/dev/tcp/terminalserver:port Perhaps a more structured approach to this whole problem is to back out of the kernel altogether and use the same paradigm as in some of the Research Unix kernels of a user mode file system (a la the /proc filesystem); using a UMFS would remove the complexity of mapping different file names to network address away from the kernel into user processes which could then use the BSD socket style kernel calls to hide the messy details of network programming. At least then the programs which want to access all those neato network calls can do so, but for those programs that want to open the network connection using a file name the UMFS would then interpret the name accordingly. Then different servers could be implemented to handle different protocols, and services e.g.: fd = open("/dev/net/stream/cpu.xyz/lat", 2); This could map to an entirely different protocol family (e.g. DECNet). or fd = open("/dev/net/tcp/2300/192.34.56.78", 2); Links could be set up to map "/dev/net/printer" to "/dev/net/tcp/termserver/printer"... It should be easy to take skeleton UMFS network servers and build specialised services (such as a nntp-service file etc.). A mach-like kernel with good messaging may fit well here.. Whilst the comment that has been made that what most processes want is a simple full duplex pipe-like stream (and the kind of open that has been talked about will work OK), I find the more common network programming I am involved with is using the datagram facilities (sendto, recvfrom etc) to build distributed services (especially real time stuff); using broadcasts and finding out who sent you a data packet is important as well. I hate to think what I would have to do if all I had was a read or write. Andrew McRae inet: andrew@megadata.mega.oz.au Megadata Pty Ltd, uucp: ..!uunet!megadata.mega.oz.au!andrew North Ryde 2113 Phone: +61 2 805 0899 NSW AUSTRALIA Fax: +61 2 887 4847