Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DQDEV support (DNS in ITS) #2073

Draft
wants to merge 23 commits into
base: master
Choose a base branch
from
Draft

Conversation

bictorv
Copy link
Contributor

@bictorv bictorv commented Sep 7, 2021

This is a cleanup of the stuff I did back in 2005, previously "documented" at http://its.victor.se/wiki/dqdev. I added support in SUPDUP, and changed the default DNS server to 1.1.1.1.

To make this work, I think the only thing you might need is

iptables -I PREROUTING -t nat -s $YOUR_KLH10_ITS_IP -p udp --dport 53 -j DNAT --to-destination $YOUR_DNS_RESOLVER

It might not be needed if your ITS has a "real" IP address (rather than a tun address). For Chaosnet support, you need a DNS server which knows about DNS.Chaosnet.NET and allows recursion (for your requests).

Before merging, it needs some more/better documentation, and perhaps some testing. (Some of the fixes in DQDEV I admit I haven't understood now - there are some odd comments, but "it seems to work".)

How do I make this a "draft" pull request, or is that not necessary?

with some minor touchups.
but HSTSIX implementation should go in RESOLV
since that was already implemented.
@larsbrinkhoff
Copy link
Member

Thanks!

It's not really necessary to convert to a draft but it could be nice to signal the intent. There's a small line saying "Still in progress? Convert to draft" in the right sidebar on this page.

@bictorv bictorv marked this pull request as draft September 8, 2021 05:49
and use it in SUPDUP
for simplicity etc
But for now, use only the HSTSIX of NETWRK (HOSTS3) since it's faster and hard to tell if it failed.
which decides whether to use DQ: (DQXDEV) or DOMAIN: (DQDEV). Default DQ:.

Support that in NAME, SUPDUP and COMSAT.
and rename DODQ to DODNS for a little less confusion.
src/sysen2/name.558 Outdated Show resolved Hide resolved
@larsbrinkhoff
Copy link
Member

I think it's polite to ping @cstacy and explain the DQDEV code is being hacked here.

@larsbrinkhoff
Copy link
Member

larsbrinkhoff commented Sep 9, 2021

Reviewing the changes to NAME took me on a tour in time to see the ups and downs of ITS.

SYSENG; NAME 166        1975-11-11
itshst: 206
        306

SYSENG; NAME 208        1976-10-09
hsits:  .byte 9 ? 106 ? 206 ? 306 ? 354 ? 0

SYSEN2; NAME 482        1983-02-07
        ; List of ITS hosts
hsits:  irps x,,ai ml mc dm

SYSEN2; NAME 493        1983-03-02
        ; List of ITS hosts
hsits:  irps x,,ml mc dm

SYSEN2; NAME 516        1983-12-01
        ; Too-short list of ITS hosts
hsits:  irps x,,ml mc

SYSEN2; NAME 522        1984-04-01
        ; Too-short list of ITS hosts
hsits:  irps x,,mc

SYSEN2; NAME 551        1986-03-01
        ; Too-short list of ITS hosts
hsits:  irps x,,[mc,ai]

SYSEN2; NAME 554        1986-04-02
hsits:  irps x,,[AI,MX,MC]
        sixbit /x/

@@ -146,13 +175,20 @@ CVH3NA: PUSH P,B
CAIL B,1000 ; If any of high 3 bits were set,
JRST CVH3N3 ; it must be a HOSTS3 strange-fmt addr.
JUMPN B,CVH3N2 ; If not zero, then must assume HOSTS2 fmt.
;; Noone uses Arpanet anymore - but some use Chaosnet.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I WANT TO USE ARPANET!

Check out this [external guide](https://its.victor.se/wiki/dqdev)
To make ITS use DNS like a modern netizen, you need to do the following:

1. Compile the handler for the DOMAIN: device, which interfaces to DNS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain about DQ, DQX, and DOMAIN?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, somewhere. I'm not sure where to document what really, this file seems to be "user friendly" while explaining DQ/DQXDEV and DOMAIN/DQDEV might be more low-level info?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Info can go in INFO. :-)

@@ -273,9 +281,24 @@ SUPDU1: MOVEI A,HSTPAG
.VALUE
MOVEI A,JCLBUF
PUSHJ P,NETWRK"HSTLOOK ;GET HOST NUMBER INTO A, NETWORK NUMBER INTO TT
ifn DODNS,[
;; NETWRK failed, try DNS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't NETWRK"HSTLOOK do DNS under the covers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make sense, except it would (under the hood) make many programs larger and more complex/slower. Consider e.g. PEEK which is in a sense a real-time program, and might need to resolve addresses quite a few times per time unit in some circumstances.

The other way around might be more reasonable: let RESOLV use NETWRK under the hood?

But it's really unsustainable to have "all these programs" do both, in a manual fashion, reproducing the same code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see your point about size/speed considerations. I don't know what PEEK does with hostnames. Would it make sense for programs to say $$DNS==0 or 1 before .INSRTing NETWRK to control whether to use DNS or not? It seems to me HSTLOOK is the natural entry point for any program that want to look up a host name, and it might be possible to extend this API in a way to make all callers happy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And then again, NETWRK is not only about name/address resolution, and RESOLV is not only about name<->address but also other DNS things. Hmm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho hum, reading the code is a way to learn. DQDEV already uses NETWRK if asked for it (e.g. domain:HOSTS3;ch;a;no.nocrew.org rather than domain:QUERY;ch;a;no.nocrew.org), so making RESOLV first ask for HOSTS3 and then DNS data should be easy - not efficient, but easy. ;-)

@larsbrinkhoff
Copy link
Member

larsbrinkhoff commented Sep 9, 2021 via email

also spelling error fix
Need to develop HOSTNM replacement in resolv or telnet.
Needed after PR PDP-10#2061, where the address is read from the IMP rather than hardcoded.
@bictorv
Copy link
Contributor Author

bictorv commented Sep 16, 2021

I'm still working on this - there is plenty still to do - but I find it a bit convenient to have the sum of all the commits visible in a PR. (Maybe there is another way?)

@larsbrinkhoff
Copy link
Member

I think it's perfectly fine to have an evolving work in progress as a draft pull request.

(plus typo fix)
@larsbrinkhoff
Copy link
Member

Is this still in (intermittent) progress?

@bictorv
Copy link
Contributor Author

bictorv commented Jan 12, 2022

It is, indeed, but as you say, intermittently. Will find the time!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants