[HECnet] Configuring py-decnet.
Keith Halewood
Keith.Halewood at pitbulluk.org
Sat Aug 22 13:03:07 PDT 2020
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
Keith
From: owner-hecnet at Update.UU.SE [mailto:owner-hecnet at Update.UU.SE] On Behalf Of Paul Koning
Sent: 22 August 2020 20:28
To: hecnet at update.uu.se
Subject: Re: [HECnet] Configuring py-decnet.
Correct. I need to get that patch integrated, but I haven't used TAP in 5 years or so. That means it takes a bit of time for me to understand it and check it. I use PCAP normally, and that works well.
paul
On Aug 22, 2020, at 2:59 PM, Robert Armstrong <bob at jfcl.com<mailto:bob at jfcl.com>> wrote:
>rsts/e --> delqua --> virtual tap ethernet --> pydecnet --> real-ethernet --> GRE tunnel.
FWIW, I don’t believe that the “tap:” support in pyDECnet works out of the box. There’s a patch for it floating around that somebody did, but I can’t remember who just offhand. Hopefully somebody can remind me.
An alternative is to use pcap to connect pyDECnet to a TAP device. That works just fine, and I use that setup here to connect pyDECnet to a simulated VAX.
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sonic.net/pipermail/hecnet-list/attachments/20200822/5fb0259a/attachment.html>
More information about the Hecnet-list
mailing list