www.pragsoft.com Chapter 7: The Presentation Layer
93
•
Indefinite Form
. This is one octet long and the octet has the fixed value 10000000. End of the contents field which may have an arbitrary length is
denoted by two consecutive zero octets i.e., 00000000 00000000. This length form is only available to structured elements.
The contents field of a data element is encoded according to the data type. Figure 7.80 summarizes the encoding used for the built-in simple types. Contents
encoding for values of structured types uses structured elements. For a sequence, for example, each sequence element is encoded as a data element within a structured
element.
Figure 7.80 Encoding of the contents field of a data element. Built-in Type
Contents Encoding
BOOLEAN FALSE = all bit zero, TRUE = at least one bit non-zero.
INTEGER 2’s complement binary number.
REAL Encoded as a sign bit and three separate integer quantities: base,
mantissa, and exponent i.e., scientific notation. BIT STRING
Zero or more bits. The left-most octet denotes the number of unused bits in the last octet.
OCTET STRING zero or more octets.
ENUMERATED Individual items encoded as sequenced INTEGER values.
NULL Has no contents.
7.3. Presentation Protocol
The presentation protocol is very similar to the session protocol and the Presentation Protocol Data Units
PPDUs differ from their corresponding SPDUs only in a few minor details. The only real major protocol addition at the
presentation layer is the ability to negotiate the defined context set, both at connection time and during data transfer.
Defined context set negotiation involves a presentation service user proposing a set of abstract syntaxes, for each of which one or more transfer syntaxes is also
proposed. Each ‘abstract syntax + transfer syntaxes’ pair is identified by a context identifier
. The peer service user individually accepts or rejects each of the pairs. For each accepted pair, it also selects one of the proposed transfer syntaxes. This
identifies a set of presentation contexts and establishes the defined context set. Because there may be more than one presentation context in the defined context
set, each data transfer is tagged with the context identifier of the presentation context to which it conforms. The receiving end uses this tag to determine how to decode the
data.
94 Communication Networks
Copyright © 2005 PragSoft
7.4. Presentation Standards
Presentation services discussed in Section 7.1 are defined by the ISO 8822 and CCITT X.216 standards. ISO 8823 and CCITT X.226 define the presentation
protocol, and were the basis of the discussions in Section 7.3. ASN.1 is defined by the ISO 8824 and CCITT X.208 standards. ISO 8825 and CCITT X.209 describe
the BER component of ASN.1.
7.5. Further Reading
General descriptions of the presentation layer and related protocols can be found in Tanenbaum 1989, Martin 1990, Stamper 1991, and Stallings 1994. Black
1989 and Dickson and LLoyd 1992 contain useful introductions to ASN.1.
www.pragsoft.com Chapter 8: The Application Layer
95
8. The Application Layer
The application layer is comprised of a variety of standards, each of which provides a set of useful services for the benefit of end-user applications. Only those services
which can be provided in a system-independent fashion are subject to standardization. These include: virtual terminal handling, message handling, file
transfer, job transfer, and many others.
Describing all existing application layer standards is beyond the scope of this book, as they are numerous and detailed. This chapter will look at a few of such
standards. The aim is to illustrate the flavor of the services provided rather than provide an exhaustive coverage of the standards.
We will first discuss application services, and explain some of the relevant terminology. Then we will describe two groups of application service elements. The
first group is commonly used by other application service elements. The second group addresses very specific requirements. Finally, we will list a number of
application layer standards.
8.1. Application Services
Depending on their scope of use, application services may be divided into two broad categories:
•
General, low-level services which are used by most applications. This group includes three sets of services: association control, reliable transfer, and remote
operations. They are further described in section 8.2.
•
Specific, high-level services which are designed to support task-oriented application requirements. Examples include: virtual terminal handling, message
handling, and file transfer. These directly utilize the general application services, and are further described in Sections 8.3-5.
User applications should make as much use of the above services as possible so that they can benefit from the standardizations. A user application can be imagined as
consisting of two parts: i a standardized part, called Application Entity AE, which is immersed in the application layer and is implemented in terms of the
application layer services, and ii a non-standard part, called Application Process AP, which remains outside the scope of the application layer. Typically, the
application entity deals with the inter-application communication, and the application