* [9fans] 9p srv-ing on a port
@ 2004-01-16 23:06 mirtchov
2004-01-17 0:17 ` David Presotto
2004-01-17 0:56 ` Skip Tavakkolian
0 siblings, 2 replies; 4+ messages in thread
From: mirtchov @ 2004-01-16 23:06 UTC (permalink / raw)
To: 9fans
Is it possible (i.e. simple enough) to set up a 9p server that will
work on a port a-la fossil/kfs?
Instead of doing postmountsrv() is it possible to do listen() -
accept() - fork and srv(s) with the network fd? What should s->infd
and s->outfd be set to in this case?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] 9p srv-ing on a port
2004-01-16 23:06 [9fans] 9p srv-ing on a port mirtchov
@ 2004-01-17 0:17 ` David Presotto
2004-01-17 0:40 ` mirtchov
2004-01-17 0:56 ` Skip Tavakkolian
1 sibling, 1 reply; 4+ messages in thread
From: David Presotto @ 2004-01-17 0:17 UTC (permalink / raw)
To: 9fans
[-- Attachment #1: Type: text/plain, Size: 71 bytes --]
Of course, several do, for example 17007.
What is the real question?
[-- Attachment #2: Type: message/rfc822, Size: 1911 bytes --]
From: mirtchov@cpsc.ucalgary.ca
To: 9fans@cse.psu.edu
Subject: [9fans] 9p srv-ing on a port
Date: Fri, 16 Jan 2004 16:06:13 -0700
Message-ID: <a9700a6b8c0098292a15f4f84aee65fa@plan9.ucalgary.ca>
Is it possible (i.e. simple enough) to set up a 9p server that will
work on a port a-la fossil/kfs?
Instead of doing postmountsrv() is it possible to do listen() -
accept() - fork and srv(s) with the network fd? What should s->infd
and s->outfd be set to in this case?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] 9p srv-ing on a port
2004-01-17 0:17 ` David Presotto
@ 2004-01-17 0:40 ` mirtchov
0 siblings, 0 replies; 4+ messages in thread
From: mirtchov @ 2004-01-17 0:40 UTC (permalink / raw)
To: 9fans
> What is the real question?
Skip's answer will probably suffice.
Originally I wanted to have a threaded server listen to a port on
which many clients can connect, similar to what fossil and kfs are
doing on 17008. Clients do:
srv tcp!somesuch!someport blah /mnt/blah
and that's all...
Initially I thought it may be enough to build a Tree structure proper
and run srv() on it by setting (Srv *)s->infd and (Srv)s->outfd to be
the file descriptor obtained by accept(), but that doesn't seem to be
the case.
I admit I haven't dug through other servers' sources too deeply.
Something else I'm interested in doing is having a /srv (or a similar
fs alternative) on which remote machines can post file descriptors to
parts of their namespace. A srvfs that will post on a remote machine
in other words. Just to make sure that the trivial way doesn't work,
I tried:
home% import -c octarine /srv /srv
home% srvfs tmp /tmp
exportfs: can't read initial string:
home% mount /srv/tmp /n/sources
mount: can't open /srv/tmp: device shut down
home%
Anyway, there's no excuse for not digging in deeper, except perhaps
that it's Friday :)
andrey
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [9fans] 9p srv-ing on a port
2004-01-16 23:06 [9fans] 9p srv-ing on a port mirtchov
2004-01-17 0:17 ` David Presotto
@ 2004-01-17 0:56 ` Skip Tavakkolian
1 sibling, 0 replies; 4+ messages in thread
From: Skip Tavakkolian @ 2004-01-17 0:56 UTC (permalink / raw)
To: 9fans
> Is it possible (i.e. simple enough) to set up a 9p server that will
> work on a port a-la fossil/kfs?
>
> Instead of doing postmountsrv() is it possible to do listen() -
> accept() - fork and srv(s) with the network fd? What should s->infd
> and s->outfd be set to in this case?
If I understand correctly, the following will work:
If you have a corresponding /bin/service/tcpXXXX script just launch
your server, then you could have an option for your server where it uses
the stdin (opened for read/write) to do the 9P transactions.
Look at cpu -R for example and see how tcp17010 is launched.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-17 0:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-16 23:06 [9fans] 9p srv-ing on a port mirtchov
2004-01-17 0:17 ` David Presotto
2004-01-17 0:40 ` mirtchov
2004-01-17 0:56 ` Skip Tavakkolian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).