GVBasics.mesa - public DEFS for basic types
Copyright © 1985 by Xerox Corporation. All rights reserved.
Andrew Birrell 14-Aug-80 10:31:53
Levin, June 24, 1983 5:25 pm
Russ Atkinson (RRA) February 4, 1985 11:29:54 am PST
Willie-Sue, February 27, 1985 10:06:48 am PST
DIRECTORY Rope USING [ROPE];
GVBasics: CEDAR DEFINITIONS = BEGIN OPEN Rope;
Note that incompatible changes to these definitions may require the cooperation of all mail servers and their clients, and the flushing of the mail server filestores.
The following types are basic to the transport mechanism. "Connect", "Password" and "Remark" don't really occur in message bodies, but this is the most stable defs file for them. They are used by public clients of the transport mechanism.
GVString: TYPE = ROPE;
maxGVStringLength: CARDINAL = 64;
Most strings occurring inside Grapevine are restricted to this length.
RName: TYPE = GVString;
maxRNameLength: CARDINAL = maxGVStringLength;
An R-Name (Recipient-name) is the basic name within the transport mechanism. It is of the form SN.Reg ( Simple-Name . Registry ). The representation is as a ROPE of up to maxRNameLength characters. In message bodies, R-Names occupy an integral number of words.
Connect: TYPE = GVString;
maxConnectLength: CARDINAL = maxGVStringLength;
"Connect" is the representation of a connect-site for an individual (typically a server). It is a string which is either an NLS name or a PUP address.
Remark: TYPE = GVString;
maxRemarkLength: CARDINAL = maxGVStringLength;
"Remark" is the representation of a remark associated with a group, or of a TOC entry in a mailbox. It is a human readable string.
Password: TYPE = ARRAY[0..3] OF CARDINAL;
"Password" is the representation of an individual's encryption key. It is intended to be used with the DES encryption algorithm. Note that this is not the same as DESFace.Key (today), not even if you use LOOPHOLE.
MakeKey: PROC[ROPE] RETURNS[ Password ];
The following definitions are concerned with the layout of "message bodies". A message body is the internal representation of a message within and between mail servers. It is also sent to the client when he retrieves his mail. A message body contains a number of "items". Items are used to represent such things as postmark, recipients, sender, as well as the message text (if any), or other content of the message such as audio or capabilities. Some items are mandatory and always occur precisely once, others may occur any number of times (including zero). Each Item has a header, followed by the number of bytes of data specified by the header, followed by an extra byte if its length is odd. Thus items always start at a word boundary. A complete message body consists of the mandatory items followed by the optional ones. --
Time stamps: used as UID's for messages and for database updates --
Timestamp: TYPE = MACHINE DEPENDENT RECORD[
net: [0..256), -- the PUP net number
host: [0..256), -- the PUP host number
time: PackedTime];
PackedTime: TYPE = LONG CARDINAL;
the number of seconds since midnight, January 1, 1901 GMT
oldestTime: Timestamp = [net:0, host:0, time:0];
RopeFromTimestamp: PROC[Timestamp] RETURNS[ROPE];
Returns "3#14@123456789", for example.
Layout of items
ItemHeader: TYPE = MACHINE DEPENDENT RECORD[
type: ItemType,
length: ItemLength ];
Each item consists of an ItemHeader followed by a variable length array, containing the number of bytes specified by the length. The item is followed by an extra byte if its length is odd.
Item: TYPE = REF ItemHeader;
ItemLength: TYPE = INT;
Number of data bytes in the item, excluding header--
ItemType: TYPE = MACHINE DEPENDENT {
Mandatory items. In each message body, each of these items occurs precisely once, and they occur in the order given here
PostMark(10B),
the item contains a timestamp giving the originating host and approximate time at which the message was given to the transport mechanism.
Sender(20B),
the item contains precisely one R-Name, being that of the sender of this message
ReturnTo(30B),
the item contains precisely one R-Name, being that of the client to whom non-delivery of the message should be notified
Recipients(40B),
the item contains a sequence of R-Names, being the intended recipients of this message, as provided by the sender
Items used solely by clients
Text(1010B),
the item contains a sequence of characters forming a textual message
Tioga1(1013B),  -- Cedar
Tioga1 formatting information
Tioga2(1014B),  -- Cedar
Tioga2 formatting information
WalnutLog(1015B),  -- Cedar/Walnut
Walnut log entries
Capability(1020B),
the item contains a capability
Audio(1030B),
the item is an audio message
Interscript(1031B),
the item is an Interscript script
Items used by Smalltalk for various purposes
Smalltalk(1040B),
Smalltalk-80
1040B  Smalltalk text formatting runs
1041B  Smalltalk ID (client generated Postmark)
1044B  Compressed bitmap image (CAIS format)
We have specified, but not yet implemented the following codes:
1042B  Letter reference
1043B  File reference
1045B  Smalltalk code
Item types 1046B - 1057B are reserved for future use
lastSmallTalk(1057B),
Items used by Lisp for various purposes
Interlisp(1060B),
lastInterlisp(1077B),
They have [1060B .. 1077B)
Items used by GV/NS Mail Gateway for various purposes
GGW(1100B),
GV/NS Mail Gateway
lastGGW(1117B),
They have [1100B .. 1120B)
Items used by Cedar for various purposes
Cedar(1120B),
lastCedar(1137B),
Cedar has [1120B .. 1140B)
Items used by the Cedar Voice project for various purposes
Voice(1140B),
lastVoice(1147B),
Voice have [1140B .. 1150B)
Various items
MessageComposer(1150B),
contains name and timestamp of program that composed the message (optional)
Items used in registration server internal mail
updateItem(2000B),
the item contains a registration server entry
reMail(2100B),
the item is internal mail to a mail server, containing precisely one R-Name, indicating that the corresponding mailbox should be re-mailed
Items used for client internal use
msgAttributes(3000B),
the item is followed by 32 't or 'f, indicating that some possible attribute for a message is on or off. The current attributes include:
bit 0: deleted
bit 1: examined
bit 2: this message has no body
bit 3: message has been answered
bit 4..7: reserved
bit 8..bit31: 't indicates that message is a member of Class (bit-8)
msgClasses(3001B),
the item is followed by a sequence of (class number: class name) pairs
Mandatory last item
LastItem(LAST[CARDINAL])
the item contains no data, and always occurs as the last item in a message body
};
END.