<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><font face="Calibri, sans-serif">I'm a big fan of regression. </font><font
face="Calibri, sans-serif"><font face="Calibri, sans-serif">I
have programs that I wrote in the 1970's that will execute
just fine on IBM mainframes, <u>today</u>. That's one major
reason they're still around; you don't lose your software
investment, which can be millions of dollars or impossible to
replace. We had always wondered whether DEC really understood
this when canceling the 36 bit line.</font></font></p>
<p><font face="Calibri, sans-serif">New versions of Linux just drive
me nuts when somebody has decided that something needed
changing. The worst was the change in the /DEV interface that
broke the NI code in KLH10. It's not that I can't fix things; I
did. It's that I want to write 20 hosted code as a hobby, not
chase inter-Linux quirks.<br>
</font></p>
<p><font face="Calibri, sans-serif">I'm also a big fan of people
using my software but either not bothering me or not getting
frustrated (or both). Old machines are the ones most frequently
repurposed; but you can't assume that the user is going to want
or is able to put up a new version of the OS. They just want to
use your software.</font></p>
<p><font face="Calibri, sans-serif">Gnu auto configure can go a long
way to handling most of this. For my software, if I am aware of
different possible results which are 'reasonable', then I code
for both (or all of them) and hopefully recover gracefully by
still working with reduced functionality. The overall level of
expertise is not what it was; something not working the first
time around is often the only reason they need to wash their
hands, which is a pity.</font></p>
<p><font face="Calibri, sans-serif">All of this argues for a few
lines of logic to determine which interface to use. It's hardly
a heavy lift and an extremely friendly thing to do. Rolling
over and dropping dead with little or no information is what
Unix programs are notorious for. We never tolerated that on the
20.</font><br>
</p>
<blockquote type="cite"
cite="mid:9CCE9B978F7C964097645E1FC2BC99DD20C339@mail.wiz.local">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
p
{mso-style-priority:99;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
p.MailQuote, li.MailQuote, div.MailQuote
{mso-style-name:"Mail Quote";
margin-top:0cm;
margin-right:0cm;
margin-bottom:0cm;
margin-left:36.0pt;
margin-bottom:.0001pt;
border:none;
padding:0cm;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"></span></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"></span></p>
<hr width="100%" size="2">On 3/10/20 5:18 PM, David Moylan
wrote:
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><br>
</span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m
all for backwards compatibility, however the /dev/net/tun
interface has been in linux since the 2.6 days. A quick
google shows that people back in 2010 have been using it,
and browsing on kernel.org for the oldest archived kernel
entry of 2.6.11 shows code examples for /dev/net/tun dated
2005.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><a
href="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/networking/tuntap.txt?h=linux-2.6.11.y"
moz-do-not-send="true">https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/networking/tuntap.txt?h=linux-2.6.11.y</a><o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
think the starting date for support of /dev/net/tun is
earlier than that of the discontinuation of support for
/dev/tapx.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Given
that the whole goal of pyDECnet is to permit usage of decnet
on more modern environments, I think having code that
supports back to 2005 is a pretty solid move.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Cheers,
Wiz!!<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm
0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
<a class="moz-txt-link-abbreviated" href="mailto:owner-hecnet@Update.UU.SE">owner-hecnet@Update.UU.SE</a>
[<a class="moz-txt-link-freetext" href="mailto:owner-hecnet@Update.UU.SE">mailto:owner-hecnet@Update.UU.SE</a>] <b>On Behalf Of </b>Thomas
DeBellis<br>
<b>Sent:</b> Wednesday, 11 March 2020 2:08 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:hecnet@Update.UU.SE">hecnet@Update.UU.SE</a><br>
<b>Subject:</b> Re: [HECnet] Intermittent Connection
with PyDECnet?<o:p></o:p></span></p>
</div>
</div>
<p>Since you may be running both on newer and older kernels,
does it make sense to test for which tunnel type interface
exists and simply use that?<o:p></o:p></p>
<p>You don't even need to test versions, but rather try
/dev/net/tun and if it works, use that or if it fails, use
/dev/tapx.<o:p></o:p></p>
<p>I'm a big fan of dynamic configuration, also known in the
trade as 'auto magic' or 'automatic nice things'.<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div class="MsoNormal" style="text-align:center"
align="center">
<hr width="100%" size="2" align="center"></div>
<pre>On 3/10/20 9:40 AM, Paul Koning wrote:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Thanks, sorry for leaving that dangling. I'll test that and merge it into my code.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> paul<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div class="MsoNormal" style="text-align:center"
align="center">
<hr width="100%" size="2" align="center"></div>
<pre>On Mar 10, 2020, at 4:28 AM, Keith Halewood <a href="mailto:Keith.Halewood@pitbulluk.org" moz-do-not-send="true"><Keith.Halewood@pitbulluk.org></a> wrote:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Hi,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>These are the changes:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>In Ethernet.py:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> class _TapEth (_Ethernet):<o:p></o:p></pre>
<pre> def open (self):<o:p></o:p></pre>
<pre> fd = os.open('/dev/net/tun', os.O_RDWR | os.O_NONBLOCK)<o:p></o:p></pre>
<pre> ifr = struct.pack('16sH', self.dev.encode('utf-8'), IFF_TAP | IFF_NO_PI)<o:p></o:p></pre>
<pre> ioctl(fd, TUNSETIFF, ifr)<o:p></o:p></pre>
<pre> self.tap = fd<o:p></o:p></pre>
<pre> self.sellist = ( fd, )<o:p></o:p></pre>
<pre> # Turn the interface on -- needed only on Mac OS<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>With the definitions of those constants up near the top:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>TUNSETIFF = 0x400454ca<o:p></o:p></pre>
<pre>TUNSETOWNER = TUNSETIFF + 2<o:p></o:p></pre>
<pre>IFF_TUN = 0x0001<o:p></o:p></pre>
<pre>IFF_TAP = 0x0002<o:p></o:p></pre>
<pre>IFF_NO_PI = 0x1000<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Keith<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<div class="MsoNormal" style="text-align:center"
align="center">
<hr width="100%" size="2" align="center"></div>
<pre><o:p> </o:p></pre>
<pre>From: <a href="mailto:owner-hecnet@Update.UU.SE" moz-do-not-send="true">owner-hecnet@Update.UU.SE</a> [<a href="mailto:owner-hecnet@Update.UU.SE" moz-do-not-send="true">mailto:owner-hecnet@Update.UU.SE</a>] On Behalf Of David Moylan<o:p></o:p></pre>
<pre>Sent: 10 March 2020 07:46<o:p></o:p></pre>
<pre>To: <a href="mailto:hecnet@Update.UU.SE" moz-do-not-send="true">hecnet@Update.UU.SE</a><o:p></o:p></pre>
<pre>Subject: RE: [HECnet] Intermittent Connection with PyDECnet?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Robert Armstrong said on Tuesday, 10 March 2020 4:17 AM<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre><o:p> </o:p></pre>
<pre> FWIW, the "tap:" option in pyDECnet never worked for me. I use pcap<o:p></o:p></pre>
</blockquote>
<pre>to<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>access tap devices -<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> circuit TAP-0 Ethernet pcap:tap0 --single-address --cost=2<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>works for me with Ubuntu 18.04...<o:p></o:p></pre>
</blockquote>
<pre><o:p> </o:p></pre>
<pre>When I first went to play with pyDECnet under Ubuntu 18, I also discovered issues with the tap adapter. Fundamentally the issue comes down to newer kernels (such as in Ubuntu 18) that use a /dev/net/tun interface to communicate instead of /dev/tapx<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I heard on the list that Keith Halewood had modified Paul's code to work with the newer interface standard, so I reached out to him and he provided me with the changes. It's only a few lines of code that need modification.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I believe Keith has provided Paul with the changes. I'd love to see them become mainstream in pyDECnet, as at the moment if I pull down a new build, I have to make the modifications by hand again. <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>With the code changes, tap works a dream for me. <o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>circuit tap-1022 Ethernet tap:tap1022 --random-address<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>cheers, Wiz!!<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<pre><o:p> </o:p></pre>
</blockquote>
</div>
</div>
</blockquote>
</body>
</html>