Skip to main content

3. Detailed Specification: Overview and Data Elements

The presentation of the information in this section is difficult since everything depends on everything, and since this is a linear media it has to come in some order. In this attempt, a very brief overview of the message structure is given, then a radical switch is made to defining the basic building blocks, and finally using the building blocks to reach the overall structure again.

3.1. Overview of Message Structure​

In general a message is composed of three parts: the identification, the command, and the document. Each part is in turn composed of message objects.

The identification part is composed of a transaction number assigned by the originating MPM, and the internet host number of that MPM.

The command part is composed of an operation type, an operation code, an argument list, an error list, the destination mailbox, and a stamp. The stamp is a list of the MPMs that have handled this message.

The document part is composed of a header and a body. The message delivery system does not depend on the contents of the document part, but this specification does make some recommendations for the document header.

The following sections define the representation of a message as a structured object composed of other objects. Objects in turn are represented using a set of basic data elements.

3.2. Data Elements​

The data elements defined here are similar to the data structure and encoding used in NSW [18].

Each of the diagrams which follow represent a sequence of octets. Field boundaries are denoted by the "!" character, octet boundaries by the "+" character. The diagrams are presented in left to right order. Each element begins with a one octet code.

Code  Type          Representation
---- ---- --------------

+------+
0 No Operation ! 1 !
+------+

+------+------+------+------+------
1 Padding ! 0 ! octet count ! Data ...
+------+------+------+------+------

+------+------+
2 Boolean ! 2 ! 1/0 !
+------+------+

+------+------+------+
3 Index ! 3 ! Data !
+------+------+------+

+------+------+------+------+------+
4 Integer ! 4 ! Data !
+------+------+------+------+------+

+------+------+------+------+------
5 Bit String ! 5 ! bit count ! Data ...
+------+------+------+------+------

+------+------+------+------+------
6 Text String ! 6 ! octet count ! Data ...
+------+------+------+------+------

+------+------+------+------+------+------+-----
7 List ! 7 ! octet count ! item count ! Data
+------+------+------+------+------+------+-----

+------+------+------+------+------
8 Proplist ! 8 ! octet count ! Data ...
+------+------+------+------+------

Element code 0 (NOP) is an empty data element used for padding when it is necessary. It is ignored.

Element code 1 (PAD) is used to transmit large amounts of data with a message for test or padding purposes. No action is taken with this data but the count of dummy octets must be correct to indicate the next element code.

Element code 2 (BOOLEAN) is a boolean data element which has the value 1 for True and 0 for False.

Element code 3 (INDEX) is a 16-bit unsigned integer datum. Element code 3 occupies only 3 octets.

Element code 4 (INTEGER) is a signed 32-bit integer datum. This will always occupy five octets. Representation is two's complement.

Element code 5 (BITSTR) is a bit string element for binary data. The bit string is padded on the right with zeros to fill out the last octet if the bit string does not end on an octet boundary. This data type must have the bit-count in the two octet count field instead of the number of octets.

Element code 6 (TEXT) is used for the representation of text. Seven bit ASCII characters are used, right justified in the octet. The high order bit in the octet is zero.

Element code 7 (LIST) can be used to create structures composed of other elements. The item-count contains the number of elements which follow. Any element may be used including List itself. The octet count specifies the number of octets in the whole list. A null or empty List, one with no elements, has an item-count of zero (0).

Element code 8 (PROPLIST) is the Property-List element. It has the following form:

+------+------+------+------+------+
! 8 ! octet ! pair !
! ! count ! count!
+------+------+------+------+------+
+------+------+------+---------+---------+
! name ! value ! name ! value !
repeated ! count! count ! ...! ...!
+------+------+------+---------+---------+

The Property-List structure consists of a set of unordered name/value pairs. The pairs are a one octet name count and a two octet value count followed by the name and value strings. The counts specify the length in octets of the name and value strings. Each string has a length in octets which agrees with its respective count. The count of octets until the next pair in the property list is 1 + 2 + name count + value count octets. The entire Property-List is of course equal in length to the octet count of the element itself. Immediately following the octet count for the entire element is a one octet pair count field which contains the total number of name/value pairs in the Proplist.