DIRECTORY Rope USING [ROPE]; GVBasics: CEDAR DEFINITIONS = BEGIN OPEN Rope; GVString: TYPE = ROPE; maxGVStringLength: CARDINAL = 64; RName: TYPE = GVString; maxRNameLength: CARDINAL = maxGVStringLength; Connect: TYPE = GVString; maxConnectLength: CARDINAL = maxGVStringLength; Remark: TYPE = GVString; maxRemarkLength: CARDINAL = maxGVStringLength; Password: TYPE = ARRAY[0..3] OF CARDINAL; MakeKey: PROC[ROPE] RETURNS[ Password ]; 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; oldestTime: Timestamp = [net:0, host:0, time:0]; RopeFromTimestamp: PROC[Timestamp] RETURNS[ROPE]; ItemHeader: TYPE = MACHINE DEPENDENT RECORD[ type: ItemType, length: ItemLength ]; Item: TYPE = REF ItemHeader; ItemLength: TYPE = INT; ItemType: TYPE = MACHINE DEPENDENT { PostMark(10B), Sender(20B), ReturnTo(30B), Recipients(40B), Text(1010B), Tioga1(1013B), -- Cedar Tioga2(1014B), -- Cedar WalnutLog(1015B), -- Cedar/Walnut Capability(1020B), Audio(1030B), Interscript(1031B), Smalltalk(1040B), lastSmallTalk(1057B), Interlisp(1060B), lastInterlisp(1077B), GGW(1100B), lastGGW(1117B), Cedar(1120B), lastCedar(1137B), Voice(1140B), lastVoice(1147B), MessageComposer(1150B), updateItem(2000B), reMail(2100B), msgAttributes(3000B), msgClasses(3001B), LastItem(LAST[CARDINAL]) }; END. HGVBasics.mesa - public DEFS for basic types Copyright c 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 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. Most strings occurring inside Grapevine are restricted to this length. 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" 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" 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" 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. 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 -- the number of seconds since midnight, January 1, 1901 GMT Returns "3#14@123456789", for example. Layout of items 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. Number of data bytes in the item, excluding header-- Mandatory items. In each message body, each of these items occurs precisely once, and they occur in the order given here the item contains a timestamp giving the originating host and approximate time at which the message was given to the transport mechanism. the item contains precisely one R-Name, being that of the sender of this message the item contains precisely one R-Name, being that of the client to whom non-delivery of the message should be notified 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 the item contains a sequence of characters forming a textual message Tioga1 formatting information Tioga2 formatting information Walnut log entries the item contains a capability the item is an audio message the item is an Interscript script Items used by Smalltalk for various purposes 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 Items used by Lisp for various purposes They have [1060B .. 1077B) Items used by GV/NS Mail Gateway for various purposes GV/NS Mail Gateway They have [1100B .. 1120B) Items used by Cedar for various purposes Cedar has [1120B .. 1140B) Items used by the Cedar Voice project for various purposes Voice have [1140B .. 1150B) Various items contains name and timestamp of program that composed the message (optional) Items used in registration server internal mail the item contains a registration server entry 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 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) the item is followed by a sequence of (class number: class name) pairs Mandatory last item the item contains no data, and always occurs as the last item in a message body Ê®˜codešœ+™+Kšœ Ïmœ1™