|
|
Up |
|
|
  |
Author: Enrico WeigeltEnrico Weigelt Date: May 26, 2008 05:42
Hi folks,
I'd like to have some of my fileservers from p9p accessible
via TCP, but they normally only start on a unix socket.
How can I get them running on TCP ?
thx
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service - http://www.metux.de/
|
| |
|
| | 9 Comments |
|
  |
Author: Russ CoxRuss Cox Date: May 27, 2008 07:49
> I'd like to have some of my fileservers from p9p accessible
> via TCP, but they normally only start on a unix socket.
> How can I get them running on TCP ?
There's no explicit support for this.
If you were to add a -c option to 9pserve
to make it connect to a network address instead of
using stdin/stdout, then you could use 9pserve
to redirect the Unix postings onto TCP.
|
| Show full article (0.67Kb) |
|
| | no comments |
|
  |
|
|
  |
Author: Enrico WeigeltEnrico Weigelt Date: Jun 1, 2008 06:31
* Russ Cox swtch.com> wrote:
>> seems like dial() doesn't accept socket path names.
>> I'll have a look if I can fix this ...
>
> sorry, that should be
>
> 9pserve -c unix!`namespace`/acme tcp!*!12345
yep, already found it out.
Seems to work fine.
BTW: I've now mounted an vacfs from Midnight Command :)
But when trying to overwrite, it causes mc to hang. Could it be
that vacfs drops certain messages instead of returning an
appropriate error ?
> i had considered not requiring the unix! once,
> but i decided against it.
That would be fine, why did you decied against ?
|
| Show full article (1.07Kb) |
| 5 Comments |
|
  |
Author: Russ CoxRuss Cox Date: Jun 1, 2008 06:31
> seems like dial() doesn't accept socket path names.
> I'll have a look if I can fix this ...
sorry, that should be
9pserve -c unix!`namespace`/acme tcp!*!12345
i had considered not requiring the unix! once,
but i decided against it.
russ
|
| |
| no comments |
|
  |
Author: Russ CoxRuss Cox Date: Jun 1, 2008 07:30
> BTW: I've now mounted an vacfs from Midnight Command :)
> But when trying to overwrite, it causes mc to hang. Could it be
> that vacfs drops certain messages instead of returning an
> appropriate error ?
you can run
verbose9pserve=2 vacfs ...
and you will get a lot of debugging messages on standard error.
among other things, you'll get a trace of all the 9p traffic,
and you can check whether this is true. i doubt very much
that vacfs is dropping messages, since it is a single-threaded
server with a simple
for(;;){
read request
response = handle(request);
write response
}
loop.
|
| Show full article (1.07Kb) |
| 3 Comments |
|
  |
Author: erik quanstromerik quanstrom Date: Jun 1, 2008 08:53
the fact that dial strings live in their own parallel
universe has always seemed un-plan 9-ish to me.
> network addresses and files are different kinds of names.
> mixing them would introduce ambiguities, like what
> if i have a file name 'tcp! bell-labs.com!http'.
we don't have this problem with devices, due to convention.
if we didn't have an implicit /net, i don't think your example
would lead to any confusion.
/net/tcp! bell-labs.com!http
is pretty clearly not a normal file.
on the other hand, making dial strings special, cuts the
namespace out of how network names are constructed.
you can't create a special case in networking with bind(1).
> also there was no obvious error response if you
> dial "a!b!c!d!e". is it a malformed address?
> not if a file name a!b!c!d!e exists. but in general, yes.
|
| Show full article (1.00Kb) |
| 2 Comments |
|
  |
Author: Eric Van HensbergenEric Van Hensbergen Date: Jun 1, 2008 09:09
On Sun, Jun 1, 2008 at 10:41 AM, erik quanstrom quanstro.net> wrote:
>
> if dial strings are written with / and not !
> / net/tcp/bell-labs.com/http,
> an appropriately constructed namespace could
> allow the "correct" fileserver to pass judgement.
>
Why include the tcp path element? Name resolution should be able to
determine the best network path to the service.
-eric
|
| |
| 1 Comment |
|
  |
Author: erik quanstromerik quanstrom Date: Jun 3, 2008 20:35
>>
>> if dial strings are written with / and not !
>> / net/tcp/bell-labs.com/http,
>> an appropriately constructed namespace could
>> allow the "correct" fileserver to pass judgement.
>>
>
> Why include the tcp path element? Name resolution should be able to
> determine the best network path to the service.
because i was declaring that the connection was via tcp.
in case this is an unimportant detail to me, i could use
/ net/net/bell-labs.com/http
instead. and supposing that i am connected to bell-labs.com via
(pulls something random out of a hat) xns spp only and suppsing there
is a standard socket number assigned for http over xns/spp, this would
be equivalent to
/ net/spp/bell-labs.com/http
- erik
|
| |
| no comments |
|
  |
|
|
  |
Author: Enrico WeigeltEnrico Weigelt Date: Jun 5, 2008 04:13
* Russ Cox swtch.com> wrote:
> you can run
>
> verbose9pserve=2 vacfs ...
>
> and you will get a lot of debugging messages on standard error.
thx, I'll have a try.
> among other things, you'll get a trace of all the 9p traffic,
> and you can check whether this is true. i doubt very much
> that vacfs is dropping messages, since it is a single-threaded
> server with a simple
>
> for(;;){
> read request
> response = handle(request);
> write response
> }
>
> loop.
|
| Show full article (1.86Kb) |
| no comments |
|
|