Discussion:
[9fans] fossil listening on /net.alt?
(too old to reply)
Steve Simon
2012-01-27 13:12:01 UTC
Permalink
I am trying to get a plan9 box to serve a seccond
private network, /net.priv (I already use /net.alt for other things).

I can duplicate cs, dns, tftp dhcp etc on the seccond network (dns resolving
not withstanding) but I haven't worked out how to teach fossil to listen to
anything but the default network.

I tried this (from fossil console):

listen /net.priv/tcp!*!564
listen: announce '/net.priv/tcp!*!564': announce opening /net.priv/tcp/clone: '/net.priv' file does not exist

As this machine boots from fossil, this is started before the seccond network
and thus /net.priv/tcp is not in fossil's namespace.

Then I tried this:

listen /net.priv/tcp!*!564
listen: announce '#I1/tcp!*!564': announce opening /net/#I1/tcp/clone: '/net/#I1' file does not exist

It seems I could hack libc here:

/sys/src/libc/9sys/announce.c:221

to test for a leading' /' or '#', but that feels a bit hackish.

Anyone think a better way round this?

-Steve
erik quanstrom
2012-01-27 14:33:35 UTC
Permalink
Post by Steve Simon
As this machine boots from fossil, this is started before the seccond network
and thus /net.priv/tcp is not in fossil's namespace.
listen /net.priv/tcp!*!564
listen: announce '#I1/tcp!*!564': announce opening /net/#I1/tcp/clone: '/net/#I1' file does not exist
if it does work for /net.alt, it must be reading /lib/namespace.
have you added your /net.priv to /lib/namespace? (just a guess.)

- erik
Steve Simon
2012-01-27 15:21:07 UTC
Permalink
Ok, for the archives

fossil does an rfork(RFNAMEG) so changing namespaces after it is
started doesn help.

fossil has a bind console command which allows you to bind in devices
later (most excellent).

the filesystem fossil sees is devroot() only, so if you create a new
filesystem entry like /net.priv you cannot bind #I1 into that, you
have to use /net.alt (or add net.priv to devroot.c).

-Steve

Continue reading on narkive:
Loading...