From lisa@psg.com Wed May 31 13:44:49 1995 Message-Id: From: lisa@psg.com (Lisa Gronke) Subject: What is a packet? [part 1] for gopher To: randy@psg.com (Randy Bush) Date: Wed, 31 May 1995 13:44:46 -0700 (PDT) FidoNews 12-22 Page: 6 29 May 1995 ---------------------------------------------------------------------- An Alien Looks at FidoNet by Lisa Gronke, 1:105/6 lisa@psg.com POLICY4 says the official language of FidoNet is English. POLICY4 is wrong. The official language of FidoNet is the Type 2 (or Type 2+) Packet. The *.PKT is the data structure that is transferred over FidoNet. Often the *.PKT files are transferred inside archived mail bundles with names like 0000FFDC.WE2. The *.PKT has the following structure: -- a Packet Header (58 bytes) -- zero or more Packed Messages -- a Pseudo-message 00 00 (2 bytes) ends the packet So an empty packet (no packed messages) is 60 bytes. Each Packed Message has the following structure: -- packed message header -- starts with 02 00 (message type) (2 bytes) -- 6 fixed length fields (2 bytes each) -- 1 fixed length, null terminated string (20 bytes) -- 3 variable length, null terminated strings (max 144 bytes) -- message text, null terminated (unbounded) All of the control information that makes echomail messages different from netmail messages is considered part of the message text as far as *.PKT structure is concerned. Usually a *.PKT will contain netmail or echomail, but not both. Echomail "message text" starts with an AREA:ECHOTAG line and ends with the Origin, SEEN-BY and ^aPATH: lines. If you're past the stage of total FidoNet bewilderment, 'tis time to snag a couple of *.PKT files and take a look at them. Use a tool like Vernon Buerg's LIST (or newer versions of 4DOS LIST) with hex capability. Gurus use David Nugent's INSPECTA. Aliens with Apple IIs use their sector editor . Where to look? In your inbound area if you can grab a copy of the incoming files before your mail processor does. Or in your outbound area(s). Specific tips follow. But first a word about file names. An "archived mail bundle" is a file that contains one or more *.PKT files, archived with ARC, ZIP, ARJ, LZH, LHA, PAK, ZOO, RAR etc. Bundles to/from strangers are supposed to be archived with ARC (but sometimes aren't). Hubs and other regular callers usually will have made arrangements with you to use an archiver with better compression. ARCmail (used as a generic term for ARC|ZIP|ARJ|ETCmail) bundles have "standard" names of the form nnnnmmmm.dd#, where nnnn is (orignet minus destnet) in hex, mmmm is (orignode minus destnode) in hex (2's compliment for negative numbers), dd is a day of the week in the form MO, TU, WE, TH, FR, SA, or SU, and # is a decimal digit. BinkleyTerm: Outbound --------------------- BinkleyTerm is just a mailer (does no mail processing), but is used with mail processors like QM or Squish which usually archive both netmail and echomail. Outbound mail bundles (for MyZone 1) are found in the c:\bink\outbound subdirectory. Here is a sample from 1:105/6. c:\bink\outbound\0069002a.flo c:\bink\outbound\0000ffdc.Mo0 0069002a.flo is a control file that references the mail bundle. The destination information is in the file name; 0069 (hex) means Net 105, 002a (hex) means Node 42, and .flo means normal mail. This 0069002a.flo file contains one line. It could reference additional mail bundles and/or other files (# indicates that the *.Mo0 file should be truncated after it is sent). #Outbound\0000ffdc.Mo0 The ARCmail bundle has the standard name: onet [Net 105] minus dnet [Net 105] == 0 (dec) == 0000 (hex) onode [Node 6] minus dnode [Node 42] == -36 (dec) == ffdc (hex) Bink can also send *.PKT files. They are stored in the same subdirectory, but are not stored with *.PKT file names. Instead, a packet for 1:105/42 would have a name like 0069002a.OUT [NetNode.?UT], which is changed to a *.PKT name, on the fly, when it is transmitted. BinkleyTerm sysops should not have any trouble finding *.PKTs to examine. FrontDoor: Packets & Archives ----------------------------- The FrontDoor software package contains a message reader/editor [FM], a nodelist compiler [FDNC] and the mailer/router/packer. FD can pack netmail messages into *.PKT files. FD cannot archive *.PKTs into ARCmail bundles. It can toss incoming netmail if it arrives in *.PKT form, but cannot decompress ARCmail bundles. FD puts outbound *.PKT files in the subdirectory (folder) specified in.. FDSETUP: Global -> Filenames -> Packets ..... (say) c:\fd\packets The packets folder is dynamic. *.PKT files are built and deleted frequently. If you exit FD, you will not find anything in the c:\fd\packets folder. In order to find files in the folder, you have to shell out of FD. I entered netmail Message #6 addressed to 1:105/6 using FM, ran my friend's runfd.bat, watched as FD said "Processing netmail folder" and "Preparing outbound mail" and then shelled out of FD with ALT-Z. I found two files. c:\fd\packets\000e4ebf.fdc c:\fd\packets\000e4ebf.pkt 000e4ebf.pkt is the *.PKT file with my message. 000e4ebf.fdc is the associated control file. It looked like this: 01 00 69 00 06 00 00 00 00 00 00 00 A0 3D B0 1E 01 00 00 00 00 00 00 00 05 00 00 00 00 00 00 00 00 00 70 FD 36 00 The first 8 bytes are the zone, net, node and point (hex, lsb : msb order). The 36 at the end is the ascii value for (Message #)6. When the *.PKT is sent, FD uses this information to flag the stored message as "Sent" (or to delete it). Since FrontDoor does not 'do' echos, the sysop needs to use a separate echomail tosser. Leonard Erickson uses QECHO. Qecho.ctl asks for an "Archive path." That is where you will find outbound archived mail bundles containing echomail. Other tossers will have something similar. I entered an echomail message in the NET105 echo on Leonard Erickson's system [1:105/51]. After processing, there was a mail bundle for his HUB [1:105/31] in his c:\qecho\out directory named 00000014.TU2. Inside the mail bundle was a file named 16143322.PKT. There also was a 60 byte (empty) 000e4ec0.pkt in c:\fd\packets and an associated 000e4ec0.fdc control file showing a packet going to 1:105/31.0 referencing the full file spec of the ARCmail bundle. Novice FrontDoor sysops may not realize that messages are turned into *.PKT files before they are sent, since it "looks like" FrontDoor is sending the stored message directly from the netmail folder. I have not seen InterMail, but I would expect an organization pretty much like FrontDoor. The control files are named *.IMC. D'Bridge: Temporary & Outbound Queues ------------------------------------- D'Bridge is an integrated software package. It reads/edits messages with DBEDIT, compiles the nodelist, and processes both netmail and echomail. The overall organization is similar to FrontDoor, but D'Bridge uses a base 36 file naming scheme in both packet and bundle outbound areas. C-00102X.006 ^^^ ----Node 6 ^^^ ----Net 105 [(0 x 1296) + (2 x 36) + X=33] = 105 ^^^ ----Zone 1 ^ ---- type of packet or bundle (C = Crash) File names are changed to standard *.PKT or *.DD? ARCmail names, on the fly, when they are sent. D'Bridge sends *.PKT netmail by default. Outbound packets are built in the "Temporary queue" directory ..... (say) c:\db\packets. I entered a netmail message to 1:105/6 with DBEDIT, exited the editor, watched as D'Bridge said "Building the outbound queue" -- then DROPped to DOS and looked at the packets subdirectory. I found: c:\db\packets\c-00102x.006 c:\db\packets\q-00102x.006 C-00102x.006 was the *.PKT file with my message. Q-00102x.006 is the associated control file. ARC|ZIP|ETCmail bundles are found in the "Outbound queue" directory ..... (say) c:\db\queue. They may be echomail or optional compressed netmail (XMail), and use the same base 36 file naming scheme. I think there is an associated q-*.* control file in the same subdirectory. Next week --------- Now that you've found some *.PKT files and maybe played around making some new ones, don't be shy! Look inside. Read the message text? Does the packet contain netmail or echomail? Next week I'll tell you a little more about reading the packet header and the packed message header. ---------------------------------------------------------------------- .