Subj : FTS-0001.017 -- RFC To : Bj”rn Felten From : Bj”rn Felten Date : Tue Nov 06 2018 02:43 pm Bj”rn Felten -> All skrev 2014-11-07 01:05: BF> Document: FTS-0001 BF> Version: 17 BF> Date: 06-Nov-2014 BF> A Basic FidoNet Technical Standard BF> Revision 17 BF> Introduction BF> This document defines the data structures which a FidoNet BF> implementation must provide. BF> 1. Basic Requirements for a FidoNet Implementation BF> A FidoNet implementation must be able to call other nodes and BF> transfer messages and files in both directions. This includes pickup BF> and poll. A FidoNet implementation must be able to accept calls from BF> other nodes and transfer messages and files in both directions. This BF> includes pickup. BF> 2. Data Description BF> (* literals *) BF> "ABC" - ASCII character string, no termination implied BF> nnH - byte in hexadecimal BF> (* terminals *) BF> someName - 16-bit integer (little endian) BF> someName[n] - field of n bytes BF> someName[.n] - field of n bits BF> someName(n) - Null terminated string allocated n-1 chars BF> someName{max} - Null terminated string of up to max-1 chars BF> (* punctuation *) BF> a b - one 'a' followed by one 'b' BF> ( a | b ) - either 'a' or 'b', but not both BF> { a } - zero or more 'a's BF> [ b ] - zero or one 'b' BF> (* comment *) - ignored BF> (* predeclared constant *) BF> Null = 00H BF> a. The message format BF> Offset BF> dec hex BF> .-----------------------------------------------. BF> 0 0 | | BF> ~ fromUserName ~ BF> | 36 bytes | BF> +-----------------------+-----------------------+ BF> 36 24 | | BF> ~ toUserName ~ BF> | 36 bytes | BF> +-----------------------+-----------------------+ BF> 72 48 | | BF> ~ subject ~ BF> | 72 bytes | BF> +-----------------------+-----------------------+ BF> 144 90 | | BF> ~ DateTime ~ BF> | 20 bytes | BF> +-----------------------+-----------------------+ BF> 164 A4 | timesRead (low order) | timesRead (high order)| BF> +-----------------------+-----------------------+ BF> 166 A6 | destNode (low order) | destNode (high order) | BF> +-----------------------+-----------------------+ BF> 168 A8 | origNode (low order) | origNode (high order) | BF> +-----------------------+-----------------------+ BF> 170 AA | cost (low order) | cost (high order) | BF> +-----------------------+-----------------------+ BF> 172 AC | origNet (low order) | origNet (high order) | BF> +-----------------------+-----------------------+ BF> 174 AE | destNet (low order) | destNet (high order) | BF> +-----------------------+-----------------------+ BF> 176 B0 | destZone (optional) | destZone (optional) | BF> +-----------------------+-----------------------+ BF> 178 B2 | origZone (optional) | origZone (optional) | BF> +-----------------------+-----------------------+ BF> 180 B4 | destPoint(optional) | destPoint(optional) | BF> +-----------------------+-----------------------+ BF> 182 B6 | origPoint(optional) | origPoint(optional) | BF> +-----------------------+-----------------------+ BF> 184 B8 | replyTo (low order) | replyTo (high order) | BF> +-----------------------+-----------------------+ BF> 186 BA | Attribute (low order) | Attribute (high order)| BF> +-----------------------+-----------------------+ BF> 188 BC | nextReply (low order) | nextReply (high order)| BF> +-----------------------+-----------------------+ BF> 190 BE | text | BF> ~ unbounded ~ BF> | null terminated | BF> `-----------------------------------------------' BF> Message = fromUserName(36) (* Null terminated *) BF> toUserName(36) (* Null terminated *) BF> subject(72) (* see FileList below *) BF> DateTime (* last edited *) BF> timesRead (* not used *) BF> destNode (* of message *) BF> origNode (* of message *) BF> cost (* not used *) BF> origNet (* of message *) BF> destNet (* of message *) BF> destZone (* of message *) BF> origZone (* of message *) BF> destPoint (* of message *) BF> origPoint (* of message *) BF> replyTo (* not used *) BF> AttributeWord BF> nextReply (* not used *) BF> text(unbounded) (* Null terminated *) BF> DateTime = (* a character string 20 characters long *) BF> (* 01 Jan 86 02:34:56 *) BF> DayOfMonth " " Month " " Year " " BF> " " HH ":" MM ":" SS BF> Null BF> DayOfMonth = "01" | "02" | "03" | ... | "31" BF> Month = "Jan" | "Feb" | "Mar" | "Apr" | "May" | "Jun" | BF> "Jul" | "Aug" | "Sep" | "Oct" | "Nov" | "Dec" BF> Year = "01" | "02" | .. | "85" | "86" | ... | "99" | "00" BF> HH = "00" | .. | "23" BF> MM = "00" | .. | "59" BF> SS = "00" | .. | "59" BF> AttributeWord bit meaning BF> --- -------------------- BF> 0 + Private BF> 1 + s Crash BF> 2 Recd BF> 3 Sent BF> 4 + FileAttached BF> 5 InTransit BF> 6 Orphan BF> 7 KillSent BF> 8 Local BF> 9 s HoldForPickup BF> 10 + unused BF> 11 s FileRequest BF> 12 + s ReturnReceiptRequest BF> 13 + s IsReturnReceipt BF> 14 + s AuditRequest BF> 15 s FileUpdateReq BF> s - need not be recognized, but it's ok BF> + - not zeroed before packeting BF> Bits numbers ascend with arithmetic significance of bit position. BF> Message text is unbounded and null terminated (note exception below). BF> A 'hard' carriage return, 0DH, marks the end of a paragraph, and must BF> be preserved. BF> So called 'soft' carriage returns, 8DH, may mark a previous BF> processor's automatic line wrap, and should be ignored. BF> All linefeeds, 0AH, should be ignored. BF> If the first character of a physical line (e.g. the first character BF> of the message text, or the character immediately after a hard BF> carriage return (ignoring any linefeeds)) is a ^A (, 01H), BF> then that line is not displayed as it contains control information. BF> The convention for such control lines is: BF> o They begin with ^A BF> o They end at the end of the physical line (i.e. ignore soft s). BF> o They begin with a keyword followed by a colon. BF> o The keywords are uniquely assigned to applications. BF> o They keyword/colon pair is followed by application specific data. BF> b. File Specifications BF> If one or more of FileAttached, FileRequest, or FileUpdateReq are BF> asserted in an AttributeWord, the subject{72} field is interpreted as BF> a list of file specifications which may include wildcards and other BF> system-dependent data. This list is of the form BF> FileList = [ FileSpec { Sep FileSpec } ] Null BF> FileSpec = (* implementation dependent file specification. may BF> not contain Null or any of the characters in Sep. *) BF> Sep = ( " " | "," ) { " " } BF> c. The Packed Message format BF> To conserve space and eliminate fields which would be meaningless if BF> sent (e.g. timesRead), messages are packed for transmission. As this BF> is a data structure which is actually transferred, its definition is BF> critical to FidoNet. A packed message has a number of fixed length BF> fields followed by four null terminated strings. BF> Offset BF> dec hex BF> .-----------------------------------------------. BF> 0 0 | 0 | 2 | 0 | 0 | BF> +-----------------------+-----------------------+ BF> 2 2 | origNode (low order) | origNode (high order) | BF> +-----------------------+-----------------------+ BF> 4 4 | destNode (low order) | destNode (high order) | BF> +-----------------------+-----------------------+ BF> 6 6 | origNet (low order) | origNet (high order) | BF> +-----------------------+-----------------------+ BF> 8 8 | destNet (low order) | destNet (high order) | BF> +-----------------------+-----------------------+ BF> 10 A | Attribute (low order) | Attribute (high order)| BF> +-----------------------+-----------------------+ BF> 12 C | cost (low order) | cost (high order) | BF> +-----------------------+-----------------------+ BF> 14 E | | BF> ~ DateTime ~ BF> | 20 bytes | BF> +-----------------------+-----------------------+ BF> 34 22 | toUserName | BF> ~ max 36 bytes ~ BF> | null terminated | BF> +-----------------------+-----------------------+ BF> | fromUserName | BF> ~ max 36 bytes ~ BF> | null terminated | BF> +-----------------------+-----------------------+ BF> | subject | BF> ~ max 72 bytes ~ BF> | null terminated | BF> +-----------------------+-----------------------+ BF> | text | BF> ~ unbounded ~ BF> | null terminated | BF> `-----------------------------------------------' BF> PakdMessage = 02H 00H (* message type *) BF> origNode (* of message *) BF> destNode (* of message *) BF> origNet (* of message *) BF> destNet (* of message *) BF> AttributeWord BF> cost (* not used *) BF> DateTime (* message last edited *) BF> toUserName{36} (* Null terminated *) BF> fromUserName{36} (* Null terminated *) BF> subject{72} (* Null terminated *) BF> text{unbounded} (* Null terminated *) BF> d. The Packet Header format BF> The packet contains messages in packed format to be transferred over BF> the net during a connection. As this data structure is transferred, BF> its definition is critical to FidoNet. BF> A packet may contain zero or more packed messages. A packet without BF> messages is often generated as a poll packet. BF> Every packet begins with a packet header. The fields of the packet BF> header are of fixed length. BF> Offset BF> dec hex BF> .-----------------------------------------------. BF> 0 0 | origNode (low order) | origNode (high order) | BF> +-----------------------+-----------------------+ BF> 2 2 | destNode (low order) | destNode (high order) | BF> +-----------------------+-----------------------+ BF> 4 4 | year (low order) | year (high order) | BF> +-----------------------+-----------------------+ BF> 6 6 | month (low order) | month (high order) | BF> +-----------------------+-----------------------+ BF> 8 8 | day (low order) | day (high order) | BF> +-----------------------+-----------------------+ BF> 10 A | hour (low order) | hour (high order) | BF> +-----------------------+-----------------------+ BF> 12 C | minute (low order) | minute (high order) | BF> +-----------------------+-----------------------+ BF> 14 E | second (low order) | second (high order) | BF> +-----------------------+-----------------------+ BF> 16 10 | baud (low order) | baud (high order) | BF> +-----------------------+-----------------------+ BF> 18 12 | 0 | 2 | 0 | 0 | BF> +-----------------------+-----------------------+ BF> 20 14 | origNet (low order) | origNet (high order) | BF> +-----------------------+-----------------------+ BF> 22 16 | destNet (low order) | destNet (high order) | BF> +-----------------------+-----------------------+ BF> 24 18 | prodCode | serialNo | BF> +-----------------------+-----------------------+ BF> 26 1A | | BF> | password (some impls) | BF> | eight bytes | BF> | null padded | BF> | | BF> +-----------------------+-----------------------+ BF> 34 22 | origZone (low) (opt) | origZone (high) (opt) | BF> +-----------------------+-----------------------+ BF> 36 24 | destZone (low) (opt) | destZone (high) (opt) | BF> +-----------------------+-----------------------+ BF> 38 26 | fill | BF> ~ 20 bytes ~ BF> | | BF> +-----------------------+-----------------------+ BF> 58 3A | zero or more | BF> ~ packed ~ BF> | messages | BF> +-----------------------+-----------------------+ BF> | 0 | 0 | 0 | 0 | BF> `-----------------------+-----------------------' BF> Packet = PacketHeader { PakdMessage } 00H 00H BF> PacketHeader = origNode (* of packet *) BF> destNode (* of packet *) BF> year (* of packet creation, yyyy *) BF> month (* of packet creation, 0-11 *) BF> day (* of packet creation, 1-31 *) BF> hour (* of packet creation, 0-23 *) BF> minute (* of packet creation, 0-59 *) BF> second (* of packet creation, 0-59 *) BF> baud (* not used *) BF> PacketType (* 02H 00H *) BF> origNet (* of packet *) BF> destNet (* of packet *) BF> prodCode (* write to FTSC for one *) BF> serialNo (* binary serial number (or null)*) BF> password (* session password (or null) *) BF> origZone (* zone of pkt sender (or null) *) BF> destZone (* zone of pkt receiver (or null)*) BF> fill[20] BF> The remainder of the packet consists of packed messages. Each packed BF> message begins with a message type word 0200H. A pseudo-message BF> beginning with the word 0000H signifies the end of the packet. BF> --- Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.1.16) BF> Gecko/20101125 BF> * Origin: news://felten.yi.org (2:203/2) -- ... --- Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.1.16) Gecko/20101125 * Origin: news://eljaco.se (2:203/2) .