BBS: Inland Empire Archive Date: 11-01-93 (23:29) Number: 119 From: CORIDON HENSHAW Refer#: 64 To: PETE GRANER Recvd: NO Subj: Fido msg formats. Conf: (2) Quik_Bas
Hello Pete!
On Friday October 29 1993, Pete Graner wrote to All in QUIK_BAS:
PG> I was wondering if anyone had and examples or translations of
PG> the following FidoNet message formats:
PG> PKT
PG> Hudson Message Base
PG> JAM
PG> MSG
I don't have JAM, but I have the TYPE structures of PKT,
HMB and MSG. Here comes:
===CUT: FIDO.BI===
' This file defines the structures for all the packet files used in
' FidoNet, as well as the standard message header and attribute bits.
' The packet file will look like this:
' PacketHeader -> MessageHeader -> ToName -> FromName -> Subject -> MsgText
' ToName and FromName may be up to 36 bytes and are null terminated.
' Subject may be up to 72 bytes and is null terminated.
' MsgText is unbounded and is null terminated.
' The packet will end with two null bytes.
' To figure out what type of header the .PKT has:
'
' If the "Baud" field equals in the FSC-0039 packet structure is 2, then the
' .PKT uses a FSC-0045 packet header
' Otherwise the packet uses a FSC-0039 or FTS-0001 packet structure. The two
' are compatable as long as you use the "QorigZone" and "QdestZone" fields.
' The "Version" field should always equal 2.
TYPE FSC0045Type
OrigNode AS INTEGER 'original node
DestNode AS INTEGER 'destination node
OrigPoint AS INTEGER 'original point
DestPoint AS INTEGER 'destination point
zeros AS STRING * 8 'must be 0's
SubVersion AS INTEGER 'packet sub-version (2 in this case)
Version AS INTEGER 'packet version (2 in this case)
OrigNet AS INTEGER 'original net
DestNet AS INTEGER 'destinaition net
PodCode AS STRING * 1 'product code
RevisionLvl AS STRING * 1 'product revision level
password AS STRING * 8 'password
OrigZone AS INTEGER 'original zone
DestZone AS INTEGER 'destination zone
origDomain AS STRING * 8 'original domain
destDomain AS STRING * 8 'destination domain
PodData AS LONG 'product specific data
END TYPE
TYPE FSC0039Type
OrigNode AS INTEGER 'original node
DestNode AS INTEGER 'destination node
year AS INTEGER 'year
month AS INTEGER 'month
day AS INTEGER 'day
hour AS INTEGER 'hour
minute AS INTEGER 'minute
second AS INTEGER 'second
Baud AS INTEGER 'baud rate, not in use
Version AS INTEGER 'should be 2
OrigNet AS INTEGER 'original net
DestNet AS INTEGER 'destination net
PodCodeLow AS STRING * 1 'product code
MajorLvl AS STRING * 1 'product revision level
password AS STRING * 8 'password
QorigZone AS INTEGER 'original zone
QdestZone AS INTEGER 'destination zone
Filler AS STRING * 4 'spare change
PodCodeHigh AS STRING * 1 'product code, high order
MinorLvl AS STRING * 1 'product revision level, minor
CapWord AS INTEGER 'bitfield for capabilities
OrigZone AS INTEGER 'original zone
DestZone AS INTEGER 'destination zone
OrigPoint AS INTEGER 'original point
DestPoint AS INTEGER 'destination point
PodData AS LONG 'Product data
' Terminator AS STRING * 1 'packet terminator, zeros
END TYPE
TYPE PKTMessageHeaderType
Header AS STRING * 1 'first byte in field, no longer used
'will always be 02H
NullStr AS STRING * 1 'not used either. Will always be NULL
OrigNode AS INTEGER 'original node
DestNode AS INTEGER 'destinaion node
OrigNet AS INTEGER 'original net
DestNet AS INTEGER 'destination net
Attributes AS INTEGER 'attribute bits, link FREQ, Crash, etc.
Cost AS INTEGER 'cost
Datetime AS STRING * 20 'DateTime string
END TYPE
' this structure will be followed by:
' To name (max 36 bytes, null terminated)
' From name (max 36 bytes, null terminated)
' subject (max 72 bytes, null terminted)
CONST Private = 1 'message is private
CONST Crash = 2 'crash send
CONST BeenRead = 4 'message has been read
CONST Sent = 8 'message is sent
CONST Attach = 16 'file is attached
CONST Forward = 32 'being forwarded
CONST UnknownDest = 64 'destination node is unknown
CONST KillSen = 128 'kill after mailing
CONST IsLocal = 256 'FidoNet vs. local
CONST NothingYet = 512 'expansion bit
CONST NothingYet2 = 1024 'ditto
CONST Freq = 2048 'file request
CONST RecieptRqst = 4096 'receipt requested
CONST IsReciept = 8192 'is a return reciept
CONST AuditRqst = 16384 'audit trail requested
CONST UpdateRqst = 32768 'update request
'MSG header:
TYPE MSGHeaderType
FromUser AS STRING * 36 'from, null terminated
ToUser AS STRING * 36 'to, null terminated
Subject AS STRING * 72 'subject, null terminated
Datetime AS STRING * 20 'datetime, full (all 20 chars)
Timesread AS INTEGER 'number of times read
DestNode AS INTEGER 'destination node
OrigNode AS INTEGER 'origin node
Cost AS INTEGER 'cost of message
OrigNet AS INTEGER 'origin network
DestNet AS INTEGER 'destination network
DestZone AS INTEGER 'destination zone (not required)
OrigZone AS INTEGER 'origin zone (Not req)
DestPoint AS INTEGER 'destination point (not req)
OrigPoint AS INTEGER 'origin zone (some
implemenations use these)
ReplyTo AS INTEGER 'previous reaply (in same area)
Attribute AS INTEGER 'attributes, see below
Nextreply AS INTEGER 'next reply
END TYPE
===END===
<<<See next message for HMB>>>

Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET