Git Product home page Git Product logo

Comments (10)

bictorv avatar bictorv commented on June 12, 2024

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.

from supdup.

bictorv avatar bictorv commented on June 12, 2024

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.

from supdup.

larsbrinkhoff avatar larsbrinkhoff commented on June 12, 2024

I think I will have to do some rewriting. The current logic is approximately this:

  1. Look up hostname. First try Chaosnet, then Internet.
  2. If lookup is not ok and interactive hostname entry, go back to 1.
  3. Make connection to Chaosnet or Internet depending on which succeeded in step 1.

I propose the rewrite:

  1. Look up Chaosnet hostname. If ok, try to connect to Chaosnet address.
  2. If lookup or connection is not ok, try to look up Internet hostname and connect to that.
  3. If neither Chaosnet or Internet ok and interactive hostname entry, go back to 1.

Note to self: add Arpanet later.

from supdup.

bictorv avatar bictorv commented on June 12, 2024

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.

  1. Try to connect to the hostname, if there is one.
  2. if connection is not OK, look up Internet hostname and connect to that.
  3. if interactive hostname entry, get one and go back to 1

from supdup.

larsbrinkhoff avatar larsbrinkhoff commented on June 12, 2024

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.

from supdup.

bictorv avatar bictorv commented on June 12, 2024

The current code is pretty horrible and the whole thing should be rewritten, I think?

from supdup.

larsbrinkhoff avatar larsbrinkhoff commented on June 12, 2024

The hostname resolving and connection, yes. I don't think there's any small elegant patch that can make this better.

from supdup.

larsbrinkhoff avatar larsbrinkhoff commented on June 12, 2024

To be fair, it was ok when there was only one kind of network to worry about.

from supdup.

larsbrinkhoff avatar larsbrinkhoff commented on June 12, 2024

Fixed by #32.

from supdup.

bictorv avatar bictorv commented on June 12, 2024

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.

from supdup.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.