RFC841 - Specification for message format for Computer Based(3)

时间:2005-02-11 来源: 作者: 点击:
16 8 This data element contains any series of data elements. Sequence differs from Set in that the data elements making up the Data Element Contents must be considered as an ordered sequence (accordi
  
16 8
This data element contains any series of data elements.
Sequence differs from Set in that the data elements
making up the Data Element Contents must be considered
as an ordered sequence (according to their order of
appearance in the sequence.)

+--------+---//---+---//---+
|P0001010|Lxxxxxxx|elements|
+--------+---//---+---//---+

Set (OPTIONAL) 0B 013
16 8
This data element contains any series of data elements
with no ordering of the elements implied. (Sequence
provides an ordered series.) Although the data
elements contained in a Set must be stored
sequentially, the order in which they are stored is not
defined and not processed.

+--------+---//---+---//---+
|P0001011|Lxxxxxxx|elements|
+--------+---//---+---//---+

Unique-ID (OPTIONAL) 09 011
16 8
This data element is a unique identifier. It need not
be human-readable. The Data Element Contents may be an
ASCII-String, a Bit-String, or an Integer.

+--------+---//---+---//---+
|P0001001|Lxxxxxxx| element|
+--------+---//---+---//---+

4.3.1.3 Data Elements that Extend this Specification

There are two data elements that are used to extend this
specification. They can be classified as either primitive or
constructor data elements, depending on the extension.

52

Section 4.3.1.3

Extension (OPTIONAL) 7E 176
16 8
This data element is used to extend the number of
available data elements beyond the 128 that are
possible using a 7-bit identifier. A Qualifier
component extends the encoding space for identifiers.
(Extension and Vendor-Defined have the same syntax.)

+--------+---//---+---//---+---//---+
|P1111110|Lxxxxxxx|Qxxxxxxx|Anything|
+--------+---//---+---//---+---//---+

Vendor-Defined (OPTIONAL) 7F 177
16 8
This data element is used to represent vendor- and
user-defined data elements. A Qualifier component
extends the encoding space for identifiers. The
Qualifier component is not guaranteed to be unique
among all interconnected systems. This data element is
interpreted according to prior agreement between
systems. (Extension and Vendor-Defined data elements
have the same syntax.)

+--------+---//---+---//---+---//---+
|P1111111|Lxxxxxxx|Qxxxxxxx|Anything|
+--------+---//---+---//---+---//---+

4.3.2 Using data elements within message fields

The Data Element Contents of a particular field in a message
must contain at least one data element. The types of data
elements that can appear in the Data Element Contents of a field
are restricted according to what kind of field it is. Appendix A
(the master reference appendix for fields) defines which data
elements are valid as the Contents for each of the fields.

Some fields have a Data Element Contents that contains
"originators" or "recipients." No data element represents the
identities of originators or recipients (because that encoding is
not within the scope of this message format specification.)
These descriptions simply list "originators" or "recipients",
implying no restrictions on how the identifiers for originators
or recipients are represented.

53

Section 4.3.3

4.3.3 Properties and associated elements

This message format specification defines two properties.

Comment 01 001
16 8
This property may contain any series of data elements;
it most commonly contains one or more ASCII-Strings.

Printing-Name 02 002
16 8
This property contains one ASCII-String. In this case,
the ASCII-String may contain only the printing ASCII
characters plus the "space" character.

4.3.4 Encryption identifiers

This message format specification defines two encryption
identification codes.

Unspecified 00 000
16 8
Use of this encryption identifier as part of the
Encrypted data element indicates that the encryption
method being used was not specified for inclusion as
part of the data element.

FIPS-Standard 01 001
16 8
Use of this encryption identifier as part of the
Encrypted data element indicates that the Federal
Information Processing Standard method for data
encryption was [NatB-77].

4.3.5 Compression identifiers

This message format specification defines one compression
identification code for use with the Compressed data element.

Unspecified 00 000
16 8
Use of this compression identifier as part of the
Compressed data element indicates that the compression
method being used was not specified for inclusion as
part of the data element.

54

Section 4.3.6

4.3.6 Message types

This message format specification defines message type (MID)
codes for use in classifying the type of a message. The message
type could be confused with the message identifier in the
Message-Id field; they are completely distinct concepts.

FIPS-Standard 01 01
16 8
This message type marks messages defined by this
message format specification.

55

SUMMARY OF APPENDIXES

Appendix A Defines the fields in the message format specifi-
cation. This alphabetical appendix is for reference
use by implementors. It contains semantic
definitions of fields from Section 3.1. It also
defines Field Identifier values and specifies which
data elements are valid as the Contents for each of
the fields.

Appendix B Defines the data elements in the message format
specification. This alphabetically ordered appendix
is for reference use by implementors. It consol-
idates information from Section 4.3.

Appendix C Provides a reference table listing the data elements
in numerical order by their identifier octets.

Appendix D Provides a reference table summarizing the components
of messages according to whether they are required or
optional for CBMSs implementing the specification.

Appendix E Provides a reference table organizing the message
components according to the functional class of the
components.

Appendix F Provides an overview of the syntactic elements
defined by this message format specification.

Appendix G Summarizes syntactic elements according to whether
they are required or optional for a CBMS implementing
the message format specification.

Appendix H Examples of each syntactic element displaying their
syntax and describing their associated semantics.

56

Appendix A

APPENDIX A
FIELDS -- IMPLEMENTORS' MASTER REFERENCE

This appendix defines all of the fields in the message
format specification for reference use by implementors. It
contains semantics definitions of fields from Section 3.1. It
also defines Field Identifier values and which data elements are
valid as the Contents for each of the fields. The field
definitions appear alphabetically.

Each field in the list has the following form:

------------------------------------------------------------

Field Name Compliance identifier identifier
value value
16 8

Description of the field semantics. Names of
data elements that are valid in the Data Element
Contents of this kind of field.

------------------------------------------------------------

Attachments OPTIONAL 08 010
16 8
This field contains additional data accompanying a
message. It is similar in intent to enclosures in a
conventional mail system. Contents of this field are
unrestricted.

Author OPTIONAL 0C 014
16 8
This field identifies the individual(s) who wrote the
primary contents of the message. Use of the Author
field is discouraged when the contents of the Author
field and the From field would be completely redundant.
This field contains one or more originator identities.

57

Appendix A

Bcc OPTIONAL 0D 015
16 8
This field identifies additional recipients for a
message (a "blind carbon copies list"). The contents
of this field are not to be included in copies of the
message sent to the primary and secondary recipients.
See section 3.2.1 for further discussion of the use of
blind carbon copies lists. This field contains one or
more recipient identities.

Cc BASIC 06 006
16 8
This field identifies secondary recipients for a
message (a "carbon copies" list). This field contains
one or more recipient identities.

Circulate-Next OPTIONAL 0E 016
16 8
This field is used in conjunction with the Circulate-To
field. (See Section 3.2.6.1 for further discussion.)
It identifies all recipients in a circulation list who
have not yet received the message. This field contains
one or more recipient identities.

Circulate-To OPTIONAL 0F 017
16 8
This field identifies recipients for a circulated
message. (See Section 3.2.6.1 for further discussion.)
It is used in conjunction with the Circulate-Next
field. This field contains one or more recipient
identities.

Comments OPTIONAL 10 020
16 8
This field permits adding comments onto the message
without disturbing the original contents of the
message. While the Comments field will usually contain
one or more ASCII-Strings, there are no restrictions on
its contents.

Date OPTIONAL 11 021
16 8
This field contains a date that the message's
originator wishes to associate with a message. The
Date field is to the Posted-Date field as the date on a
letter is to the postmark added by the post office.
This field contains one Date.

58

Appendix A

End-Date OPTIONAL 12 022
16 8
This field contains the date on which a message loses
effect. (See also Section 3.2.5 for further
discussion.) This field contains one Date.

From REQUIRED 01 001
16 8
This field contains the identity of the originators
taking formal responsibility for this message. The
contents of the From field is to be used for replies
when no Reply-to field appears in a message. This
field contains one or more originator identities.

In-Reply-To OPTIONAL 13 023
16 8
This field designates previous correspondence to which
this message is a reply. The usual contents of this
field would be the contents of the Message-ID field of
the message(s) being replied to. This field contains
one or more Unique-IDs or ASCII-Strings.

Keywords OPTIONAL 14 024
16 8
This field contains keywords or phrases for use in
retrieving a message. This field contains one or more
ASCII-Strings. (Each keyword or phrase is represented
by a separate ASCII-String.)

Message-Class OPTIONAL 15 025
16 8
This field indicates the purpose of a message. For
example, it might contain values indicating that the
message is a memorandum or a data-base entry. This
field contains one data element, an ASCII-String.

Message-ID OPTIONAL 16 026
16 8
This field contains a unique identifier for a message.
This identifier is intended for machine generation and
processing. Further definition appears in Section
3.2.4.1. Only one Message-ID field is permitted in a
message. This field contains one data element, a
Unique-ID.

Obsoletes OPTIONAL 26 046
16 8
This field identifies one or more messages that this
one supplants. This field contains at least one
Unique-ID and may contain more than one.

59

Appendix A

Originator-Serial-Number OPTIONAL 17 027
16 8
This field contains one or more serial numbers assigned
by the message's originator. (Messages with multiple
recipients should all have the same value in the
Originator-Serial-Number field. This field contains
one or more ASCII-Strings. (One ASCII-String is used
for each serial number.)

Posted-Date REQUIRED 02 002
16 8
This field contains the posting date, which is the
point in time when the message passes through the
posting slot into a message transfer system. Only one
Posted-Date field is permitted in a message. This
field contains one Date.

Precedence OPTIONAL 18 030
16 8
Ordinarily, message precedence or priority is a service
request to a message transfer system. A message
originator, however, can include precedence information
in a message. This field indicates the precedence at
which the message was posted. One example of a
precedence scheme is the US Military categories
"ROUTINE", "PRIORITY", "IMMEDIATE", "FLASH OVERRIDE",
and "EMERGENCY COMMAND PRECEDENCE". This field
contains one ASCII-String.

Received-Date OPTIONAL 19 031
16 8
This field is also called Delivery date. It may be
added to a message by the recipient's message receiving
program. It indicates when the message left the
delivery system and entered the recipient's message
processing domain. This field contains one Date.

Received-From OPTIONAL 1A 032
16 8
This field contains a record of a message's path
through a message transfer system. The
recipient's message receiving program may store any
such information that it obtains from a message
transfer system in this field. The contents of this
field are unrestricted.

60

Appendix A

References OPTIONAL 20 040
16 8
This field identifies other correspondence that this
message references. If the other correspondence
contains a Message-ID field, the contents of the
References field must be the message identifier. This
field contains one or more Unique-IDs or ASCII-Strings.

Reissue-Type OPTIONAL 25 045
16 8
This field is used in conjunction with message
encapsulating (see Section 3.2.2) to differentiate
between messages being assigned or redistributed. This
field contains one data element, usually an ASCII-
String.

Reply-To BASIC 03 003
16 8
This field identifies any recipients for replies to the
message. This field contains one or more recipient
identities.

Sender OPTIONAL 22 042
16 8
This field identifies the agent who sent the message.
It is intended either for when the sender is not the
originator responsible for the message or to indicate
who among a group of originators responsible for the
message actually sent it. Use of the Sender field is
discouraged when the contents of the Sender field and
From field would be completely redundant. Only one
Sender field is permitted in a message. This field
contains one originator identity.

Start-Date OPTIONAL 23 043
16 8
This field contains the date on which a message takes
effect. (See Section 3.2.5 for further discussion.)
This field contains one Date.

Subject BASIC 07 007
16 8
This field contains whatever information the originator
provided to summarize or indicate the nature of the
message. This field contains one or more ASCII-
Strings.

Text BASIC 04 004
16 8
This field contains the primary content of the message.
Contents of this field are unrestricted.

61

Appendix A

To REQUIRED 05 005
16 8
This field identifies primary recipients for a message.
This field contains one or more recipient identities.

Warning-Date OPTIONAL 24 044
16 8
This field is used either alone or in conjunction with
an End-Date field. It contains one or more dates.
These dates could be used by a message processing
program as warnings of an impending end-date or other
event. (See Section 3.2.5 for further discussion.)
This field contains one or more Dates.

62

Appendix B

APPENDIX B
DATA ELEMENTS -- IMPLEMENTORS' MASTER REFERENCE

The appendix defines all of the data elements in the message
format specification, for reference use by implementors. It
contains no new information but rather consolidates the syntactic
information from Section 4.3.

Each data element description has the following form.

-----------------------------------------------------------------

Data Element (Compliance) identifier identifier
Name ( Category ) octet octet
16 8

Constructive class (primitive or constructor)

Description of the syntax of the data element.

+---//---+
| | Diagram representing data element
+---//---+

-----------------------------------------------------------------

63

Appendix B

ASCII-String (BASIC) 02 002
16 8
primitive

This data element contains a series of ASCII characters
[NatB-80], each character right-justified in one
octet. For 7-bit ASCII characters, the most
significant bit of each octet must be 0.

Note: The ASCII code table can be extended through
standardized techniques [NatB-75] to introduce addi-
tional 7-bit or 8-bit characters or additional code
tables.

+--------+---//---+----//-----+
|P0000010|Lxxxxxxx|ASCII chars|
+--------+---//---+----//-----+

Bit-String (OPTIONAL) 43 103
16 8
primitive

This data element contains a series of bits. It uses
the Qualifier data element component to record the
number of bits of padding (as an 8-bit unsigned
integer) needed to fill the final octet of the Data
Element Contents to an even octet boundary. These
padding bits have no meaning and occur in the low order
bits of the final octet. The valid values for the
Qualifier component are 0 through 7. The number of
bits in the Data Element Contents is calculated from
the following formula.

8 * number of octets - value of
in the Data Qualifier component
Element Contents

+--------+---//---+---//---+---//---+
|P1000011|Lxxxxxxx|Qxxxxxxx| bits |
+--------+---//---+---//---+---//---+

64

Appendix B

Boolean (OPTIONAL) 08 010
16 8
primitive

This data element contains one octet whose value is
either true or false. False is represented by all bits
being 0; true is represented by all bits being 1
(although any non-zero value should be interpreted as
true).

+--------+---//---+--------+
|P0001000|Lxxxxxxx| T or F |
+--------+---//---+--------+

Compressed (OPTIONAL) 46 106
16 8
constructor

This data element must contain a Bit-String data
element. It is used to represent any data that has
been compressed; it may be used wherever its
uncompressed contents may appear. A Qualifier data
component appears in each Compressed data element; it
contains a compression identifier (CID) to identify the
compression algorithm used. (See Section 4.3.5.) The
Data Element Contents contains the product of the
compression process.

+--------+---//---+---//---+--------//--------+
|P1000110|Lxxxxxxx|Qxxxxxxx|Bit-String Element|
+--------+---//---+---//---+--------//--------+

Date (BASIC) 28 050
16 8
constructor

This data element contains an ASCII-String data
element, which is a representation of a date and time
formatted in accordance with FIPS PUBS 4 [NatB-68],
58 [NatB-79a], and 59 [NatB-79b]. The use of time and
time zone is optional. It is recommended that numeric
offsets be used to indicate time zone rather than
alphabetic abbreviations.

+--------+---//---+------//------+
|P0101000|Lxxxxxxx| ASCII-String |
+--------+---//---+------//------+

65

Appendix B

Encrypted (OPTIONAL) 47 107
16 8
constructor

This data element must contain a Bit-String. It is
used to represent any data that has been encrypted; it
may be used wherever its unencrypted contents may
appear. A Qualifier data component appears in each
Encrypted data element; it contains an encryption
identifier (EID) identifying the encryption algorithm
used. (See Section 4.3.4 for further discussion.) The
Data Element Contents is the product of the encryption
process.

+--------+---//---+---//---+--------//--------+
|P1000111|Lxxxxxxx|Qxxxxxxx|Bit-String Element|
+--------+---//---+---//---+--------//--------+

End-of-Constructor (BASIC) 01 001
16 8
primitive

This data element terminates the Data Element Contents
in a constructor data element that has indefinite
length. This data element has no Contents component.
(Use of this element is described in Section 4.2.2.1.)

+--------+---//---+
|P0000001|Lxxxxxxx|
+--------+---//---+

Extension (OPTIONAL) 7E 176
16 8
either

This data element is used to extend the number of
available data elements beyond the 128 that are
possible using a 7-bit identifier. A Qualifier
component extends the encoding space for identifiers.
(Extension and Vendor-Defined have the same syntax.)

+--------+---//---+---//---+---//---+
|P1111110|Lxxxxxxx|Qxxxxxxx|Anything|
+--------+---//---+---//---+---//---+

66

Appendix B

Field (BASIC) 4C 114
16 8
constructor

This data element uses a Qualifier data element
component. The Qualifier component contains a Field
Identifier (FID) indicating which specific field is
being represented. (See Section 4.3.2 for further
discussion.)

+--------+---//---+---//---+---//---+
|P1001100|Lxxxxxxx|Qxxxxxxx|elements|
+--------+---//---+---//---+---//---+

Integer (OPTIONAL) 20 040
16 8
primitive

This data element contains a 2's complement integer of
variable length, high-order octet first. It is
recommended that the data element contents be either 2
or 4 octets long whenever possible.

+--------+---//---+---//---+
|P0100000|Lxxxxxxx| Integer|
+--------+---//---+---//---+

Message (BASIC) 4D 115
16 8
constructor

This data element may contain Field or Message data
elements. Its Qualifier component contains a Message
type (MID) indicating the type of the message. (See
Section 4.3.6 for further discussion.) (The MID is
completely different from the message identifier in the
Message-ID field and should not be confused with it.)

+--------+---//---+---//---+
|P1001101|Lxxxxxxx|Qxxxxxxx|
+--------+---//---+---//---+

+--------//---------//---------//---------//--------+
| Field, Message, Encrypted, or Compressed Elements |
+--------//---------//---------//---------//--------+

67

Appendix B

No-Op (OPTIONAL) 00 000
16 8
primitive

This data element does nothing. No-Op is used whenever
it is necessary to include a data element that means
"no operation." It is a short placeholder.

+--------+---//---+
|P0000000|Lxxxxxxx|
+--------+---//---+

Padding (OPTIONAL) 21 041
16 8
primitive

This data element is used to fill any number of octets.
The contents of a Padding element are undefined and
convey no information.

+--------+---//---+---//---+
|P0100001|Lxxxxxxx|anything|
+--------+---//---+---//---+

Property-List (OPTIONAL) 24 044
16 8
constructor

This data element contains a series of Property data
elements to be associated with another data element.

+--------+---//---+-------//--------+
|P0100100|Lxxxxxxx|Property Elements|
+--------+---//---+-------//--------+

68

Appendix B

Property (OPTIONAL) 45 105
16 8
constructor

This data element uses a Qualifier data element
component. The Qualifier component contains
a Property-Identifier (PID) to indicate which specific
property is being represented. (See Section 4.3.3 for
further discussion.)

+--------+---//---+---//---+---//---+
|P1000101|Lxxxxxxx|Qxxxxxxx|elements|
+--------+---//---+---//---+---//---+

Sequence (OPTIONAL) 0A 012
16 8
constructor

This data element contains any series of data elements.
Sequence differs from Set in that the data elements
making up the Data Element Contents must be considered
as an ordered sequence (according to their order of
appearance in the sequence.)

+--------+---//---+---//---+
|P0001010|Lxxxxxxx|elements|
+--------+---//---+---//---+

Set (OPTIONAL) 0B 013
16 8
constructor

This data element contains any series of data elements
with no ordering of the elements implied. (Sequence
provides an ordered series.) Although the data
elements contained in a Set must be stored
sequentially, the order in which they are stored is not
defined and not processed.

+--------+---//---+---//---+
|P0001011|Lxxxxxxx|elements|
+--------+---//---+---//---+

69

Appendix B

Unique-ID (OPTIONAL) 09 011
16 8
constructor

This data element is a unique identifier. It need not
be human-readable. The Data Element Contents may be an
ASCII-String, a Bit-String, or an Integer.

+--------+---//---+---//---+
|P0001001|Lxxxxxxx| element|
+--------+---//---+---//---+

Vendor-Defined (OPTIONAL) 7F 177
16 8
either

This data element is used to represent vendor-defined
data elements. A Qualifier component extends the
encoding space for identifiers. The Qualifier
component is not guaranteed to be unique among all
interconnected systems. This data element is
interpreted according to prior agreement between
systems. (Extension and Vendor-Defined data elements
have the same syntax.)

+--------+---//---+---//---+---//---+
|P1111111|Lxxxxxxx|Qxxxxxxx|Anything|
+--------+---//---+---//---+---//---+

70

Appendix C

APPENDIX C
DATA ELEMENT IDENTIFIER OCTETS

Identifier Identifier Data Element Name

00 000 No-Op
01 001 End-of-Constructor
02 002 ASCII-String
08 010 Boolean
09 011 Unique-ID
0A 012 Sequence
0B 013 Set
20 040 Integer
21 041 Padding
24 044 Property-List
28 050 Date
43 103 Bit-String
45 105 Property
46 106 Compressed
47 107 Encrypted
4C 114 Field
4D 115 Message
7E 176 Extension
7F 177 Vendor-Defined

71

Appendix D

APPENDIX D
SUMMARY OF MESSAGE FIELDS BY COMPLIANCE CATEGORY

This appendix is for reference use. It contains no new
information, but rather abstracts from that presented in Section
3.1.

This appendix contains the message field names arranged
alphabetically within compliance category. (Appendix E orders
the field names within functional category.) Complete field
definitions appear in Appendix A.

Required fields must appear in a message. Basic fields must
be recognized and processed by all CBMS systems. Optional fields
need not be supported by a CBMS but, if supported, must be
processed according to the meanings defined by the message format
specification.

D.1 REQUIRED Fields

From
Posted-Date
To

D.2 BASIC Fields

Cc
Reply-To
Subject
Text

D.3 OPTIONAL Fields

Attachments
Author
Bcc
Circulate-Next
Circulate-To
Comments

72

Appendix D

Date
End-Date
In-Reply-To
Keywords
Message-Class
Message-ID
Obsoletes
Originator-Serial-Number
Precedence
Received-Date
Received-From
References
Reissue-Type
Sender
Start-Date
Warning-Date

73

Appendix E

APPENDIX E
SUMMARY OF MESSAGE SEMANTICS BY FUNCTION

This appendix is for reference use. It contains no new
information, but rather abstracts from that presented in Section
3.1.

This appendix contains the message field names arranged
alphabetically within functional class. (Appendix D orders the
field names within compliance class.) Complete field definitions
appear in Appendix A.

E.1 Circulation

Circulate-Next
Circulate-To

E.2 Cross-Referencing

In-Reply-To
Message-ID
Obsoletes
Originator-Serial-Number
References

E.3 Life Spans

End-Date
Start-Date
Warning-Date

E.4 Delivery System

Received-Date
Received-From

74

Appendix E

E.5 Miscellaneous Fields Used Generally

Attachments
Comments
Keywords
Message-Class
Precedence
Subject
Text

E.6 Reply Generation

Reply-To

E.7 Reissuing

Reissue-Type

E.8 Sending (Normal Transmission)

Author
Bcc
Cc
Date
From
Posted-Date
Sender
To

75

Appendix F

APPENDIX F
SUMMARY OF DATA ELEMENT SYNTAX

This appendix summarizes data element syntax by diagramming
the components of data elements. Detailed presentation of data
element syntax appears in Section 4.3.1.

In these diagrams, required components of a data element
appear as follows. (The double border signifies "required.")

+========+ +===//===+
| | | |
+========+ +===//===+
always one one or more
octet long octets long

Optional components of data elements are represented as
follows. (The single border signifies "not required.")

+--------+ +---//---+
| | | |
+--------+ +---//---+
always one one or more
octet long octets long

The first octet in a data element is the identifier octet.
In diagrams of data elements, all eight bits of the identifier
octet are always shown. Bits with fixed values show the fixed
values as 1s and 0s. Bits with variable values are shown as x's
and y's.

The first bit in an identifier octet is the P-bit. Its
value indicates whether a data element contains a property list.
(A P-bit value of 1 indicates the presence of a property list.)
The remaining seven bits contain the rest of the identifier.

Other octets in a data element belong to one of four
classes: Length Code, Qualifier, Property-List, and Contents.
In diagrams of syntax the data element components are labeled
according to their class.

76

Appendix F

Component Class Label

Length code Length
Qualifier Qual
Property-List P-List
Contents Contents

Data elements must follow this form.

+========+===//===+---//---+---//---+---//---+
|Pxxxxxxx| Length | Qual | P-List |contents|
+========+===//===+---//---+---//---+---//---+

The value of the Length component is the total number of octets
following the length code octet in the data element.

77

Appendix G

APPENDIX G
SUMMARY OF DATA ELEMENTS BY COMPLIANCE CATEGORY

Compliance categories for syntactic elements are basic and
optional. Every CBMS is required to recognize and process basic
elements. A CBMS is not required to process optional elements
although many are strongly recommended by the semantics.

This appendix summarizes data elements by listing them
according to their compliance category.

G.1 BASIC Data Elements

ASCII-String (primitive) 02 002
16 8
Date (constructor) 28 050
16 8
End-Of-Constructor (primitive) 01 001
16 8
Field (constructor) 4C 114
16 8
Message (constructor) 4D 115
16 8

G.2 OPTIONAL Data Elements

Bit-String (primitive) 43 103
16 8
Boolean (primitive) 08 010
16 8
Compressed (constructor) 46 106
16 8
Encrypted (constructor) 47 107
16 8
Extension (either) 7E 176
16 8
Integer (primitive) 20 040
16 8
No-Op (primitive) 00 000
16 8
Padding (primitive) 21 041
16 8

78

Appendix G

Property (constructor) 45 105
16 8
Property-List (constructor) 24 044
16 8
Sequence (constructor) 0A 012
16 8
Set (constructor) 0B 013
16 8
Unique-ID (constructor) 09 011
16 8
Vendor-Defined (either) 7F 377
16 8

79

Appendix H

APPENDIX H
EXAMPLES

This appendix presents at least one example for each of the
data elements defined in this message format specification. In
these examples, identifier octets are represented in binary form.
All other numbers are presented in hexadecimal. ASCII strings
are shown as characters rather than their numerical represen-
tation. Although this message format specification does not
define the syntax of names and addresses, message originators and
recipients are identified by their names. This does not imply
anything about how naming and addressing can or should be done;
it is simply a convenient way to identify message originators and
recipients in these examples.

H.1 Primitive Data Elements

This section contains an example of each of the primitive
data elements. Each example contains a short explanation and a
series of octets.

No-Op data element:

+--------+--------+
|00000000|00000000|
+--------+--------+

End-of-Constructor data element:

+--------+--------+
|00000001|00000000|
+--------+--------+

80

Appendix H

Boolean data element whose value is true:

+--------+--------+--------+
|00001000|00000001|11111111|
+--------+--------+--------+

Integer data element containing five octets of data. Its
value is 4,294,967,296 (decimal):

+--------+--------+--------+--------+--------+
|00100000| 0 5 | 0 1 0 0 0 0
+--------+--------+--------+--------+--------+

+--------+--------+
0 0 0 0 |
+--------+--------+

Padding data element containing three octets of padding.
The values of those three octets are meaningless:

+--------+--------+--------+--------+--------+
|00100001| 0 3 | F F F F F F |
+--------+--------+--------+--------+--------+

ASCII-String data element containing nine characters. Its
value is "Hi There.":

+--------+--------+---- ----+
|00000010| 0 9 |Hi There.|
+--------+--------+---- ----+

81

Appendix H

Bit-String data element containing 44 bits of data (((7-1) x
8) - 4). Six octets are used to hold those 44 bits. The last 4
bits in the final octet are padding and are therefore ignored.

Bit-String Length Spare
+--------+--------+--------+--------+--------+
|01000011| 0 7 | 0 4 | 0 A 3 B
+--------+--------+--------+--------+--------+

+--------+--------+--------+--------+
5 F 2 9 1 C D 0 |
+--------+--------+--------+--------+

H.2 Constructor Data Elements

This section contains an example of each of the constructor
data elements. Each example contains a short explanation and
then an annotated series of the data elements making up the
constructor.

Property-List data element containing one Property data
element. The property is Printing-Name and its value is
"Distribution":

Prop-List Length Property Length PID
+--------+--------+--------+--------+--------+
|00100100| 1 1 |01000101| 0 F | 0 2 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 0 C |Distribution|
+--------+--------+---- ----+

82

Appendix H

Printing-Name Property. The value of the Printing-Name is
"Distribution":

Property Length PID ASCII Length
+--------+--------+--------+--------+--------+
|01000101| 0 F | 0 2 |00000010| 0 C |
+--------+--------+--------+--------+--------+

+---- ----+
|Distribution|
+---- ----+

Compressed data element. Its contents were compressed using
an unspecified data compression algorithm. The compressed data
is in a bit-string that is 56 bits long, fully filling 7 octets:

Compressed Length CID Bit-String Length
+--------+--------+--------+--------+--------+
|01000110| 0 B | 0 0 |01000011| 0 8 |
+--------+--------+--------+--------+--------+

Spare
+--------+--------+--------+--------+
| 0 0 | 1 C 5 F 2 D
+--------+--------+--------+--------+

+--------+--------+--------+--------+
7 7 B A F 6 2 9 |
+--------+--------+--------+--------+

83

Appendix H

Encrypted data element. The encryption method used to
encrypt its contents has been intentionally not specified. This
element contains a Bit-String which contains 22 bits (((4-1) x 8)
- 2) of data. These 22 bits are represented in octets; the final
2 bits in the final octet are padding and are therefore ignored:

Encrypted Length EID Bit-String Length
+--------+--------+--------+--------+--------+
|01000111| 0 7 | 0 0 |01000011| 0 4 |
+--------+--------+--------+--------+--------+

Spare
+--------+--------+--------+--------+
| 0 2 | A 3 7 8 1 C |
+--------+--------+--------+--------+

Date data element. This example includes a date but no
time. The date shown in this example is August 15, 1980:

Date Length ASCII Length
+--------+--------+--------+--------+--- ---+
|00101000| 0 A |00000010| 0 8 |19800815|
+--------+--------+--------+--------+--- ---+

Unique-ID data element, which is represented as an Integer
data element whose value is 129 (decimal).

Unique-ID Length Integer Length
+--------+--------+--------+--------+--------+--------+
|00001001| 0 4 |00100000| 0 2 | 0 0 8 1 |
+--------+--------+--------+--------+--------+--------+

84

Appendix H

Sequence data element containing two ASCII-String data ele-
ments. The first ASCII-String is "This is" while the second
string is " a list":

Sequence Length ASCII Length
+--------+--------+--------+--------+--- ---+
|00001010| 1 2 |00000010| 0 7 |This is|
+--------+--------+--------+--------+--- ---+

ASCII Length
+--------+--------+--- ---+
|00000010| 0 7 | a list|
+--------+--------+--- ---+

Set data element containing two Integer data elements. The
first integer has a value of 519 (decimal) while the value of the
second is 71 (decimal). (These two values have no ordering
because they belong to a set.)

Set Length Integer Length
+--------+--------+--------+--------+--------+--------+
|00001011| 0 8 |00100000| 0 2 | 0 2 0 7 |
+--------+--------+--------+--------+--------+--------+

Integer Length
+--------+--------+--------+--------+
|00100000| 0 2 | 0 0 4 7 |
+--------+--------+--------+--------+

Field data element. The specific field shown is the Text
field with the contents "I will see you at lunch.":

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 B | 0 4 |00000010| 1 8 |
+--------+--------+--------+--------+--------+

+---- ----+
|I will see you at lunch.|
+---- ----+

85

Appendix H

Message containing four fields, Posted-Date, From, Text, and
To. It was sent on July 4, 1980 at 6 p.m. eastern daylight time.
It is from a person named Smith. The text of the message is a
question asking the recipient "Are you going to watch the
fireworks?". The message is sent to Jones:

Message Length Type Field Length
+--------+--------+--------+--------+--------+
|01001101| 5 A | 0 1 |01001100| 1 9 |
+--------+--------+--------+--------+--------+

FID Date Length ASCII
+--------+--------+--------+--------+
| 0 2 |00101000| 1 6 |00000010|
+--------+--------+--------+--------+

Length
+--------+---- ----+
| 1 4 |19800704-180000-0400|
+--------+---- ----+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 8 | 0 1 |00000010|
+--------+--------+--------+--------+

Length
+--------+-- --+
| 0 5 |Smith|
+--------+-- --+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 2 8 | 0 4 |00000010|
+--------+--------+--------+--------+

Length
+--------+
| 2 5 |
+--------+

+---- ----+
|Are you going to watch the fireworks?|
+---- ----+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 8 | 0 5 |00000010|
+--------+--------+--------+--------+

86

Appendix H

Length
+--------+-- --+
| 0 5 |Jones|
+--------+-- --+

H.3 Data Elements that Extend this Specification

This section contains examples of data elements used to
extend this specification. These data elements can be either
primitives or constructors, depending on the extension.
Extension data element containing a length code and 3
octets. The octet immediately following the length code iden-
tifies it as Extension Data Element 7. The Data Element Contents
is the final two octets. The interpretation of the Data Element
Contents would be defined in an extension or successor to this
message format specification. [Note: this is an example. Any
actual extension data element 7 (if it were ever used) would be
completely different from anything done here.]:

Extension Length
+--------+--------+--------+--------+--------+
|01111110| 0 3 | 0 7 | 4 A E 9 |
+--------+--------+--------+--------+--------+

Vendor-Defined data element containing a length code and 3
octets. The first octet identifies this as vendor-defined data
element number 114 (decimal), which this particular vendor has
defined to contain three printable ASCII characters in two
octets. (Data element 114 (decimal) for another user would be
completely different. For example, it might contain a floating
point number.):

User Length
+--------+--------+--------+--------+--------+
|01111111| 0 3 | 7 2 | P O E |
+--------+--------+--------+--------+--------+

87

Appendix H

H.4 Fields

This section contains examples of Field data element con-
structors for each of several different fields (Keywords, Text,
Subject, Vendor-Defined).
Field data element for keywords . The field contains two
keywords, Message and Computer, each represented in a separate
ASCII-string data element.

Field Length Keywords ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 4 | 1 4 |00000010| 0 7 |
+--------+--------+--------+--------+--------+

+--- ---+
|Message|
+--- ---+

ASCII Length
+--------+--------+--- ---+
|00000010| 0 8 |Computer|
+--------+--------+--- ---+

88

Appendix H

Field data element for Text with a Property-List data
element containing a comment attached. The text field contains
the ASCII-String data element "Do you want lunch?"; the Property-
List data element contains a comment property, which consists of
an ASCII-string data element containing "Now?":

Field Length Text Prop-List Length
+--------+--------+--------+--------+--------+
|11001100| 2 0 | 0 4 |00100100| 0 9 |
+--------+--------+--------+--------+--------+

Property Length PID ASCII
+--------+--------+--------+--------+
|01000101| 0 7 | 0 1 |00000010|
+--------+--------+--------+--------+

Length
+--------+- -+
| 0 4 |Now?|
+--------+- -+

ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |Do you want lunch?|
+--------+--------+---- ----+

Field data element for Subject containing an ASCII-String
data element ("Good restaurants in Detroit" followed by a
carriage return and a line feed). (A recipient would expect the
message to contain some information about restaurants in the
Detroit area.):

Field Length Subject ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 2 1 | 0 7 |00000010| 1 E |
+--------+--------+--------+--------+--------+

+---- ----+
|Good restaurants in Detroit.<cr><lf>|
+---- ----+

89

Appendix H

Field data element whose form and meaning was defined by a
vendor. This vendor has defined vendor-defined field 12
(decimal) to be a field with a printing name of "Reply-by" and
contents consisting of a date; January 7, 1981 in this case.
(The meaning of vendor-defined field 12 is unique to the vendor;
the same field number would have different meaning for other
vendors.):

Field Length Qualifier User number
+--------+--------+--------+--------+--------+
|11001100| 1 F | 8 2 | 0 0 0 C |
+--------+--------+--------+--------+--------+

Prop-List Length Property Length
+--------+--------+--------+--------+
|00100100| 0 E |01000101| 0 C |
+--------+--------+--------+--------+

PID ASCII Length
+--------+--------+--------+---- ----+
| 0 2 |00000010| 0 9 |Reply-By:|
+--------+--------+--------+---- ----+

Date Length ASCII Length
+--------+--------+--------+--------+
|00101000| 0 A |00000010| 0 8 |
+--------+--------+--------+--------+

+--- ---+
|19810107|
+--- ---+

H.5 Messages

This section contains several examples of complete messages
and shows the results of reissuing a message. (See Section
3.2.2.)

90

Appendix H

The following sample message had Stevens as its originator
and Johnson as its recipient. The message was sent on August 14,
1980 at 10 a.m. EDT. The subject of the message is "Project
Deadline" and the message is a reminder that the deadline is the
next day and that the section of the report for the project being
done by Johnson should be turned in to Stevens by 3 p.m. that
day.

Message Length Type
+--------+--------+--------+--------+
|01001101| 8 1 | B 6 | 0 1 |
+--------+--------+--------+--------+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 5 |00000010|
+--------+--------+--------+--------+

Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 1 |00000010|
+--------+--------+--------+--------+

Length
+--------+--- ---+
| 0 7 |Stevens|
+--------+--- ---+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 3 | 0 7 |00000010| 1 0 |
+--------+--------+--------+--------+--------+

+---- ----+
|Project Deadline|
+---- ----+

Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+

91

Appendix H

ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1000-0400|
+--------+--------+---- ----+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 6 D | 0 4 |00000010| 6 A |
+--------+--------+--------+--------+--------+

+----
|Don't forget the project report is
+----

due tomorrow. Please have<CrLf>

your section to me by three this

----+
afternoon.|
----+

The following example illustrates the results of reissuing
the first message in this section. This message contains the
original message (as a Message data element), To, From, and
Posted-Date fields, and a Reissue-Type field with Redistributed
as its value:

Message Length Type
+--------+--------+--------+--------+
|01001101| 8 1 | F C | 0 1 |
+--------+--------+--------+--------+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 9 | 0 5 |00000010|
+--------+--------+--------+--------+

Length
+--------+-- --+
| 0 6 |Cooper|
+--------+-- --+

92

Appendix H

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 1 |00000010|
+--------+--------+--------+--------+

Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+

Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1030-0400|
+--------+--------+---- ----+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 0 | 2 5 |00000010| 0 D |
+--------+--------+--------+--------+--------+

+---- ----+
|Redistributed|
+---- ----+

Message Length Type
+--------+--------+--------+--------+
|01001101| 8 1 | B 6 | 0 1 |
+--------+--------+--------+--------+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 5 |00000010|
+--------+--------+--------+--------+

Length
+--------+--- ---+
| 0 7 |Johnson|
+--------+--- ---+

Field Length FID ASCII
+--------+--------+--------+--------+
|01001100| 0 A | 0 1 |00000010|
+--------+--------+--------+--------+

93

Appendix H

Length
+--------+--- ---+
| 0 7 |Stevens|
+--------+--- ---+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
|01001100| 1 3 | 0 7 |00000010| 1 0 |
+--------+--------+--------+--------+--------+

+---- ----+
|Project Deadline|
+---- ----+

Field Length FID Date Length
+--------+--------+--------+--------+--------+
|01001100| 1 7 | 0 2 |00101000| 1 4 |
+--------+--------+--------+--------+--------+

ASCII Length
+--------+--------+---- ----+
|00000010| 1 2 |19800814-1000-0400|
+--------+--------+---- ----+

Field Length FID ASCII Length
+--------+--------+--------+--------+--------+
------分隔线----------------------------
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
最新评论 查看所有评论
发表评论 查看所有评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 密码: 验证码:
推荐内容