CONTENTS Title Page Copyright Page Preface Part I Programming Tasks 1 Introduction to the DECnet/OSI Drivers 1.1 Understanding Modular Management 1.2 Writing a Program for the VAX WAN Device Drivers 1.2.1 Using the Obsolete Interface 2 Setting Up and Using Datalinks 2.1 Setting Up DECnet/OSI Modules 2.2 Using the Service Interface 2.2.1 Setting Up Datalinks 2.2.1.1 Assigning a Channel 2.2.1.2 Opening a Port 2.2.1.3 Enabling an Attention AST 2.2.1.4 Starting the Protocol 2.2.1.5 Clearing Buffers 2.2.1.6 Getting Information About the Port 2.2.1.7 Shutting Down the Protocol 2.2.1.8 Closing the Port 2.2.2 Exchanging Data 2.2.2.1 Reading Data 2.2.2.2 Writing Data 3 Programming Problems 3.1 Introduction to Problem Solving 3.2 Loopback 3.2.1 STARTLOOP DRIVER 3.2.2 STARTLOOP DEVICE 3.2.3 STARTLOOP CONNECTOR 3.2.4 STARTLOOP LOCAL 3.2.5 STARTLOOP REMOTE 3.2.6 STARTLOOP EXTERNAL 3.3 Problems and System Failure 3.3.1 Copying System Dump Files Part II Programming Reference Information 4 I/O Function Codes and Status Returns 4.1 Overview of I/O Operations 4.1.1 WANDRIVER 4.1.2 QIOs to WANDRIVER 4.2 Setting Up, Controlling, and Using Datalink Circuits 4.2.1 Open a Port 4.2.1.1 Item-Lists for the Attributes of Ports 4.2.2 Enable Attention AST 4.2.3 Start Up Protocol 4.2.4 Shut Down Protocol 4.2.5 Getting Port Information 4.2.6 Clean 4.2.7 Close a Port 4.3 $QIOs for Exchanging User Data 4.3.1 Read 4.3.2 Write 4.4 Returns in the Input/Output Status Block (IOSB) 4.5 Using the $CANCEL System Service A DEC HDLC A.1 Optional Functions A.2 Classes of Procedure B User-Written Datalink Protocols B.1 The DDCMP Framing Routine B.2 The HDLC and SDLC Framing Routines B.3 BISYNC B.4 GENBYTE B.4.1 The Framing Routine B.4.2 QIO Parameters Used in GENBYTE Operation B.4.2.1 IO$_SETMODE P2 Parameter B.4.2.2 IO$_WRITEBLK P4 Parameter B.4.3 Other Aspects of GENBYTE Operation B.4.4 How to Use GENBYTE B.5 A Sample GENBYTE Macro-32 Framing Routine for a Subset of the IBM BISYNC Protocol C Example Programs C.1 Programs That Use the WANDRIVER Interface C.1.1 WANDRIVER Program That Sends Data C.1.2 WANDRIVER Program That Receives Data C.2 Programs That Use the Obsolete Interface C.2.1 QIO Program That Sends Data C.2.2 QIO Program That Receives Data D Obsolete Features of the $QIO Interface D.1 Read D.2 Write D.3 Set Mode and Set Characteristics D.3.1 Set Controller Mode D.3.1.1 P1 Parameter D.3.1.2 P2 Parameter D.3.1.3 P3 Parameter D.3.2 Set DDCMP Mode D.3.3 Shut Down Controller D.3.4 Shut Down DDCMP D.3.5 Enable Attention AST D.3.5.1 Status Bits D.3.5.2 Error Summary Bits D.3.6 Using Non-DDCMP Protocols D.3.6.1 BISYNC D.3.6.2 GENBYTE D.3.6.3 Parameters for GENBYTE Operation D.4 Sense Mode D.4.1 The IO$_CLEAN Function D.5 Getting Information About the Drivers D.5.1 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Driver Characteristics D.5.2 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Device and Line Status D.5.3 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Error Summary D.6 Reading the Modem Signals D.7 The I/O Status Block E Management E.1 Differences Between the V1.1 VAX WAN Device Drivers and the V2.0 VAX WAN Device Drivers E.1.1 Integration with DECnet E.1.2 Managing the VAX WAN Device Drivers E.1.2.1 Using WANDRIVER E.1.2.2 Using the Obsolete Interface E.2 NCL Commands F How to Program DSF32 Failover Sets F.1 The $QIO Interface F.2 Function Codes F.3 Using the Failover Set Commands F.3.1 The ADD Command F.3.2 The REMOVE Command F.3.3 The SET/CURRENT Command F.3.4 The SHOW Command F.3.4.1 Failover Set State F.3.4.2 Cable State F.3.4.3 Failover Set Configuration State F.4 Returning Status EXAMPLES 3-1 Typical NCL SHOW Commands for a DEC HDLC Implementation FIGURES 1-1 The Generic Drivers and DECnet/OSI 3-1 What the Loopback Tests Do 4-1 The Format of an Item 4-2 The Format of the IOSB B-1 A DDCMP Frame D-1 P1 Characteristics Buffer (Set Controller) D-2 P2 Extended Characteristics Buffer D-3 P1 Characteristics Buffer (Set DDCMP) D-4 Longword Returned by $GETDVI D-5 IOSB Contents D-6 IOSB Reporting Invalid Parameter F-1 Format of Quadword Buffer F-2 Format of Individual SET/CURRENT Entry F-3 Format of Individual SHOW Entry F-4 Failover Set State Longword F-5 Cable State Longword F-6 Failover Set Configuration State Longword F-7 Status Return IOSB TABLES 1-1 Differences Between DECnet/OSI and Phase IV Drivers 4-1 VAX WAN Device Drivers I/O Functions 4-2 Reasons for SS$_SSFAIL on an IO$_CREATE Request 4-3 Sample Item Lengths 4-4 Settable Open Port Items 4-5 Meaning of Status Bits 4-6 Meaning of Error Bits 4-7 Read-Only Open Port Items 4-8 Link Up Item-List 4-9 Reasons for SS$_SSFAIL on a IO$_WRITELBLK Request B-1 Extra P2 Parameters for GENBYTE D-1 Obsolete I/O Functions D-2 Driver Characteristics D-3 P2 Extended Characteristics Values D-4 Clock Speed Values (hertz) D-5 P2 Extended Characteristics Values D-6 Unit and Line Status D-7 Error Summary Bits D-8 BISYNC Control Character Exceptions D-9 GENBYTE Framing Interface Description D-10 GENBYTE Additional Parameters D-11 Device Characteristics D-12 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Driver Characteristics D-13 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Device and Line Status D-14 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41 and DSW42 Error Summary D-15 Completion Status Returns