Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Feb 2001 07:01:15 +0100
From:      Bernd Luevelsmeyer <bdluevel@heitec.net>
To:        Mike Meyer <mwm@mired.org>
Cc:        questions@freebsd.org
Subject:   Re: shell command to make tcp connection?
Message-ID:  <3A9359AB.617A067F@heitec.net>
References:  <14995.15404.696263.57091@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Mike Meyer wrote:
> 
> Bernd Luevelsmeyer <bdluevel@heitec.net> types:
> > Ronald Klop wrote:
> > > I'm looking for a programm to use in a shell script to make a tcp
> > > connection. On another unix machine I ones used a programm called
> > > mconnect, but I can't find it on the freebsd base system nor in the
> > > ports collection. Is there something similar? If yes, what is the
> > > name of the programm?
> > Either use 'netcat' (port net/netcat), or use the portal filesystem
> > ("options PORTAL" in the kernel script. I like the portal FS very much,
> > it's such an elegant solution to have the network in the file system
> > tree.
> 
> While I agree completely about having the network in the file system
> name space, my copy of LINT says:
> 
> # NB: The NULL, PORTAL, UMAP and UNION filesystems are known to be
> # buggy, and WILL panic your system if you attempt to do anything with
> # them.  They are included here as an incentive for some enterprising
> # soul to sit down and fix them.


I simply tried it, and it appears to work fine. I read the comment only
after portalfs was compiled in and the first programs were running on
it. Perhaps I wouldn't have tried otherwise :-)
Note this only applies to portalfs; I did not try the others. Anyway, I
can testify that "WILL panic your system" seems greatly exaggerated for
portalfs. I'm running it (on 4.2-Stable) for months now, and didn't have
a single crash. I'm not putting heavy loads on the portalfs though,
simply because of a lack of applications that make use of it. Mostly I'm
running some home-made shell scripts on it, grepping through
/p/tcp/server/http and the like. It took me a while to figure out how to
use it on the command line in pipes. The trick is to write the commands
into stdin and then redirect only stdin to the portalfs, so you've still
got stdout to pipe into the next command. This works in bash:
  ( echo "GET / HTTP/1.0" >&0 ; echo "" >&0 ; cat ) \
   <> /p/tcp/server.over.there/http | grep -i something

I want the unionfs, too. Because I don't trust it I'm using "mount -o
union", and that seems to work fine too. It's not all the features of
unionfs but for me it's good enough. I've got a big FTP area consisting
of 5 disks now, one is /ftproot and the others are mounted together on
/ftproot/pub . (ccd and vinum are not an option in this case because the
disks must be accessible individually too.)

So we've got unionfs "simulated" and portalfs "nativly". If we could now
do without nullfs and umapfs, the problem seems to be solved? Hehe :-)


> Have you by chance fixed the portal file system?

I'm afraid I'm not proficient enough in file systems to even understand
the sources. ioctls and all that makes me shudder. I'm going to look at
them anyway just for fun, but don't expect fixes ;-)


Have fun,
	Bernd

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A9359AB.617A067F>