On Aug 22, 2020, at 1:03 PM, Keith Halewood
<Keith.Halewood at pitbulluk.org> wrote:
The quick and dirty patch:
Add the following to the top of ethernet.py:
TUNSETIFF = 0x400454ca
TUNSETOWNER = TUNSETIFF + 2
IFF_TUN = 0x0001
IFF_TAP = 0x0002
IFF_NO_PI = 0x1000
Modify the top half of _TapEth class as:
if fcntl:
class _TapEth (_Ethernet):
def open (self):
fd = os.open('/dev/net/tun', os.O_RDWR | os.O_NONBLOCK)
ifr = struct.pack('16sH', self.dev.encode('utf-8'), IFF_TAP |
IFF_NO_PI)
ioctl(fd, TUNSETIFF, ifr)
self.tap = fd
self.sellist = ( fd, )
# Turn the interface on -- needed only on Mac OS
Thank you so very much!! This is what finally got pydecnet working for me. I have been
trying to run it on the fanless Debian Linux box that I use as my local router, DHCP
server, etc., along with a couple of simh emulations. With the pcap interface, I was never
able to get everything talking to everything, both on the same host and on my LAN, at the
same time. Some things would see some things some of the time, but nothing would ever talk
to everything any of the time.
Applying that patch to pydecnet V1.0-540 and then using the tap interface made everything
work. Yay! I had pydecnet, a simh VAX-11/785 emulation running OpenVMS 7.3, and another
simh emulation of an InfoServer, all running on the Debian box at the same time. I also
had another simh VAX-11/785 emulation running on another host on my LAN. Everything saw
everything!
I am very much in favor of getting this patch into the distribution to allow the tap
interface to work on current Linux distributions.
Now, I can finally think of getting connected to hecnet! I'll still have a very
intermittent more-down-than-up connection because of my internet connectivity limitations,
but I'm excited!
--
Mark J. Blair <nf6x at nf6x.net>
http://www.nf6x.net/