📄 rfc759.txt
字号:
August 1980
Internet Message Protocol
Specification
MPM-Identifier
The internetwork address of the MPM. This may be the ARPA Internet
Address or an X.121 Public Data Network Address [29]. The
mpm-identifier is a property list which has one <name,value> pair.
This unusual structure is used so that it will be easy to determine
the type of address used.
Network
This character string name of a network.
Operation
This names the operation or procedure to be performed. It is a
character string name.
Organization
This character string name of a organization.
Phone
This character string name representation of a phone number. For
example the phone number of ISI is 1 (international region) + 213
(area code) + 822 (central office) + 1511 (station number) =
12138221511.
Port
This names the port or subaddress within a host of the MPM. The
default port for the MPM is 45 (55 octal) [4].
Reference
The reference is an identification from an earlier message.
State
The character string name of a state.
Postel [Page 25]
August 1980
Internet Message Protocol
Specification
Trace
Each MPM that handles the message must add its handling-stamp to
this list. This will allow detection of messages being sent in a
loop within the internet mail system, and aid in fault isolation.
Trail
When a message is sent through the internetwork environment, it
acquires this trace, a list of MPMs that have handled the message.
This list is then carried as the trail in a reply or acknowledgment
of that message. Requests and replies always have a trace and each
MPM adds its handling-stamp to this trace. Replies, in addition,
have a trail which is the complete trace of the original message.
Transaction Number
This is a number which is uniquely associated with this transaction
by the originating MPM. It identifies the transaction. (A
transaction is a message and acknowledgment.) A transaction number
must be unique during the time which the message (a request or
reply) containing it could be active in the network.
Type-of-Service
A service parameter for the delivery of a message, for instance a
message could be delivered (REGULAR), forwarded (FORWARD), turned
over to general delivery (GENDEL) (i.e., allow a person to decide
how to further attempt to deliver the message), or require priority
handling (PRIORITY).
User
The character string name of a user.
X121 Address
This identifies a host in the Public Data Network environment. When
used as a part of identifier, it identifies the originating host of
a message. The X121 address is a sequence of up to 14 digits [29].
For use in the MPMs the X121 address is represented in decimal
digits.
[Page 26] Postel
August 1980
Internet Message Protocol
Specification
Zip Code
The character string representation of a postal zip code. The zip
code of ISI is 90291.
3.7. Data Elements
The data elements defined here are similar to the data structure and
encoding used in NSW [30].
Each of the diagrams which follow represent a sequence of octets.
Field boundaries are denoted by the "|" character, octet boundaries by
the "+" character. Each element begins with a one-octet code. The
order of the information in each element is left-to-right. In fields
with numeric values the high-order (or most significant) bit is the
left-most bit. For transmission purposes, the leftmost octet is
transmitted first. Cohen has described some of the difficulties in
mapping memory order to transmission order [31].
Code Type Representation
---- ---- --------------
+------+
0 No Operation | 0 |
+------+
+------+------+------+------+------
1 Padding | 1 | octet count | Data ...
+------+------+------+------+------
+------+------+
2 Boolean | 2 | 1/0 |
+------+------+
+------+------+------+
3 Index | 3 | Data |
+------+------+------+
+------+------+------+------+------+
4 Integer | 4 | Data |
+------+------+------+------+------+
Postel [Page 27]
August 1980
Internet Message Protocol
Specification
Extended +------+------+------+------+------
5 Precision | 5 | octet count | Data ...
Integer +------+------+------+------+------
+------+------+------+------+------
6 Bit String | 6 | bit count | Data ...
+------+------+------+------+------
+------+------+------
7 Name String | 7 | count| Data ...
+------+------+------
+------+------+------+------+------
8 Text String | 8 | octet count | Data ...
+------+------+------+------+------
+------+------+------+------+-----
9 List | 9 | octet count | Data ...
+------+------+------+------+-----
+------+------+------+------+------
10 Proplist | 10 | octet count | Data ...
+------+------+------+------+------
+------+
11 End of List | 11 |
+------+
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. The type-octet is followed by a
three-octet count of the number of octets to follow. 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. The octet
following the type-octet has the value 1 for True and 0 for False.
[Page 28] Postel
August 1980
Internet Message Protocol
Specification
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 (EPI) is an extended precision integer. The type octet
is followed by a three-octet count of the number of data octets to
follow. Representation is two's complement.
Element code 6 (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 three-octet count field instead of
the number of octets.
Element code 7 (NAME) is used for the representation of character
string names (or other short strings). The type octet is followed by
a one-octet count of the number of characters (one per octet) to
follow. Seven bit ASCII characters are used, right justified in the
octet. The high order bit in the octet is zero.
Element code 8 (TEXT) is used for the representation of text. The
type octet is followed by a three-octet count of the number of
characters (one per octet) to follow. Seven bit ASCII characters are
used, right justified in the octet. The high order bit in the octet
is zero.
Element code 9 (LIST) can be used to create structures composed of
other elements. The three-octet octet count specifies the number of
octets in the whole list (i.e., the number of octets following this
count field to the end of the list, not including the ENDLIST octet).
The two-octet item count contains the number of elements which follow.
Any element may be used including list itself.
+------+------+------+------+------+------+
| 9 | octet count | item count |
+------+------+------+------+------+------+
+------+------/---+
repeated | element |
+------+------/---+
+-------+
|ENDLIST|
+-------+
In some situations it may not be possible to know the length of a list
Postel [Page 29]
August 1980
Internet Message Protocol
Specification
until the head of it has been transmitted. To allow for this a
special ENDLIST element is defined. A list of undetermined length is
transmitted with the octet count cleared to zero, and the item count
cleared to zero. A null or empty List, one with no elements, has an
octet count of two (2) and an item count of zero (0). The ENDLIST
element always follows a LIST, even when the length is determined.
Element code 10 (PROPLIST) is the Property List element. It is a
special case of the list element, in which the elements are in pairs
and the first element of each pair is a name. It has the following
form:
+------+------+------+------+------+
| 10 | octet count | pair |
+------+------+------+------+------+
+------+------/---+------+------/---+
repeated | name element | value element |
+------+------/---+------+------/---+
+-------+
|ENDLIST|
+-------+
The Property List structure consists of a set of unordered
<name,value> pairs. The pairs are composed of a name which must be a
NAME element and a value which may be any kind of element. Following
the type code is a three-octet octet count of the following octets.
Following the octet count is a one-octet pair count of the number of
<name,value> pairs in the property list.
The name of a <name,value> pair is to be unique within the property
list, that is, there shall be at most one occurrence of any particular
name in one property list.
In some situations it may not be possible to know the length of a
property list until the head of it has been transmitted. To allow for
this the special ENDLIST element is defined. A property list of
undetermined length is transmitted with the octet count cleared to
zero, and the pair count cleared to zero. A null or empty property
list, one with no elements, has an octet count of one (1) and an pair
count of zero (0). The ENDLIST element always follows a property
list, even when the length is determined.
Element code 11 (ENDLIST) is the end of list element. It marks the
end of the corresponding list or property list.
[Page 30] Postel
August 1980
Internet Message Protocol
Specification
Structure Sharing
When messages are batched in message-bags for transmission, it may
often be the case that the same document will be sent to more than
one recipient. Since the document portion can usually be expected
to be the major part of the message, much repeated data would be
sent if a copy of the document for each recipient were to be shipped
in the message-bag.
To avoid this redundancy, messages may be assembled in the
message-bag so that actual data appears on its first occurrence and
only references to it appear in later occurrences. When data is
shared, the first occurrence of the data will be tagged, and later
locations where the data should appear will only reference the
earlier tagged location. All references to copied data point to
earlier locations in the message-bag. The data to be retrieved is
indicated by the tag.
This is a very general sharing mechanism. PLEASE NOTE THAT THE MPM
WILL NOT SUPPORT THE FULL USE OF THIS MECHANISM. THE MPM WILL ONLY
SUPPORT SHARING OF WHOLE DOCUMENTS. No other level of sharing will
be supported by the MPMs.
This sharing mechanism may be used within a document as long as all
references refer to tags within the same document.
Sharing is implemented by placing a share-tag on the first
occurrence of the data to be shared, and placing a share-reference
at the locations where copies of that data should occur.
+------+------+------+
12 Share Tag | 12 | share-index |
+------+------+------+
+------+------+------+
13 Share Reference | 13 | share-index |
+------+------+------+
Element code 12 (S-TAG) is a share tag element. The two octets
following the type-octet specify the shared data identification code
for the following data element. Note that s-tag is not a DATA
element, in the sense that data elements encode higher level
objects.
Element code 13 (S-REF) is a share
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -