Subject: anyone running KLH10 under NetBSD?
To: None <>
From: Stephen M. Jones <>
List: port-alpha
Date: 05/13/2002 12:07:30
I've been corresponding infrequently with KLH since 1994 regarding his
PDP10 emulator .. its extremely valuable because its the only successful
'KL10B' emulator which basically allows you to run a DECSYSTEM-20/65 
without having to deal with the $2000/mo power bill and hardware maintenance.

For the most part, getting KLH's 'KLH10' running was not so difficult as 
there has been a port to the freebsd x86 platform.  There has also been 
some work to get it to run ITS (a KS10 w/ special paging hardware) 
under NetBSD ..

So basically, 99% of it works.  I can read DECTAPE images and have
successfully installed TOPS-20 (however I'm currently using MRC's own
hacked MONITR) .. the only thing left is the NI20 (ethernet interface).

KLH10 uses the BSD bpfilter (bpf) interface inorder to emulate the 
NI20.  For the most part, after some tweaking, I seem to be able to get
the enaddr set for the appropriate IP address, but I believe there is a
problem with how his code deals with the bpf.  

Rather than asking for help here to try to debug the KLH10, I wanted to
ask what are the differences between NetBSD and FreeBSD's 'bpf'?

When this interface is initially configured, the KLH10 reports:

errno 35 - Resource temporarily unavailable

I can tell you that I do have the 'bpf' option set in my kernel config 
(klh recommends at least 1, I have 8).  Beyond that, is there anything 
else I need to setup before attempting to use bpf?  (similarly, ipfilter
has to have ipf -E run to enable filtering .. maybe?).
What I'm running:
NetBSD bjork 1.5ZC NetBSD 1.5ZC (BJORK) #1: Mon May 13 00:43:35 UTC 2002

Full debuggging (for those who are curious) (Also note the arp -s command
below, that entry already existed as I've been trying to start up the
interface a few times .. hence, it reports an error ..)

[ni20_start: RAR 0, pcba=310135 pia=0 ivec=0,,0 - starting DP "dpni20"...started!]
[dp_start: Forking...][dp_start: Forked 1324]
[dp_start: Forked 0]
[dp_start: execing "dpni20" "-DPM:262147" "-debug"]
[dpni20: Starting][dpni20: Started][dpni20: DP inited]
[dpni20: SIOCGIFCONF returned 144 bytes (4 ifcs?)]
Interface table: 144 bytes (4 entries if std addr len 16)
0: "tlp0" fam 18, len 24 = 1:0:6:4:6:0:74:6c:70:30:8:0:2b:c3:c5:32:0:0:0:0:0:0:74:6c
AF_LINK = type 6, alen 6 = 8:0:2b:c3:c5:321: "tlp0" fam 2, 
len 16 = 0:0:cf:ca:d6:89:0:0:0:0:0:0:0:0:6c:6f
AF_INET = port 0, IP
2: "lo0" fam 18, len 24 = 2:0:18:3:0:0:6c:6f:30:0:0:0:0:0:0:0:0:0:0:0:0:0:6c:6f
AF_LINK = type 24, alen 0
3: "lo0" fam 2, len 16 = 0:0:7f:0:0:1:0:0:0:0:0:0:0:0:0:0
AF_INET = port 0, IP
Interface summary: 4 entries of varying length
Filtered IFE table: 2 entries
0: "tlp0" (IP (Ether 8:0:2b:c3:c5:32)
1: "lo0" (IP (Other: fam 18)
[dpni20: Using default interface "tlp0"]
[dpni20: kernel packetfilter pri <>, len 13:
0030  0  0 0
0045  0  1 1
0006  0  0 FFFFFFFF
0028  0  0 C
0015  0  1 806
0006  0  0 FFFFFFFF
0020  0  0 1E
0015  1  0 CFCAD68C
0006  0  0 0
0028  0  0 C
0015  0  1 800
0006  0  0 FFFFFFFF
0006  0  0 0
[dpni20: EN addr for "tlp0" = 8:0:2b:c3:c5:32]
[dpni20: EN addr for "tlp0" = 8:0:2b:c3:c5:32]
[dpni20: PF inited][dpni20: ifc "tlp0" => ether 8:0:2b:c3:c5:32]
[dpni20:   addr]
[dpni20:   VHOST]
[dpni20: invoking "/usr/sbin/arp -s 8:0:2b:c3:c5:32 pub"]
arp: writing to routing socket: File exists
[dpni20: arp exit error: status 256]
[dpni20: arp command was:]
[dpni20: arp result ""]
[dpni20: Forking R process][dpni20-W: Starting loop]
[dpni20-W: CmdWait]
[dpni20-R: sent INIT]
[ni20_evhrwak: 1][ni20_iniable!][dpni20-R: InWait]
[dpni20-R: ERead=-1, Err=35]

[dpni20-R: Eread = -1, errno 35[ni20_coni: 400047,,50]
 - Resource temporarily unavailable]
[dpni20-R: InWait]
[dpni20-R: ERead=-1, Err=35]

[dpni20-R: Eread = -1, errno 35 - Resource temporarily unavailable]
[dpni20-R: InWait]
[dpni20-R: ERead=-1, Err=35]

[dpni20-R: Eread = -1, errno 35 - Resource temporarily unavailable]
[dpni20-R: InWait]
[dpni20-R: ERead=-1, Err=35]

[dpni20-R: Eread = -1, errno 35 - Resource temporarily unavailable]
[dpni20-R: InWait]
[dpni20-R: ERead=-1, Err=35]