CONTENTS Title Page Copyright Page Preface Part I 1 OSI Networking Concepts 1.1 The OSI Seven Layer Model 1.1.1 The Application Layer 1.1.2 Presentation Layer 1.1.2.1 Syntax Conversion 1.1.2.2 Presentation Context 1.1.2.3 More About Transfer Syntax 1.1.2.4 More About Abstract Syntax Notation 1.1.2.5 What an ASN.1 Compiler Does 1.1.3 Session Layer 1.1.3.1 Session Layer Services 1.2 Connections and Associations 1.2.1 Services 1.2.2 Phases of an Association 1.2.2.1 Setup and Negotiation 1.2.2.2 Data Exchange 1.2.2.3 Release or Abort 1.3 Types of Data 1.3.1 User Data 1.3.2 Capability Data 1.3.3 Expedited Data 1.3.4 Typed Data 1.4 OSI Information Exchange 1.4.1 Activities 1.4.1.1 Phases of an Activity 1.4.1.2 Relationship to Associations 1.4.2 Functional Units 1.4.2.1 Presentation Functional Units 1.4.2.2 Session Functional Units 1.4.3 Synchronization Points and Resynchronization 1.4.4 Tokens 1.4.5 Data Segmentation 1.5 Exception Reports 2 Introduction to the OSAK Interface 2.1 The Application Programming Interface 2.2 The ROSE API 2.3 The Session Programming Interface 2.4 The OSAK Parameter Block 2.4.1 Outbound Calls 2.4.2 Inbound Events 2.5 Management of User Buffers 2.6 Redirecting an Association 2.7 Outbound Addressing 2.7.1 Making a Connection to a Specified Application 2.7.2 Specifying Transport Templates 2.7.3 Specifying a Multi-Homed Address 2.8 Inbound Addressing 2.9 Segmentation Across the OSAK Interface 2.9.1 Segmentation at the Session Layer 2.10 OSAK Status Codes 2.10.1 The Status of a Call 2.10.2 Order of Completion of Calls Part II 3 Planning Your Application 3.1 Decision Checklist 3.2 Managing Memory 3.2.1 Deciding How Much Memory to Allocate 3.2.1.1 Deciding How Large to Make the Parameter Block Workspace 3.2.1.2 Deciding on the Size and Number of User Buffers 3.2.2 Deciding How to Reclaim Memory 3.2.3 Keeping Track of Buffers Used for Outbound Calls 3.2.4 Choosing Between Static and Dynamic Allocation of Memory 3.3 Considering Your Application's Addressing Needs 3.4 Choosing Between Single and Multiple Associations 3.5 Choosing Between Active and Passive Associations (OpenVMS Systems Only) 3.6 Making an Application Portable 3.7 Waiting to Receive Data 3.7.1 Advantages and Disadvantages of Asynchronous and Synchronous Notification 4 Using the API 4.1 Writing an OSAK Application 4.2 Using Parameter Blocks 4.2.1 Preparing to Construct a Parameter Block 4.2.2 Constructing a Parameter Block 4.2.3 Presentation PCI and ACSE-PCI Syntaxes 4.3 Building a User Buffer 4.4 Setting Up an Association 4.4.1 Getting an Identifier for the Association 4.4.2 Passing Buffers to the OSAK Interface 4.4.3 Preparing to Receive and Examining Inbound Events 4.4.3.1 Polling and Blocking 4.4.3.2 Asynchronous Event Notification (OpenVMS only) 4.4.3.3 Using the Request Mask in the osak_select Routine 4.4.3.4 Examining Incoming Data Units 4.4.4 Requesting an Association and Responding to a Request 4.5 Sending Data 4.6 Releasing an Association 4.6.1 Issuing the Release Request 4.6.2 Responding to a Release Request 4.6.3 Closing the Port 4.7 Reclaiming Memory 4.8 Redirecting an Association 4.9 Linking on Digital UNIX Systems 4.10 Linking on ULTRIX Systems 4.11 Linking on OpenVMS Systems 4.12 Using Abstract Syntax Notation 4.12.1 Using an ASN.1 Compiler 4.12.2 Notes on Using Another Method of Encoding 5 Using the ROSE API 5.1 Functions Provided by the ROSE Programming Interface 5.1.1 The ROSE Parameter Block 5.1.1.1 ROSE Parameter Block Before and After Decoding 5.1.1.2 Structure of an APDU Containing ROSE Data 5.2 Making the Definitions for a ROSE-Based Application 5.2.1 Mandatory Definitions 5.2.2 Optional Definitions 5.3 Writing a ROSE-Based ASE 5.3.1 Considerations for Both the Client and the Server 5.3.2 Implementing the Client 5.3.3 Implementing a ROSE Server 5.4 Linking on Digital UNIX Systems 5.5 Linking on ULTRIX Systems 5.6 Linking on OpenVMS Systems 5.7 Using Abstract Syntax Notation 5.7.1 Using an ASN.1 Compiler 5.7.1.1 Notes on Using Another Method of Encoding 6 Using the SPI 6.1 Writing an OSAK Application 6.2 Using Parameter Blocks 6.2.1 Preparing to Construct a Parameter Block 6.2.2 Constructing a Parameter Block 6.3 Building a User Buffer 6.4 Setting Up a Connection 6.4.1 Getting an Identifier for the Connection 6.4.2 Passing Buffers to the OSAK Interface 6.4.3 Preparing to Receive and Examining Inbound Events 6.4.3.1 Polling and Blocking 6.4.3.2 Asynchronous Event Notification (OpenVMS only) 6.4.3.3 Using the Request Mask in the spi_select Routine 6.4.3.4 Examining Incoming Data Units 6.4.4 Requesting a Connection and Responding to a Request 6.5 Sending Data 6.6 Releasing a Connection 6.6.1 Issuing the Release Request 6.6.2 Responding to a Release Request 6.6.3 Closing the Port 6.7 Reclaiming Memory 6.8 Redirecting a Connection 6.9 Linking on Digital UNIX Systems 6.10 Linking on OpenVMS Systems Part III 7 Introduction to OSAKtrace 7.1 The Components of OSAKtrace 7.2 What OSAKtrace Captures 7.3 OSAKtrace Output 7.3.1 Output from the Trace Emitter 7.3.2 Output from the Trace Analyzer 8 Using OSAKtrace 8.1 Using the Trace Utility 8.2 Enabling OSAKtrace 8.2.1 Enabling Tracing by Defining a Logical Name or an Environment Variable 8.2.2 Enabling Tracing Through the Programming Interface 8.3 Running the OSAKtrace Analyzer 8.3.1 Default Options 8.3.2 Examples 8.3.3 Interpreting the OSAKtrace Analysis File 9 Interpreting OSAKtrace Output 9.1 Layout of a Trace Text File 9.2 Rules for the Display of User Data 9.3 Layout of Headers-Only Transport and Session Trace Data A Standards Information A.1 Protocol Specifications (ISO Standards) A.2 Service Definitions (ISO Standards) A.3 Abstract Syntax Notation (ISO Standards) A.4 ROSE Documents (CCITT Recommendations) A.5 NIST Agreements A.6 Ordering Documents B PresentationAddress Data Type Used in Network Management EXAMPLES 4-1 Constructing a Parameter Block 4-2 Code for Calling osak_give_buffers 4-3 Code for Reusing Buffers 4-4 Code for Calling osak_select 4-5 Code for Calling osak_assoc_req 4-6 Code for Calling osak_accept_rsp 4-7 Code for Calling osak_release_req 4-8 Code for Calling osak_release_rsp 4-9 Code for Calling osak_get_event After Releasing an Association 5-1 Structure of an APDU 6-1 Constructing a Parameter Block 6-2 Code for Calling spi_give_buffers 6-3 Code for Reusing Buffers 6-4 Code for Calling spi_select 6-5 Code for Calling spi_connect_req 6-6 Code for Calling spi_accept_rsp 6-7 Code for Calling spi_release_req 6-8 Code for Calling spi_release_rsp 6-9 Code for Calling spi_get_event After Releasing a Connection 9-1 Introductory Lines 9-2 DCS Table 9-3 Analysis of a TSDU 9-4 Headers-Only Transport and Session Trace Data FIGURES 1-1 The OSI Seven Layer Model 1-2 Application Entities, Application Processes, and Computer Systems 1-3 Relationship Between Data Type, Abstract Syntax, and Transfer Syntax 1-4 Confirmed Service 2-1 Structure of the Parameter Block 4-1 User Buffers on an Outbound Call 4-2 Setting up an Association 4-3 Setting up an Association Using Asynchronous Event Notification (OpenVMS only) 4-4 User Buffers After the Arrival of an Event (OpenVMS only) 4-5 Releasing an Association 4-6 Releasing an Association Using Asynchronous Event Notification 4-7 Using the OSAK Redirection Service 5-1 ROSE Parameter Block 5-2 ROSE Parameter Block Before an Encoding Routine 5-3 ROSE Parameter Block After an Encoding Routine 6-1 User Buffers on an Outbound Call 6-2 Setting up a Connection 6-3 Setting up a Connection Using Asynchronous Event Notification (OpenVMS only) 6-4 User Buffers After the Arrival of an Event (OpenVMS only) 6-5 Releasing a Connection 6-6 Releasing a Connection Using Asynchronous Event Notification 6-7 Using the OSAK Redirection Service 7-1 Components of OSAKtrace Utility 7-2 The Contents of a TSDU TABLES 1-1 Session Functional Units and Associated Tokens 1-2 Services Requiring Particular Tokens 2-1 Specifying OSI Transport Templates 3-1 Comparison of Static and Dynamic Allocation of Memory 3-2 Advantages and Disadvantages of Active and Passive Applications 4-1 Classifications of Parameters 4-2 Sequence of Routine Calls Used by Responder During Setup 4-3 Sequence of Routine Calls Used by Initiator During Setup 4-4 Sequence of Routine Calls Used in Releasing an Association 4-5 Sequence of Routine Calls Used in Responding to a Request for Release 5-1 ROSE Functions 6-1 Classifications of Parameters 6-2 Sequence of Routine Calls Used by Responder During Setup 6-3 Sequence of Routine Calls Used by Initiator During Setup 6-4 Sequence of Routine Calls Used in Releasing a Connection 6-5 Sequence of Routine Calls Used in Responding to a Request for Release 8-1 A Comparison of the Two Methods of Tracing 8-2 Meanings of Configuration Options