TIP: Click on subject to list as thread! ANSI
echo: linux
to: NICHOLAS BOEL
from: MARK LEWIS
date: 2016-11-14 10:35:00
subject: two steps back

13 Nov 16 18:48, you wrote to Maurice Kinal:

 MK>> ---------- ye olde gpm cut n' paste starts
 MK>> # generate Type 2.2 pktHeader
 MK>> echo "$origNode,$destNode,$origPoint,$destPoint,,2,2,$origNet,$destNet
 MK>> ,255,0,,$origZone,$destZone,fidonet,fidonet,0" | \ perl -e
 MK>> 'while(){@myarray = split(",", $_);};\
 MK>>            print pack("S4a8S4C2a8S2a8a8I", @myarray);' > $OUTPKT
 MK>> ---------- ye olde gpm cut n' paste ends

 NB> So your generated packet headers will only work with Fidonet? Reason I
ask,
 NB> is why is there two "fidonet" entries in the above routine?

origDomain, destDomain... he could replace those two hardcoded "fidonet"
entries with variables and put those variables ther instead... as i recall,
maurice only does fidonet...

 NB> By the way, hpt.texi mentions this "CapabilityWord" as something used
 NB> by old software.

yes and no... here's the PKT header definitions i use in my pascal READPKT
tool... it should help you in understanding the PKT headers... remember that
they are all the same size, 58 bytes...

==== Begin "READPKT.PAS"  ====

[trim]

type
    bulkheader = array[0..57] of byte;
    pkthead1 = record                     {Type 2+ FSC-0039/48}
                 orgnode   : word;
                 dstnode   : word;
                 year      : integer;
                 month     : integer;
                 day       : integer;
                 hours     : integer;
                 minutes   : integer;
                 seconds   : integer;
                 baud      : integer;
                 pktver    : integer;
                 orgnet    : word;
                 dstnet    : word;
                 prdcodl   : byte;
                 pvmajor   : byte;
                 password  : array[0..7] of char;
                 qorgzone  : integer;
                 qdstzone  : integer;
                 auxnet    : word;
                 capval    : word;
                 prdcodh   : byte;
                 pvminor   : byte;
                 capword   : word;
                 origzone  : integer;
                 destzone  : integer;
                 origpoint : integer;
                 destpoint : integer;
                 proddata  : array[0..3] of char;
              end;

    pkthead2 = record                     {Type 2.0 FTS-0001}
                 orgnode   : integer;
                 dstnode   : integer;
                 year      : integer;
                 month     : integer;
                 day       : integer;
                 hours     : integer;
                 minutes   : integer;
                 seconds   : integer;
                 baud      : integer;
                 pktver    : integer;
                 orgnet    : word;
                 dstnet    : word;
                 prdcode   : byte;
                 pvmajor   : byte;
                 password  : array[0..7] of char;
                 qorgzone  : integer;
                 qdstzone  : integer;
                 filler    : array[0..19] of char;
              end;

    pkthead3 = record                     {Type 2.2 FSC-0045}
                 orignode  : integer;
                 destnode  : integer;
                 origpoint : integer;
                 destpoint : integer;
                 reserved  : array[0..7] of char;
                 pktsubver : integer;
                 pktver    : integer;
                 orignet   : word;
                 destnet   : word;
                 prdcod    : byte;
                 prdrev    : byte;
                 password  : array[0..7] of char;
                 origzone  : integer;
                 destzone  : integer;
                 origdom   : array[0..7] of char;
                 destdom   : array[0..7] of char;
                 proddata  : array[0..3] of char;
              end;

[trim]

var
    bheader : bulkheader;
    header1 : pkthead1 absolute bheader;
    header2 : pkthead2 absolute bheader;
    header3 : pkthead3 absolute bheader;

[chomp]

==== End "READPKT.PAS" ====

 NB> IgnoreCapWord definition:

 NB> "Ignoring Capability Word in pkt files. If some pkt moved to bad. This may
 NB> help, but not recommended. It is better to change old software."

agreed on it being not recommended... type 2+ uses capval and capword... one is
the binary inverse of the other... added as a check to ensure that the PKT is a
type 2+...

 NB> So I'm guessing you're using some kind of capability word in your
 NB> headers that are causing hpt to consider it bad.

if he's generating Type 2+, then he has to use capword and the inverse
capval... type 2+ is also a bit tricky in that points are handled a certain way
with the point part of their addresses being in one of two places... if in the
second place, a specific value has to be written in the first to indicate the
software is to look in the second place for the proper point address value...

)\/(ark

Always Mount a Scratch Monkey
Do you manage your own servers? If you are not running an IDS/IPS yer doin' it
wrong...
... God gave us booze to keep the Irish from ruling the World.
---
* Origin: (1:3634/12.73)

SOURCE: echomail via QWK@docsplace.org

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™.