TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: mark lewis
from: andrew clarke
date: 2016-05-25 09:35:30
subject: pktinfo for everyone

24 May 16 16:10, you wrote to me:

 ml> to handle pkts from points, add the following above your thunderbirds
 ml> comment...

pkthdr.origpoint & destpoint should work fine?

 ml> ===== anip =====
 ml>   # if orignet is 65535, use auxnet

 ml>   if pkthdr.orignet == 65535:
 ml>     pkthdr.orignet = pkthdr.auxnet
 ml> ===== snip =====

Hmm, ok. I'm not sure what software uses this.

Delving into the HPT source, it has:

  if (header->origAddr.net == 65535) {
          if (header->origAddr.point) header->origAddr.net = header->auxNet;
          else header->origAddr.net = header->destAddr.net; /*  not in FSC ! */
  }

which in my Python code would translate to:

  if pkthdr.orignet == 65535:
    if pkthdr.origpoint != 0:
      pkthdr.orignet = pkthdr.auxnet
    else:
      pkthdr.orignet = pkthdr.destnet

I trust HPT is doing the correct thing here but it's pretty weird-looking.

HPT never sets the auxnet field to non-zero anywhere, though. Maybe some
older software does.

 ml> i might mess around with it and see what can be done to add the other
 ml> two type 2 formats... no sure, though... am kinda interested in python
 ml> for several projects that have python engines in them... i think,
 ml> though, that they're doing python3...

Well Python 2 & 3 aren't hugely different.

The 2to3 program included with Python will convert my code to 3.x syntax.

--- GoldED+/BSD 1.1.5-b20160201
* Origin: Blizzard of Ozz, Melbourne, Victoria, Australia (3:633/267)
SEEN-BY: 633/267 712/848
@PATH: 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.