CONTENTS Title Page Copyright Page How to Use This Manual 1 Introduction to Programming VAX WAN Device Drivers Part I DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41 and DSW42 Drivers 2 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41 and DSW42 Driver Function Codes 2.1 Overview of I/O Operations 2.2 Read 2.3 Write 2.4 Set Mode and Set Characteristics 2.4.1 Set Controller Mode 2.4.1.1 P1 Parameter 2.4.1.2 P2 Parameter 2.4.1.3 P3 Parameter 2.4.2 Set DDCMP Mode 2.4.3 Shut Down Controller 2.4.4 Shut Down DDCMP 2.4.5 Enable Attention AST 2.4.6 Using Non-DDCMP Protocols 2.4.6.1 BISYNC 2.5 Sense Mode 2.5.1 The IO$_CLEAN Function 2.6 Modem Control 2.6.1 General Information 2.6.2 Full-Duplex 2.6.3 Half-Duplex 2.7 Modem Status 3 Getting Information About the Drivers 3.1 How to Get Information 3.1.1 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Driver Characteristics 3.1.2 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Device and Line Status 3.1.3 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Error Summary 4 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 I/O Status Block 5 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 I/O Function Codes 5.1 Function Codes and Function Modifiers 5.2 QIO Status Returns Part II DMB32 Driver 6 DMB32 Function Codes 6.1 Read 6.2 Write 6.3 Set Mode and Set Characteristics 6.3.1 Set Controller Mode 6.3.1.1 P1 Parameter 6.3.1.2 P2 Parameter 6.3.1.3 P3 Parameter 6.3.2 Using Non-DDCMP Protocols 6.3.2.1 BISYNC 6.3.2.2 GENBYTE 6.3.2.3 Parameters for GENBYTE Operation 6.3.2.4 The IO$_CLEAN Function 6.3.3 Set DDCMP Mode 6.3.4 Shutdown Controller 6.3.5 Shutdown DDCMP 6.3.6 Enable Attention AST 6.4 Sense Mode 6.5 Modem Control 6.5.1 Modem Control Modes 6.5.1.1 No Modem Control 6.5.1.2 Full-Duplex with Continuous RTS 6.5.1.3 Half-Duplex 6.6 Diagnostic Support 6.6.1 Read Line Unit Modem Status 6.6.2 Maintenance Modem Control Function 7 Getting Information about the DMB32 Driver 7.1 How to Obtain Information 7.2 Unit Characteristic Bits 7.3 Status Bits 7.4 Error Summary Bits 7.5 DMB32 Device Type Register 8 DMB32 I/O Status Block 8.1 DMB32 I/O Status Block Format 9 DMB32 I/O Function Codes 9.1 DMB32 Function Codes 9.2 QIO Status Returns Part III Reference Information A Modem Control State Transitions A.1 Introduction A.2 State Transition Diagrams B The GENBYTE Protocol B.1 Introduction B.2 The Framing Routine B.3 QIO Parameters Used in GENBYTE Operation B.3.1 IO$_SETMODE P2 Parameter B.3.2 IO$_WRITEBLK P4 Parameter B.4 Other Aspects of GENBYTE Operation B.5 How to Use GENBYTE B.6 A Sample Framing Routine for a Subset of the IBM BISYNC Protocol C DMB32 Programming Example C.1 Introduction C.2 Example Program D Tuning Your System D.1 Allocating and Deallocating Dynamic Memory E How to Program DSF32 Failover Sets E.1 The $QIO Interface E.2 Function Codes E.3 Using the Failover Set Commands E.3.1 The ADD Command E.3.2 The REMOVE Command E.3.3 The SET/CURRENT Command E.3.4 The SHOW Command E.3.4.1 Failover Set State E.3.4.2 Cable State E.3.4.3 Failover Set Configuration State E.4 Returning Status FIGURES 1-1 Programming a VAX WAN Device Driver 2-1 P1 Characteristics Buffer (Set Controller) 2-2 P2 Extended Characteristics Buffer 2-3 P1 Characteristics Buffer (Set DDCMP) 3-1 Longword Returned by $GETDVI 4-1 IOSB Contents 4-2 IOSB Reporting Invalid Parameter 6-1 P1 Characteristics Buffer (Set Controller) 6-2 P2 Extended Characteristics Buffer 6-3 P1 Characteristics Buffer (Set DDCMP) 6-4 Set Mode P1 Block 7-1 Format of Register's Contents 7-2 Revision Level Subdivision 8-1 IOSB Contents A-1 Full-Duplex Modem Control A-2 Half-Duplex Modem Control E-1 Format of Quadword Buffer E-2 Format of Individual SET/CURRENT Entry E-3 Format of Individual SHOW Entry E-4 Failover Set State Longword E-5 Cable State Longword E-6 Failover Set Configuration State Longword E-7 Status Return IOSB TABLES 2-1 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41 and DSW42 Driver I/O Functions 2-2 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41 and DSW42 Driver Characteristics 2-3 P2 Extended Characteristics Values 2-4 Clock Speed Values (hertz) 2-5 P2 Extended Characteristics Values 2-6 Control Character Format 2-7 Modem Status Bits 3-1 Device Characteristics 3-2 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Driver Characteristics 3-3 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Device and Line Status 3-4 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41 and DSW42 Error Summary 5-1 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 Function Codes 5-2 DSB32, DSF32, DSH32, DST32, DSV11, DSW21, DSW41, and DSW42 QIO Status Returns 6-1 DMB32 I/O Functions 6-2 DMB32 Characteristics 6-3 P2 Extended Characteristics Values 6-4 P2 Extended Characteristics Values 7-1 Device Characteristics 7-2 DMB32 Unit Characteristics 7-3 DMB32 Unit and Line Status 7-4 Error Summary Bits 9-1 DMB32 Function Codes B-1 Extra P2 Parameters for GENBYTE D-1 Adjusting SRP, LRP, and Buffer Size