DEC TCP/IP Services for VMS Programming Manual

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  Summary of Technical Changes

  1      Interprocess Communications Concepts

  1.1 Client-Server Model

  1.2 Ports

  1.3 Device-Sockets
    1.3.1      Communication Domains
    1.3.2      Protocol Types
    1.3.3      Internet Protocols
    1.3.4      Socket Communications
      1.3.4.1      Connection Sockets
      1.3.4.2      Connectionless Sockets

  1.4 Deleting Device-Sockets

  2      Internet Concepts

  2.1 Internet Architecture
    2.1.1      Application Layer
    2.1.2      Host-to-Host Layer
      2.1.2.1      Transmission Control Protocol
      2.1.2.2      User Datagram Protocol
    2.1.3      Internet Protocol Layer

  2.2 Internet Addresses
    2.2.1      Address Notation
    2.2.2      Network Classes
    2.2.3      Network Mask
    2.2.4      Broadcast Mask

  2.3 Routing
    2.3.1      Subnet Routing

  2.4 Fragmentation

  2.5 Ports
    2.5.1      Privileged Port Numbers
    2.5.2      Binding Ports

  2.6 Access Control

  3      Writing Internet Applications

  3.1 Overview

  3.2 Creating a Device-Socket
    3.2.1      Creating an Internet Pseudodevice
    3.2.2      Creating a Local Socket

  3.3 Binding a Socket

  3.4 Sending a Connection Request (Client)
    3.4.1      Specifying a Remote Socket Name

  3.5 Defining a Device-Socket as a Listener

  3.6 Accepting a Connection Request (Server)

  3.7 Obtaining Device-Socket Information

  3.8 Transferring Data
    3.8.1      Reading Data
      3.8.1.1      READ Buffers
      3.8.1.2      Reading Out-of-Band Data (TCP/IP)
      3.8.1.3      Peeking at Queued Messages
    3.8.2      Writing Data
      3.8.2.1      Writing Out-of-Band Data (TCP/IP)
      3.8.2.2      Writing Data (UDP/IP)

  3.9 Using the Berkeley Internet Name Domain Resolver
    3.9.1      Troubleshooting BIND Applications

  3.10 Deleting a Socket

  3.11 Deleting an Internet Pseudodevice

  3.12 Canceling I/O Operations

  4      Using $QIO System Services

  4.1 Overview

  4.2 Device and Function Independent $QIO Parameters

  4.3 Device- and Function-Dependent $QIO Parameters
    4.3.1      Specifying the P5 Parameter Input Parameter List
    4.3.2      Specifying the P6 Parameter Output List
    4.3.3      Specifying the Socket Name
    4.3.4      Specifying the Socket Options and I/O Control (IOCTL) Parameters

  5      System Services

  $ASSIGN

  $CANCEL

  $DASSGN

  $GETDVI

  $QIO

  Internet I/O Function Codes

  IO$_ACCESS

  IO$_ACPCONTROL

  IO$_DEACCESS

  IO$_READ

  IO$_WRITE

  IO$_SENSE MODE/CHARACTERISTICS

  IO$_SET MODE/CHARACTERISTICS

  A   TCP/IP Programming Examples

  B   UDP/IP Programming Examples

  C   VAX C Socket Communications

  Glossary

  EXAMPLES

  4-1        Specifying IOCTL Parameters

  A-1        Server TCP/IP MACRO-32 Programming Example

  A-2        Server TCP/IP C Programming Example

  A-3        Client TCP/IP MACRO-32 Programming Example

  A-4        Client TCP/IP C Programming Example

  B-1        Read UDP/IP MACRO-32 Example

  B-2        Read UDP/IP C Programming Example

  B-3        Write UDP/IP MACRO-32 Programming Example

  B-4        Write UDP/IP C Programming Example

  C-1        TCP/IP Server

  C-2        TCP/IP Client

  C-3        UDP Server

  C-4        UDP Client

  FIGURES

  1-1        Client-Server Model

  1-2        Device-socket

  2-1        Internet Network Configuration

  2-2        Internet Architecture

  2-3        Internet Network Classes

  2-4        Network Masks

  2-5        Internet Routing

  2-6        Internet Subnetworks

  2-7        Port Number Ranges

  3-1        Communication Between the Local Host and a Remote Host

  4-1        I/O Status Block

  4-2        Specifying an Input Parameter List

  4-3        Specifying an Output Parameter List

  4-4        P3 or P4 Parameter Specifying the Local or Remote Socket Name

  4-5        Specifying Socket Options

  4-6        Specifying IOCTL Functions

  4-7        Getting Socket Options

  4-8        Getting IOCTL Parameters

  TABLES

  2-1        TCP Protocol and UDP Protocol Comparison

  2-2        Network Number Ranges

  2-3        Broadcast Addresses

  3-1        Calling Sequence for Application Programs

  3-2        Shutdown Flags

  4-1        $QIO System Service Calls

  4-2        Device- and Function-Dependent $QIO Parameters

  4-3        I/O Control (IOCTL) Parameters

  5-1        Internet I/O Function Codes

  5-2        Valid INET Subfunction Codes

  5-3        P2 Socket Options

  5-4        P6 Socket Options

  5-5        Option Bits

  5-6        Communications Socket Options

  5-7        IOCTL Commands

  A-1        Calling Sequence for Application Programs (TCP/IP)

  B-1        Calling Sequence for Application Programs (UDP/IP)

  C-1        Basic Communication Routines

  C-2        Auxiliary Communication Routines

  C-3        Communication Support Routines