Closed larsbrinkhoff closed 12 months ago
Yes, it seems like a bad idea but probably precedes the NCP default domain setting. It seems simple: just don't add the default domain.
But the host name parsing has another function: to check if Supdup should use Chaos or TCP. I would suggest introducing another program option for that (e.g. "-c"), or possibly first try to connect with Chaos, and if there is no cbridge or the cbridge gives back a LOS, proceed with TCP. It should be quick enough.
And it is a problem even if the NCP doesn't look up hostnames in a hosts file. Having several different defaults (in Supdup, in the NCP) makes it more difficult to predict.
I think I will have to do some rewriting. The current logic is approximately this:
I propose the rewrite:
Note to self: add Arpanet later.
But how do you propose to do the Chaosnet host lookup? Wouldn't it be better to let the cbridge NCP do that, i.e.
Yes. As far as supdup is concerned, the "network modules" should ideally only accept a hostname string and return a file descriptor or -1. Or something like that, depending on implementation details. The current code is a little hairy, so we'll see how it goes.
The current code is pretty horrible and the whole thing should be rewritten, I think?
The hostname resolving and connection, yes. I don't think there's any small elegant patch that can make this better.
To be fair, it was ok when there was only one kind of network to worry about.
Fixed by #32.
The hostname resolving and connection, yes. I don't think there's any small elegant patch that can make this better.
No, I mean the whole program is pretty horrible (like so much C code from the 1980s). Except the new chaos.c and tcp.c, of course.
If the hostname doesn't have a period (".") in it, supdup adds the default Chaosnet domain name ".chaosnet.net" to it. This is passed along to the bridge NCP, which is a bit of a problem for the NCP looking up hostnames in a hosts file. @bictorv, ideas?