From news.chanae.stben.be!f2602.n293!f50.n3615!f1.n396!f888.n24!f777.n24!f2.n2480!f5888.n240!f5815.n240!not-for-mail Thu May 8 01:44:39 1997 Path: news.chanae.stben.be!f2602.n293!f50.n3615!f1.n396!f888.n24!f777.n24!f2.n2480!f5888.n240!f5815.n240!not-for-mail Newsgroups: fido.int.net_dev X-Comment-To: Christian Andersen From: Frank Ellermann Date: Tue, 06 May 97 15:34:00 +0200 Subject: Re: PKT format Message-ID: <3492642341@p1.f5815.n240.z2.fidonet.ftn> References: <860959715@p22.f335.n235.z2.ftn> Organization: xyzzy X-FTN-CHRS: LATIN-1 2 X-FTN-ORIGCHRS: IBMPC 2 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: XP 3.11 R/C8441 X-FTN-AREA: NET_DEV X-FTN-MSGID: 2:240/5815.1@fidonet.org d02d7e25 X-FTN-REPLY: 2:235/335.22 335133e3 X-FTN-PID: XP 3.11 R/C8441 X-FTN-Tearline: X-FTN-Origin: xyzzy (2:240/5815.1) X-FTN-SEEN-BY: 293/2219 2602 3615/50 X-FTN-PATH: 240/5815 5888 2480/2 24/777 888 396/1 3615/50 293/2602 X-FTN-PATH: 293/2219 Lines: 174 Xref: news.chanae.stben.be fido.int.net_dev:2551 Hello Christian, see below, credits to Leonard, greets, Frank To : NET_DEV (Paul Edwards) From : Leonard Erickson @ 1:105/51 (Shadowshack, Portland OR) Subject: Re: pktstd.txt Date : 13.12.95, 14:21 -=> Quoting Paul Edwards to Ian Smith <=- IS> You appear to have forgotten about type 2.2 packets? See BINK.H for PE> No, it's just that: PE> 1. I have never used them thus don't know anything about them. PE> 2. I was under the (correct) impression that they were incompatible PE> with FTS-1. Hmmm. Let's take a look... Type 2... Offset Dec Hex Length Data Type Contents 0 0 2 integer originating node 2 2 2 integer destination node 4 4 2 word 4-digit year of packet creation date 6 6 2 word month component of packet creation date (0-11) 8 8 2 word day component of packet creation date (1-31) 10 A 2 word hour (0-23) 12 B 2 word minutes (0-59) 14 D 2 word seconds (0-59) 16 10 2 word baud (useless) 18 12 2 word constant value of 2, the packet type 20 14 2 integer originating net 22 16 2 integer destination net 24 18 1 byte FTSC product code (opt) 25 19 1 byte serial number (opt) 26 1A 8 bytes password (opt) 34 22 2 integer originating zone (opt) 36 24 2 integer destination zone (opt) 38 26 20 bytes filler (must be set to NULs if *generating*, could be anything on *reading*) 58 3A - ---- start of first packed message Type 2.2 Offset Dec Hex Length Data Type Contents 0 0 2 integer originating node 2 2 2 integer destination node 4* 4 2 integer originating point 6* 6 2 integer destination point 8* 8 8 bytes fill (all nulls) 16* 10 2 word packet subversion (2) 18 12 2 word constant value of 2, the packet type 20 14 2 integer originating net 22 16 2 integer destination net 24 18 1 byte FTSC product code 25* 19 1 byte FTSC Product rev 26 1A 8 bytes password 34 22 2 integer originating zone 36 24 2 integer destination zone 38* 26 8 string originating domain 46* 2E 8 string destination domain 54* 36 4 bytes Product specific data 58 3A - ---- start of first packed message So we get this: Offset Type 2 Type 2.2 ------ ------- --------- 4-5 year orig point 6-7 month dest point 8-9 day nulls 10-11 hour nulls 12-13 minute nulls 14-15 seconds nulls 16-17 baud packet sub-version 25 serial# FTSC prod rev 38-45 fill orig domain 46-53 fill dest domain 54-57 fill prod specific So you just check the baud field and if it contains a value of 2 (an impossible baud rate) you've got a type 2.2 packet. So let's add in type 2+... Type 2+... Offset Dec Hex Length Data Type Contents 0 0 2 integer originating node 2 2 2 integer destination node 4 4 2 word 4-digit year of packet creation date 6 6 2 word month component of packet creation date (0-11) 8 8 2 word day component of packet creation date (1-31) 10 A 2 word hour (0-23) 12 B 2 word minutes (0-59) 14 D 2 word seconds (0-59) 16 10 2 word baud (useless) 18 12 2 word constant value of 2, the packet type 20 14 2 integer originating net (-1 if point, per FSC-48) 22 16 2 integer destination net 24 18 1 byte product code 25 19 1 byte FTSC Product Rev (minor) 26 1A 8 bytes password 34 22 2 integer originating zone 36 24 2 integer destination zone 38 26 2 bytes filler (Originating net for points, FSC-48) 40 28 2 word byte swapped capability word 42 2A 1 byte FTSC product code (Hi byte) 43 2B 1 byte FTSC Product Rev (major) 44 2C 2 word capability word 46 2E 2 integer originating zone 48 30 2 integer destination zone 50 32 2 integer originating point 52 34 2 integer destination point 54 36 4 long Product-specific data 58 3A - ---- start of first packed message this gives a new table: Offset Type 2 Type 2+ Type 2.2 ------ --------- --------- -------- 0-1 orig node orig node orig node 2-3 dest node dest node dest node 4-5 *year year orig point 6-7 *month month dest point 8-9 *day day nulls 10-11 *hour hour nulls 12-13 *minute minute nulls 14-15 *seconds seconds nulls 16-17 *baud baud packet sub-version 18-19 pkt type pkt type pkt type 20-21 *orig net orig net (1) orig net 22-23 dest net dest net dest net 24 prod code prod code (lo) prod code 25 *serial# prod rev (maj) prod rev 26-33 password password password 34-35 orig zone orig zone orig zone 36-37 dest zone dest zone dest zone 38-39 *fill fill(2) orig domain 40-41 *fill inv cap word " " 42-43 *fill prod code (hi) " " 44-45 *fill cap word " " 46-47 *fill orig zone dest domain 48-49 *fill dest zone " " 50-51 *fill orig point " " 52-53 *fill dest point " " 54-57 *fill prod specific prod specific (1) -1 if point (per FSC-48) (2) orig net if point (per FSC-48) These structures aren't all that different... And it's pretty obvious how to detect them: if baud=2 then type2.2 else if lo(cap word)=hi(inv cap word) and hi(cap word)=lo(inv cap word) then type 2+ else type 2 Looks eassy to me. ... YOU can help wipe out COBOL in our lifetime - - Blue Wave/DOS v2.21 # Origin: Shadowshack (1:105/51) P.S.: very late reply, I had a one-sided link in April, sorry