Session Layer Standards The Session Layer

84 Communication Networks Copyright © 2005 PragSoft

7. The Presentation Layer

Applications use a variety of forms of data, ranging in complexity from very simple e.g., textual to elaborate and complex e.g., nested data structures. Communication between applications involves the exchange of such data. However, all forms of data have inherent programming language and machine dependencies, which means that unless application data is accurately converted to a format acceptable by the peer application, the meaning of the data will be lost during transmission. The role of the presentation layer is to facilitate semantic-preserving data exchange between two peer applications. The presentation layer achieves this in two stages: i by having the two peer applications adopt a common high-level syntax for data definition, and ii by negotiating a transfer syntax for the sole purpose of transmission, which both applications can convert to and from. We will first look at the notion of abstract data syntax, and then describe presentation service primitives and functional units. ASN.1 will be presented as a standard abstract syntax definition notation for the use of applications, together with BER for defining data at the binary level. Use of ASN.1 and BER will be illustrated using some simple examples. Next, we will discuss the presentation protocol, and conclude by listing a number of presentation standards.

7.1. Presentation Services

The notion of syntax is central to understanding the presentation services. This is discussed below first, followed by a description of presentation service primitives and service functional units.

7.1.1. Syntax

Data is structured according to a set of rules, called syntax. Depending on their level of abstraction, syntax rules may be classified into two categories: abstract and concrete. Abstract syntax is a high-level specification of data which makes no assumptions about its machine representation. Abstract syntax describes the essential characteristics of data in general terms. Concrete syntax, on the other hand, is a low-level bit-level specification of data according to some specific machine representation. In general, a concrete syntax is derived from an abstract syntax by applying a set of encoding rules to the latter. It follows that there is a one-to-many www.pragsoft.com Chapter 7: The Presentation Layer 85 mapping between the abstract syntax of some data and its concrete syntaxes, that is, the same data can be represented in many different formats. For example, consider the following statement: An RGB color is defined as an object of three components red, green, and blue, each of which is an integer quantity. This is an example of an abstract syntax specification. It specifies the essential characteristics of an RGB color without saying anything about its representation in a computer. Some of the ways in which this data can be represented at a bit-level are shown in Figure 7.70. Format 1 uses a 16-bit signed integer quantity for representing each primary color, in a machine where bits are ordered left to right. Format 2 is identical to format 1, except that bits are ordered right to left. Formats 3 and 4 both use 8-bit unsigned integers with bits ordered left to right. However, in format 4, the primary colors appear in reverse order. Figure 7.70 Four alternate representation formats for an RGB color. Red Green Blue 16-bit signed integer bit 0 bit 7 bit 0 bit 7 Red Green Blue bit 0 bit 7 8-bit unsinged integer Red Green Blue 1 2 3 4 Red Green Blue 16-bit signed integer bit 0 bit 7 8-bit unsinged integer Error Objects cannot be created from editing field codes. Concrete syntax is essential wherever data is to be digitally stored or communicated. In general, each system has its own concrete syntax which may be different to the concrete syntax of other systems. Two communicating applications running on two such systems would have to convert their data into a common concrete syntax to facilitate transmission. We will use the terms application concrete syntax and transfer concrete syntax to distinguish between these two