Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/cex/dlllib.req
There is 1 other file named dlllib.req in the archive. Click here to see a list.
!                    COPYRIGHT (c) 1980, 1981, 1982
!                    DIGITAL EQUIPMENT CORPORATION
!                        Maynard, Massachusetts
!
!     This software is furnished under a license and may  be  used
!     and copied only in accordance with the terms of such license
!     and with the inclusion of the above copyright notice.   This
!     software  or any other copies thereof may not be provided or
!     otherwise made available to any other person.  No  title  to
!     and ownership of the software is hereby transferred.
!
!     The information  in  this  software  is  subject  to  change
!     without  notice  and should not be construed as a commitment
!     by DIGITAL EQUIPMENT CORPORATION.
!
!     DIGITAL assumes no responsibility for the use or reliability
!     of  its  software  on  equipment  which  is  not supplied by
!     DIGITAL.

!+
!	*** Start of DLLLIB ***
!    DLL layer interface symbols
!-

!+
! The circuit owner will be given the circuit by receiving a CTL/STR CCB
! with C_PRM1 containing the provider PIX/LIX.  The owner then does a
! CTL/STR to the provider to establish the CCB communications and starts
! activity.
!
! If C_LIN eqlu 0, then the owner is being given the circuit for the first
! time and C_PRM2 will contain circuit name (see below).  The owner will
! return his circuit identifier (see $DLL_REQUEST_CIRCUIT) in C_LIN.
! This and the owner PIX will be provided to Network Management as the
! OWNERID for circuit Network Management functions.
! Circuit flags will be provided in C_PRM3 for further information on the
! circuit.
! If C_LIN nequ 0, then it contains the user's circuit identifier with which
! the circuit was previously associated when a CTL/STP was performed.
!
! The circuit must be released when a CTL/STP is received.  C_LIN will contain
! the circuit identifier for the circuit to be released.  At present,
! this temporarily disassociates the circuit from the owner, and the
! circuit can be re-associated through the CTL/STR as described above.
!-

field
    DLL$FW_START_CCB_PRM1 =
        set
        DLL$B_PROVIDER_LINE_INDEX = [0, 0, 8, 0],
        DLL$B_PROVIDER_PROCESS_INDEX = [0, 8, 8, 0]
        tes,
    DLL$FW_START_CCB_PRM2 =
        set
        DLL$A_CIRCUIT_NAME = [0, 0, 16, 0]
        tes,
    DLL$FW_START_CCB_PRM3 =
        set
        DLL$V_DTE_CIRCUIT = [0, 0, 1, 0]  ! Circuit is a DTE to a KL20 CPU.
        tes;

!+
! The circuit owner begins the session with the provider by calling
! $DLL_REQUEST_CIRCUIT.  This establishes the CCB interface to the
! provider and defines the circuit identifier that will be passed in C_LIN
! in CCBs being returned from the provider to the owner.  The circuit state
! will be reported in the return status code.
!
! The session is terminated by the owner with a call to $DLL_RELEASE_CIRCUIT.
! This will complete after all CCBs exchanged between the owner and provider
! have been returned to their originators.
!-

macro
    $DLL_REQUEST_CIRCUIT (CCB, PROVIDER_PIX, LIN) =
         begin

         bind
             $DLL$CCB = CCB : block field (C_FIELDS);

         %if not %null (PROVIDER_PIX)
             %then $DLL$CCB [C_PIX] = PROVIDER_PIX;
         %fi
         %if not %null (LIN)
             %then $DLL$CCB [C_LIN] = LIN;
         %fi
         $DLL$CCB [C_FNC] = FC_CTL;
         $DLL$CCB [C_MOD] = FM_STR;
         $MCB_SCHEDULE_CCB ($DLL$CCB [C_LNK]);
         end %,
    $DLL_RELEASE_CIRCUIT (CCB, PROVIDER_PIX) =
         begin

         bind
             $DLL$CCB = CCB : block field (C_FIELDS);

         %if not %null (PROVIDER_PIX)
             %then $DLL$CCB [C_PIX] = PROVIDER_PIX;
         %fi
         $DLL$CCB [C_FNC] = FC_CTL;
         $DLL$CCB [C_MOD] = FM_STP;
         $MCB_SCHEDULE_CCB ($DLL$CCB [C_LNK]);
         end %;

!+
! The $DLL_INITIALIZE call requests the provider to change the
! circuit state to OFF, and then SYNCHRONIZING state.  This causes
! the protocol to be stopped and re-initialized.
!
! The $DLL_STOP call requests the provider to change the circuit state
! to the OFF state.  This causes the protocol to be stopped.
!
! The $DLL_ENTER_MAINTENANCE call requests that the circuit be placed
! in OFF, and then MAINTENANCE state.
!-

macro
    $DLL_INITIALIZE (CCB, PROVIDER_PIX) =
         begin

         bind
             $DLL$CCB = CCB : block field (C_FIELDS);

         %if not %null (PROVIDER_PIX)
             %then $DLL$CCB [C_PIX] = PROVIDER_PIX;
         %fi
         $DLL$CCB [C_FNC] = FC_XME;
         $DLL$CCB [C_MOD] = DLL$K_INITIALIZE_LINK;
         $MCB_SCHEDULE_CCB ($DLL$CCB [C_LNK]);
         end %,
    $DLL_STOP (CCB, PROVIDER_PIX) =
         begin

         bind
             $DLL$CCB = CCB : block field (C_FIELDS);

         %if not %null (PROVIDER_PIX)
             %then $DLL$CCB [C_PIX] = PROVIDER_PIX;
         %fi
         $DLL$CCB [C_FNC] = FC_XME;
         $DLL$CCB [C_MOD] = DLL$K_STOP_LINK;
         $MCB_SCHEDULE_CCB ($DLL$CCB [C_LNK]);
         end %,
    $DLL_ENTER_MAINTENANCE (CCB, PROVIDER_PIX) =
         begin

         bind
             $DLL$CCB = CCB : block field (C_FIELDS);

         %if not %null (PROVIDER_PIX)
             %then $DLL$CCB [C_PIX] = PROVIDER_PIX;
         %fi
         $DLL$CCB [C_FNC] = FC_XME;
         $DLL$CCB [C_MOD] = DLL$K_ENTER_MAINTENANCE;
         $MCB_SCHEDULE_CCB ($DLL$CCB [C_LNK]);
         end %;

!+
! Messages are transmitted by the $DLL_TRANSMIT call, and are received
! through FC_RCP.  When the circuit is cycled through the OFF state, or
! a $DLL_RELEASE_CIRCUIT is received, all outstanding transmits will be
! returned.
!-

macro
    $DLL_TRANSMIT (CCB, PROVIDER_PIX) =
         begin

         bind
             $DLL$CCB = CCB : block field (C_FIELDS);

         %if not %null (PROVIDER_PIX)
             %then $DLL$CCB [C_PIX] = PROVIDER_PIX;
         %fi
         $DLL$CCB [C_FNC] = FC_XME;
         $DLL$CCB [C_MOD] = DLL$K_TRANSMIT;
         $MCB_SCHEDULE_CCB ($DLL$CCB [C_LNK]);
         end %;

DECLARE_SEVERITY (DLL, SUCCESS, WARNING, INFO, ERROR, SEVERE);

! FC_XME sub-function codes

literal
    DLL$K_TRANSMIT = 0^1,
    DLL$K_INITIALIZE_LINK = 1^1,
    DLL$K_STOP_LINK = 2^1,
    DLL$K_ENTER_MAINTENANCE = 3^1,
    DLL$K_TRANSMIT_AND_TIME = 4^1;

! FC_RCP sub-function codes

literal
    DLL$K_DATA_RECEIVED = 0^1,
    DLL$K_MAINTENANCE_RECEIVED = 1^1;

! FC_AST sub-function codes

literal
    DLL$K_STATE = 0^1,
    DLL$K_TRANSIENT_ERROR = 1^1,
    DLL$K_PERSISTENT_ERROR = 2^1;

! General status codes

$DLL_SUCCESS (DLL$_SUCCESS)
$DLL_ERROR (DLL$_PRIVLEDGE_VIOLATION)
$DLL_ERROR (DLL$_NOT_SUPPORTED)
$DLL_WARNING (DLL$_ABORTED)

! FC_AST / DLL$K_STATE status codes

$DLL_INFO (DLL$_STATE_OFF)
$DLL_INFO (DLL$_STATE_SYNCHRONIZING)
$DLL_INFO (DLL$_STATE_RUNNING)
$DLL_INFO (DLL$_STATE_MAINTENANCE)

! FC_AST / DLL$K_TRANSIENT_ERROR status codes

$DLL_WARNING (DLL$_TRANSMIT_THRESHOLD)
             ! A transmitted message has not been acknowledged by the other end.
$DLL_WARNING (DLL$_RECEIVE_THRESHOLD)
             ! Unable to receive a message correctly from the other end.
$DLL_WARNING (DLL$_SELECTION_THRESHOLD)
             ! The other end has not been returning control of a half duplex line
             ! in a timely fashion.

! FC_AST / DLL$K_PERSISTENT_ERROR status codes

$DLL_WARNING (DLL$_START_RECEIVED)
             ! The other end has requested protocol initialization.
$DLL_ERROR (DLL$_MAINTENANCE_RECEIVED)
             ! The other end has entered maintenance mode.
$DLL_SEVERE (DLL$_DEVICE_RESPONSE_ERROR)
            ! A hardware device has refused to respond in a timely fashion.
$DLL_SEVERE (DLL$_DEVICE_SERVICE_ERROR)
            ! The driver was unable to service the device in a timely fashion.
$DLL_SEVERE (DLL$_DEVICE_OPERATION_ERROR)
            ! The device is not operating correctly. (KMC does not load or start,
            !  illegal codes from DMC, DMR, KMC, etc.)
$DLL_WARNING (DLL$_PAUSE_TIMEOUT)
            ! DTE-20 timeout during protocol pause

! FC_AST / DLL$K_TRANSIENT_ERROR status codes (continued)

$DLL_WARNING (DLL$_SERVICE_TIMEOUT)
	    ! MOP service mode receive timed out
$DLL_WARNING (DLL$_RECEIVE_ERROR)
	    ! MOP message received in error

!+
!	*** End of DLLLIB ***
!-